All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JSci.physics.relativity.Rank2Tensor

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

public class Rank2Tensor
extends Tensor
The Rank2Tensor class encapsulates 2nd rank tensors.


Variable Index

 o rank2

Constructor Index

 o Rank2Tensor()
Constructs a 2nd rank tensor.

Method Index

 o add(Rank2Tensor)
Returns the addition of this tensor and another.
 o equals(Object)
Compares two tensors for equality.
 o getComponent(int, int)
Returns a component of this tensor.
 o multiply(Rank1Tensor)
Returns the multiplication of this tensor by another.
 o setComponent(int, int, double)
Sets the value of a component of this tensor.
 o subtract(Rank2Tensor)
Returns the subtraction of this tensor by another.
 o tensorProduct(Rank1Tensor)
Returns the tensor product of this tensor and another.
 o tensorProduct(Rank2Tensor)
Returns the tensor product of this tensor and another.

Variables

 o rank2
 protected double rank2[][]

Constructors

 o Rank2Tensor
 public Rank2Tensor()
Constructs a 2nd rank tensor.

Methods

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

Parameters:
a - a 2nd rank tensor
Overrides:
equals in class Object
 o getComponent
 public double getComponent(int i,
                            int j)
Returns a component of this tensor.

Parameters:
i - 1st index
j - 2nd index
Throws: DimensionException
If attempting to access an invalid component.
 o setComponent
 public void setComponent(int i,
                          int j,
                          double x)
Sets the value of a component of this tensor.

Parameters:
i - 1st index
j - 2nd index
x - value
Throws: DimensionException
If attempting to access an invalid component.
 o add
 public Rank2Tensor add(Rank2Tensor t)
Returns the addition of this tensor and another.

Parameters:
t - a 2nd rank tensor
 o subtract
 public Rank2Tensor subtract(Rank2Tensor t)
Returns the subtraction of this tensor by another.

Parameters:
t - a 2nd rank tensor
 o multiply
 public Rank1Tensor multiply(Rank1Tensor t)
Returns the multiplication of this tensor by another.

Parameters:
t - a 1st rank tensor
 o tensorProduct
 public Rank3Tensor tensorProduct(Rank1Tensor t)
Returns the tensor product of this tensor and another.

Parameters:
t - a 1st rank tensor
 o tensorProduct
 public Rank4Tensor tensorProduct(Rank2Tensor t)
Returns the tensor product of this tensor and another.

Parameters:
t - a 2nd rank tensor

All Packages  Class Hierarchy  This Package  Previous  Next  Index