Package org.ojalgo.tensor
Class ArrayBasedTensor<N extends Comparable<N>,T extends ArrayBasedTensor<N,T>>
java.lang.Object
org.ojalgo.tensor.ArrayBasedTensor<N,T>
- All Implemented Interfaces:
Group
,Group.Additive<T>
,NormedVectorSpace<T,
,N> Operation
,Operation.Addition<T>
,ScalarOperation
,ScalarOperation.Multiplication<T,
,N> VectorSpace<T,
,N> Tensor<N,
T>
- Direct Known Subclasses:
AnyTensor
,MatrixTensor
,VectorTensor
abstract class ArrayBasedTensor<N extends Comparable<N>,T extends ArrayBasedTensor<N,T>>
extends Object
implements Tensor<N,T>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.ojalgo.algebra.Group
Group.Additive<T>, Group.Multiplicative<T>
Nested classes/interfaces inherited from interface org.ojalgo.algebra.Operation
Operation.Addition<T>, Operation.Division<T>, Operation.Multiplication<T>, Operation.Subtraction<T>
Nested classes/interfaces inherited from interface org.ojalgo.algebra.ScalarOperation
ScalarOperation.Addition<T,
N extends Comparable<N>>, ScalarOperation.Division<T, N extends Comparable<N>>, ScalarOperation.Multiplication<T, N extends Comparable<N>>, ScalarOperation.Subtraction<T, N extends Comparable<N>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private final FunctionSet
<N> private final int
private final Scalar.Factory
<N> -
Constructor Summary
ConstructorsConstructorDescriptionArrayBasedTensor
(int rank, int dimensions, FunctionSet<N> functionSet, Scalar.Factory<N> scalarFactory) -
Method Summary
Modifier and TypeMethodDescription(package private) void
final int
The range of the indices that identify the scalar components.boolean
int
hashCode()
(package private) void
multiply
(Mutate1D.Fillable<N> receiver, double left, Access1D<N> right) (package private) void
(package private) void
negate
(Mutate1D.Fillable<N> receiver, Access1D<N> argument) (package private) abstract T
(package private) double
norm
(Access1D.Aggregatable<N> array) final int
rank()
The total number of indices required to uniquely identify each scalar component is called the order, degree or rank of the tensor.signum()
this == this.signum().multiply(this.norm())
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ojalgo.algebra.Group.Additive
negate
Methods inherited from interface org.ojalgo.algebra.NormedVectorSpace
isSmall, norm
Methods inherited from interface org.ojalgo.algebra.Operation.Addition
add
Methods inherited from interface org.ojalgo.algebra.ScalarOperation.Multiplication
multiply, multiply, multiply
Methods inherited from interface org.ojalgo.tensor.Tensor
components, isSameShape
Methods inherited from interface org.ojalgo.algebra.VectorSpace
conjugate
-
Field Details
-
myDimensions
private final int myDimensions -
myFunctionSet
-
myRank
private final int myRank -
myScalarFactory
-
-
Constructor Details
-
ArrayBasedTensor
ArrayBasedTensor(int rank, int dimensions, FunctionSet<N> functionSet, Scalar.Factory<N> scalarFactory)
-
-
Method Details
-
dimensions
public final int dimensions()Description copied from interface:Tensor
The range of the indices that identify the scalar components. Each index of a tensor ranges over the number of dimensions.- Specified by:
dimensions
in interfaceTensor<N extends Comparable<N>,
T extends ArrayBasedTensor<N, T>>
-
equals
-
hashCode
public int hashCode() -
rank
public final int rank()Description copied from interface:Tensor
The total number of indices required to uniquely identify each scalar component is called the order, degree or rank of the tensor.- Specified by:
rank
in interfaceTensor<N extends Comparable<N>,
T extends ArrayBasedTensor<N, T>>
-
signum
Description copied from interface:NormedVectorSpace
this == this.signum().multiply(this.norm())
- Specified by:
signum
in interfaceNormedVectorSpace<N extends Comparable<N>,
T extends ArrayBasedTensor<N, T>> - Returns:
- A unit "vector"
-
add
-
multiply
-
multiply
-
negate
-
newSameShape
-
norm
-