|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object JSci.physics.relativity.Tensor JSci.physics.relativity.Rank1Tensor
The Rank1Tensor class encapsulates 1st rank tensors.
Field Summary | |
protected double[] |
rank1
|
Constructor Summary | |
Rank1Tensor()
Constructs a 1st rank tensor. |
|
Rank1Tensor(double s,
Double3Vector v)
Constructs a 1st rank tensor. |
|
Rank1Tensor(double s,
double v1,
double v2,
double v3)
Constructs a 1st rank tensor. |
Method Summary | |
Rank1Tensor |
add(Rank1Tensor t)
Returns the addition of this tensor and another. |
boolean |
equals(java.lang.Object a)
Compares two tensors for equality. |
double |
getComponent(int i)
Returns a component of this tensor. |
int |
hashCode()
Returns a hashcode for this tensor. |
double |
norm()
Returns the norm (invariant). |
void |
setComponent(int i,
double x)
Sets the value of a component of this tensor. |
Rank1Tensor |
subtract(Rank1Tensor t)
Returns the subtraction of this tensor by another. |
Rank2Tensor |
tensorProduct(Rank1Tensor t)
Returns the tensor product of this tensor and another. |
Rank3Tensor |
tensorProduct(Rank2Tensor t)
Returns the tensor product of this tensor and another. |
Rank4Tensor |
tensorProduct(Rank3Tensor t)
Returns the tensor product of this tensor and another. |
java.lang.String |
toString()
Returns a comma delimited string representing the value of this tensor. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected double[] rank1
Constructor Detail |
public Rank1Tensor()
public Rank1Tensor(double s, Double3Vector v)
s
- a scalarv
- a 3-vectorpublic Rank1Tensor(double s, double v1, double v2, double v3)
s
- a scalarv1
- 1st 3-vector componentv2
- 2nd 3-vector componentv3
- 3rd 3-vector componentMethod Detail |
public boolean equals(java.lang.Object a)
a
- a 1st rank tensorpublic java.lang.String toString()
public int hashCode()
public double getComponent(int i)
i
- 1st index
DimensionException
- If attempting to access an invalid component.public void setComponent(int i, double x)
i
- 1st indexx
- value
DimensionException
- If attempting to access an invalid component.public double norm()
public Rank1Tensor add(Rank1Tensor t)
t
- a 1st rank tensorpublic Rank1Tensor subtract(Rank1Tensor t)
t
- a 1st rank tensorpublic Rank2Tensor tensorProduct(Rank1Tensor t)
t
- a 1st rank tensorpublic Rank3Tensor tensorProduct(Rank2Tensor t)
t
- a 2nd rank tensorpublic Rank4Tensor tensorProduct(Rank3Tensor t)
t
- a 3rd rank tensor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |