java.lang.Cloneable
RotationTensor
RotationTensor1D
, RotationTensor2D
, RotationTensor3D
, Tensor1D
, Tensor2D
, Tensor3D
, TensorND
public interface Tensor
extends java.lang.Cloneable
Modifier and Type | Method | Description |
---|---|---|
void |
assignTo(double[] d) |
Fills the given array with the elements of this tensor.
|
void |
assignTo(double[][] d) |
Fills the given 2-dimensional array with the elements of this tensor.
|
void |
assignTo(Vector[] v) |
Assigns the tensor elements column-wise to the given vectors.
|
java.lang.Object |
clone() |
|
double |
component(int i,
int j) |
|
int |
D() |
|
void |
DE(Tensor t) |
"Divide equals" (/=) operation, element-by-element.
|
double |
determinant() |
Computes the determinant of the matrix represented by this tensor
|
void |
diagE(Vector v) |
Makes this a diagonal tensor with elements set by the given vector.
|
void |
E(double a) |
"Equals" operation, setting all elements of this tensor to the given value
|
void |
E(double[][] d) |
Sets the tensor elements using the elements of the array.
|
void |
E(Tensor t) |
"Equals" operation.
|
void |
E(Vector[] v) |
Fills the tensor column-wise with the given vectors.
|
boolean |
equals(Tensor t) |
Element-by-element comparison of tensors
|
void |
Ev1v2(Vector v1,
Vector v2) |
Sets this tensor equal to the dyadic or outer product of the given vectors.
|
void |
invert() |
Replaces this tensor with its inverse.
|
boolean |
isNaN() |
|
void |
map(IFunction f) |
Applies given function to each element of this tensor.
|
void |
ME(Tensor t) |
"Minus equals" (-=) operation, subtracting the elements of the given tensor from the
respective elements of this tensor.
|
void |
MEv1v2(Vector v1,
Vector v2) |
"Minus equals" (-=) operation with a dyad argument.
|
void |
PE(double a) |
"Plus equals" (+=) operation, adding the given value to each element of this tensor
|
void |
PE(int i,
int j,
double a) |
"Plus equals" (+=) operation, performed on a single element of this tensor.
|
void |
PE(Tensor t) |
"Plus equals" (+=) operation, adding the elements of the given tensor to the
respective elements of this tensor
|
void |
PEa1Tt1(double a1,
Tensor t1) |
"Plus equals" (+=) operation based on a scalar and tensor.
|
void |
PEv1v2(Vector v1,
Vector v2) |
"Plus equals" (+=) operation with a dyad argument.
|
void |
setComponent(int i,
int j,
double d) |
|
void |
TE(double a) |
"Times equals" (*=) operation, replaces each element of this tensor by its current value times the given scalar
|
void |
TE(Tensor t) |
"Times equals" (*=) operation, as matrix multiplication.
|
double[] |
toArray() |
Returns tensor in a new array, writing elements row-wise.
|
double |
trace() |
|
void |
transform(Vector x) |
Applies the given tensor transformation to this vector, replacing its
elements with the transformed values.
|
void |
transpose() |
Performs a transpose operation on this tensor, replacing each element ab by its counterpart element ba
|
java.lang.Object clone()
int D()
double component(int i, int j)
i
- "row" index of the requested componentj
- "column" index of the requested componentvoid setComponent(int i, int j, double d)
i
- "row" index of the component being setj
- "column" index of the component being setd
- value to which the component ai,j of this tensor is setvoid E(Tensor t)
t
- the given tensor used to set this tensor's valuesvoid E(Vector[] v)
v
- the given vectors used to set this tensor's valuesvoid E(double[][] d)
void E(double a)
a
- the given value used to set this tensor's elementsvoid diagE(Vector v)
v
- the given vectorvoid assignTo(Vector[] v)
void Ev1v2(Vector v1, Vector v2)
v1
- first vector of the dyadv2
- second vector of the dyadvoid PE(double a)
a
- the value added to each elementvoid PE(Tensor t)
t
- the given tensor added to this tensorvoid PE(int i, int j, double a)
i
- "row" index of the modified elementj
- "column" index of the modified elementa
- value to be added to the element ai,jvoid PEv1v2(Vector v1, Vector v2)
void MEv1v2(Vector v1, Vector v2)
void ME(Tensor t)
t
- the given tensor subtracted from this tensorvoid PEa1Tt1(double a1, Tensor t1)
a1
- the scalar multipliert1
- the given tensordouble trace()
void transpose()
double determinant()
void invert()
void TE(double a)
a
- the given scalar multipliervoid TE(Tensor t)
t
- the tensor this is multiplyingvoid DE(Tensor t)
t
- the given tensordouble[] toArray()
boolean isNaN()
void map(IFunction f)
f
- the function applied to each elementvoid transform(Vector x)
void assignTo(double[] d)
d
- an array of length D2, containing the tensor elements upon returnvoid assignTo(double[][] d)
d
- a D-by-D array, containing the tensor elements upon returnboolean equals(Tensor t)
t
- the given tensor