Module ojalgo
Package org.ojalgo.tensor
Class ArrayBasedTensor<N extends java.lang.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 java.lang.Comparable<N>,T extends ArrayBasedTensor<N,T>> extends java.lang.Object implements Tensor<N,T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classArrayBasedTensor.Factory<N extends java.lang.Comparable<N>>-
Nested 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 java.lang.Comparable<N>>, ScalarOperation.Division<T,N extends java.lang.Comparable<N>>, ScalarOperation.Multiplication<T,N extends java.lang.Comparable<N>>, ScalarOperation.Subtraction<T,N extends java.lang.Comparable<N>>
-
-
Field Summary
Fields Modifier and Type Field Description private intmyDimensionsprivate FunctionSet<N>myFunctionSetprivate intmyRankprivate Scalar.Factory<N>myScalarFactory
-
Constructor Summary
Constructors Constructor Description ArrayBasedTensor(int rank, int dimensions, FunctionSet<N> functionSet, Scalar.Factory<N> scalarFactory)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) voidadd(Mutate1D.Fillable<N> receiver, Access1D<N> left, Access1D<N> right)intdimensions()The range of the indices that identify the scalar components.booleanequals(java.lang.Object obj)inthashCode()(package private) voidmultiply(Mutate1D.Fillable<N> receiver, double left, Access1D<N> right)(package private) voidmultiply(Mutate1D.Fillable<N> receiver, N left, Access1D<N> right)(package private) voidnegate(Mutate1D.Fillable<N> receiver, Access1D<N> argument)(package private) abstract TnewSameShape()(package private) doublenorm(Access1D.Aggregatable<N> array)intrank()The total number of indices required to uniquely identify each scalar component is called the order, degree or rank of the tensor.Tsignum()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 Detail
-
myDimensions
private final int myDimensions
-
myFunctionSet
private final FunctionSet<N extends java.lang.Comparable<N>> myFunctionSet
-
myRank
private final int myRank
-
myScalarFactory
private final Scalar.Factory<N extends java.lang.Comparable<N>> myScalarFactory
-
-
Constructor Detail
-
ArrayBasedTensor
ArrayBasedTensor(int rank, int dimensions, FunctionSet<N> functionSet, Scalar.Factory<N> scalarFactory)
-
-
Method Detail
-
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 java.lang.Comparable<N>,T extends ArrayBasedTensor<N,T>>
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
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.
-
signum
public T signum()
Description copied from interface:NormedVectorSpacethis == this.signum().multiply(this.norm())- Specified by:
signumin interfaceNormedVectorSpace<N extends java.lang.Comparable<N>,T extends ArrayBasedTensor<N,T>>- Returns:
- A unit "vector"
-
multiply
void multiply(Mutate1D.Fillable<N> receiver, double left, Access1D<N> right)
-
multiply
void multiply(Mutate1D.Fillable<N> receiver, N left, Access1D<N> right)
-
negate
void negate(Mutate1D.Fillable<N> receiver, Access1D<N> argument)
-
newSameShape
abstract T newSameShape()
-
norm
double norm(Access1D.Aggregatable<N> array)
-
-