    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class JSci.physics.relativity.Rank4Tensor

    java.lang.Object
       |
       +----JSci.physics.relativity.Tensor
               |
               +----JSci.physics.relativity.Rank4Tensor

public class Rank4Tensor
extends Tensor

The Rank4Tensor class encapsulates 4th rank tensors.

##

rank4

##

Rank4Tensor()
  Constructs a 4th rank tensor.

##

add(Rank4Tensor)
  Returns the addition of this tensor and another.
equals(Object)
  Compares two tensors for equality.
getComponent(int, int, int, int)
  Returns a component of this tensor.
setComponent(int, int, int, int, double)
  Sets the value of a component of this tensor.
subtract(Rank4Tensor)
  Returns the subtraction of this tensor by another.

##

rank4

     protected double rank4[][][][]

##

Rank4Tensor

     public Rank4Tensor()

  Constructs a 4th rank tensor.

##

equals

     public boolean equals(Object a)

  Compares two tensors for equality.

  Parameters:
    a - a 4th rank tensor
  Overrides:
    equals in class Object

getComponent

     public double getComponent(int i,
                                int j,
                                int k,
                                int l)

  Returns a component of this tensor.

  Parameters:
    i - 1st index
    j - 2nd index
    k - 3rd index
    l - 4th index
  Throws: DimensionException
    If attempting to access an invalid component.

setComponent

     public void setComponent(int i,
                              int j,
                              int k,
                              int l,
                              double x)

  Sets the value of a component of this tensor.

  Parameters:
    i - 1st index
    j - 2nd index
    k - 3rd index
    l - 4th index
    x - value
  Throws: DimensionException
    If attempting to access an invalid component.

add

     public Rank4Tensor add(Rank4Tensor t)

  Returns the addition of this tensor and another.

  Parameters:
    t - a 4th rank tensor

subtract

     public Rank4Tensor subtract(Rank4Tensor t)

  Returns the subtraction of this tensor by another.

  Parameters:
    t - a 4th rank tensor

    All Packages  Class Hierarchy  This Package  Previous  Next  Index