All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JSci.physics.relativity.Rank1Tensor

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

public class Rank1Tensor
extends Tensor
The Rank1Tensor class encapsulates 1st rank tensors.


Variable Index

 o rank1

Constructor Index

 o Rank1Tensor()
Constructs a 1st rank tensor.
 o Rank1Tensor(double, double, double, double)
Constructs a 1st rank tensor.
 o Rank1Tensor(double, DoubleVector)
Constructs a 1st rank tensor.

Method Index

 o add(Rank1Tensor)
Returns the addition of this tensor and another.
 o equals(Object)
Compares two tensors for equality.
 o getComponent(int)
Returns a component of this tensor.
 o hashCode()
Returns a hashcode for this tensor.
 o norm()
Returns the norm (invariant).
 o setComponent(int, double)
Sets the value of a component of this tensor.
 o subtract(Rank1Tensor)
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.
 o tensorProduct(Rank3Tensor)
Returns the tensor product of this tensor and another.
 o toString()
Returns a comma delimited string representing the value of this tensor.

Variables

 o rank1
 protected double rank1[]

Constructors

 o Rank1Tensor
 public Rank1Tensor()
Constructs a 1st rank tensor.

 o Rank1Tensor
 public Rank1Tensor(double s,
                    DoubleVector v)
Constructs a 1st rank tensor.

Parameters:
s - a scalar
v - a 3-vector
 o Rank1Tensor
 public Rank1Tensor(double s,
                    double v1,
                    double v2,
                    double v3)
Constructs a 1st rank tensor.

Parameters:
s - a scalar
v1 - 1st 3-vector component
v2 - 2nd 3-vector component
v3 - 3rd 3-vector component

Methods

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

Parameters:
a - a 1st rank tensor
Overrides:
equals in class Object
 o toString
 public String toString()
Returns a comma delimited string representing the value of this tensor.

Overrides:
toString in class Object
 o hashCode
 public int hashCode()
Returns a hashcode for this tensor.

Overrides:
hashCode in class Object
 o getComponent
 public double getComponent(int i)
Returns a component of this tensor.

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

Parameters:
i - 1st index
x - value
Throws: DimensionException
If attempting to access an invalid component.
 o norm
 public double norm()
Returns the norm (invariant).

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

Parameters:
t - a 1st rank tensor
 o subtract
 public Rank1Tensor subtract(Rank1Tensor t)
Returns the subtraction of this tensor by another.

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

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

Parameters:
t - a 2nd rank tensor
 o tensorProduct
 public Rank4Tensor tensorProduct(Rank3Tensor t)
Returns the tensor product of this tensor and another.

Parameters:
t - a 3rd rank tensor

All Packages  Class Hierarchy  This Package  Previous  Next  Index