org.jscience.physics.relativity
Class Rank3Tensor

java.lang.Object
  extended by org.jscience.physics.relativity.Tensor
      extended by org.jscience.physics.relativity.Rank3Tensor
All Implemented Interfaces:
java.io.Serializable, Member

public class Rank3Tensor
extends Tensor

The Rank3Tensor class encapsulates 3rd rank tensors.

See Also:
Serialized Form

Field Summary
protected  double[][][] rank3
          DOCUMENT ME!
 
Constructor Summary
Rank3Tensor()
          Constructs a 3rd rank tensor.
 
Method Summary
 Rank3Tensor add(Rank3Tensor t)
          Returns the addition of this tensor and another.
 boolean equals(java.lang.Object a)
          Compares two tensors for equality.
 double getComponent(int i, int j, int k)
          Returns a component of this tensor.
 void setComponent(int i, int j, int k, double x)
          Sets the value of a component of this tensor.
 Rank3Tensor subtract(Rank3Tensor t)
          Returns the subtraction of this tensor by another.
 Rank4Tensor tensorProduct(Rank1Tensor t)
          Returns the tensor product of this tensor and another.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rank3

protected double[][][] rank3
DOCUMENT ME!

Constructor Detail

Rank3Tensor

public Rank3Tensor()
Constructs a 3rd rank tensor.

Method Detail

equals

public boolean equals(java.lang.Object a)
Compares two tensors for equality.

Overrides:
equals in class java.lang.Object
Parameters:
a - a 3rd rank tensor
Returns:
DOCUMENT ME!

getComponent

public double getComponent(int i,
                           int j,
                           int k)
Returns a component of this tensor.

Parameters:
i - 1st index
j - 2nd index
k - 3rd index
Returns:
DOCUMENT ME!
Throws:
IllegalDimensionException - If attempting to access an invalid component.

setComponent

public void setComponent(int i,
                         int j,
                         int k,
                         double x)
Sets the value of a component of this tensor.

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

add

public Rank3Tensor add(Rank3Tensor t)
Returns the addition of this tensor and another.

Parameters:
t - a 3rd rank tensor
Returns:
DOCUMENT ME!

subtract

public Rank3Tensor subtract(Rank3Tensor t)
Returns the subtraction of this tensor by another.

Parameters:
t - a 3rd rank tensor
Returns:
DOCUMENT ME!

tensorProduct

public Rank4Tensor tensorProduct(Rank1Tensor t)
Returns the tensor product of this tensor and another.

Parameters:
t - a 1st rank tensor
Returns:
DOCUMENT ME!