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 Group
Group.Additive<T>, Group.Multiplicative<T>Nested classes/interfaces inherited from interface Operation
Operation.Addition<T>, Operation.Division<T>, Operation.Multiplication<T>, Operation.Subtraction<T>Nested classes/interfaces inherited from interface ScalarOperation
ScalarOperation.Addition<T,N>, ScalarOperation.Division<T, N>, ScalarOperation.Multiplication<T, N>, ScalarOperation.Subtraction<T, N> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final FunctionSet<N> private final intprivate 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) voidfinal intThe range of the indices that identify the scalar components.booleaninthashCode()(package private) voidmultiply(Mutate1D.Fillable<N> receiver, double left, Access1D<N> right) (package private) void(package private) voidnegate(Mutate1D.Fillable<N> receiver, Access1D<N> argument) (package private) abstract T(package private) doublenorm(Access1D.Aggregatable<N> array) final intrank()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 Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Group.Additive
negateMethods inherited from interface NormedVectorSpace
isSmall, normMethods inherited from interface Operation.Addition
addMethods inherited from interface ScalarOperation.Multiplication
multiply, multiply, multiplyMethods inherited from interface Tensor
components, isSameShapeMethods inherited from interface 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:TensorThe range of the indices that identify the scalar components. Each index of a tensor ranges over the number of dimensions.- Specified by:
dimensionsin interfaceTensor<N extends Comparable<N>, T extends ArrayBasedTensor<N,T>>
-
equals
-
hashCode
-
rank
public final int rank()Description copied from interface:TensorThe total number of indices required to uniquely identify each scalar component is called the order, degree or rank of the tensor.- Specified by:
rankin interfaceTensor<N extends Comparable<N>, T extends ArrayBasedTensor<N,T>>
-
signum
Description copied from interface:NormedVectorSpacethis == this.signum().multiply(this.norm())- Specified by:
signumin interfaceNormedVectorSpace<N extends Comparable<N>, T extends ArrayBasedTensor<N,T>> - Returns:
- A unit "vector"
-
add
-
multiply
-
multiply
-
negate
-
newSameShape
-
norm
-