public class Rank2Tensor extends Tensor
Modifier and Type | Field and Description |
---|---|
protected double[][] |
rank2 |
Constructor and Description |
---|
Rank2Tensor()
Constructs a 2nd rank tensor.
|
Modifier and Type | Method and Description |
---|---|
Rank2Tensor |
add(Rank2Tensor 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)
Returns a component of this tensor.
|
Rank1Tensor |
multiply(Rank1Tensor t)
Returns the multiplication of this tensor by another.
|
void |
setComponent(int i,
int j,
double x)
Sets the value of a component of this tensor.
|
Rank2Tensor |
subtract(Rank2Tensor t)
Returns the subtraction of this tensor by another.
|
Rank3Tensor |
tensorProduct(Rank1Tensor t)
Returns the tensor product of this tensor and another.
|
Rank4Tensor |
tensorProduct(Rank2Tensor t)
Returns the tensor product of this tensor and another.
|
public boolean equals(java.lang.Object a)
equals
in class java.lang.Object
a
- a 2nd rank tensorpublic double getComponent(int i, int j)
i
- 1st indexj
- 2nd indexDimensionException
- If attempting to access an invalid component.public void setComponent(int i, int j, double x)
i
- 1st indexj
- 2nd indexx
- valueDimensionException
- If attempting to access an invalid component.public Rank2Tensor add(Rank2Tensor t)
t
- a 2nd rank tensorpublic Rank2Tensor subtract(Rank2Tensor t)
t
- a 2nd rank tensorpublic Rank1Tensor multiply(Rank1Tensor t)
t
- a 1st rank tensorpublic Rank3Tensor tensorProduct(Rank1Tensor t)
t
- a 1st rank tensorpublic Rank4Tensor tensorProduct(Rank2Tensor t)
t
- a 2nd rank tensor