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.
-
rank1
-
-
Rank1Tensor()
- Constructs a 1st rank tensor.
-
Rank1Tensor(double, double, double, double)
- Constructs a 1st rank tensor.
-
Rank1Tensor(double, DoubleVector)
- Constructs a 1st rank tensor.
-
add(Rank1Tensor)
- Returns the addition of this tensor and another.
-
equals(Object)
- Compares two tensors for equality.
-
getComponent(int)
- Returns a component of this tensor.
-
hashCode()
- Returns a hashcode for this tensor.
-
norm()
- Returns the norm (invariant).
-
setComponent(int, double)
- Sets the value of a component of this tensor.
-
subtract(Rank1Tensor)
- Returns the subtraction of this tensor by another.
-
tensorProduct(Rank1Tensor)
- Returns the tensor product of this tensor and another.
-
tensorProduct(Rank2Tensor)
- Returns the tensor product of this tensor and another.
-
tensorProduct(Rank3Tensor)
- Returns the tensor product of this tensor and another.
-
toString()
- Returns a comma delimited string representing the value of this tensor.
rank1
protected double rank1[]
Rank1Tensor
public Rank1Tensor()
- Constructs a 1st rank tensor.
Rank1Tensor
public Rank1Tensor(double s,
DoubleVector v)
- Constructs a 1st rank tensor.
- Parameters:
- s - a scalar
- v - a 3-vector
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
equals
public boolean equals(Object a)
- Compares two tensors for equality.
- Parameters:
- a - a 1st rank tensor
- Overrides:
- equals in class Object
toString
public String toString()
- Returns a comma delimited string representing the value of this tensor.
- Overrides:
- toString in class Object
hashCode
public int hashCode()
- Returns a hashcode for this tensor.
- Overrides:
- hashCode in class Object
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.
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.
norm
public double norm()
- Returns the norm (invariant).
add
public Rank1Tensor add(Rank1Tensor t)
- Returns the addition of this tensor and another.
- Parameters:
- t - a 1st rank tensor
subtract
public Rank1Tensor subtract(Rank1Tensor t)
- Returns the subtraction of this tensor by another.
- Parameters:
- t - a 1st rank tensor
tensorProduct
public Rank2Tensor tensorProduct(Rank1Tensor t)
- Returns the tensor product of this tensor and another.
- Parameters:
- t - a 1st rank tensor
tensorProduct
public Rank3Tensor tensorProduct(Rank2Tensor t)
- Returns the tensor product of this tensor and another.
- Parameters:
- t - a 2nd rank tensor
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