Module ojalgo
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 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 java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ojalgo.algebra.Group.Additive
negateMethods inherited from interface org.ojalgo.algebra.NormedVectorSpace
isSmall, normMethods inherited from interface org.ojalgo.algebra.Operation.Addition
addMethods inherited from interface org.ojalgo.algebra.ScalarOperation.Multiplication
multiply, multiply, multiplyMethods inherited from interface org.ojalgo.tensor.Tensor
components, isSameShapeMethods 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: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
public int 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
-