java.lang.Object
org.ojalgo.tensor.AnyTensor<N>
- All Implemented Interfaces:
Consumer<AccessAnyD<?>>,Group,Group.Additive<AnyTensor<N>>,NormedVectorSpace<AnyTensor<N>,,N> Operation,Operation.Addition<AnyTensor<N>>,ScalarOperation,ScalarOperation.Multiplication<AnyTensor<N>,,N> VectorSpace<AnyTensor<N>,,N> Access1D<N>,AccessAnyD<N>,Mutate1D,Mutate1D.Fillable<N>,MutateAnyD,MutateAnyD.Fillable<N>,MutateAnyD.Receiver<N>,Structure1D,StructureAnyD,Tensor<N,AnyTensor<N>>
public final class AnyTensor<N extends Comparable<N>>
extends Object
implements AccessAnyD<N>, MutateAnyD.Receiver<N>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ojalgo.structure.AccessAnyD
AccessAnyD.Aggregatable<N extends Comparable<N>>, AccessAnyD.Collectable<N extends Comparable<N>,R extends MutateAnyD>, AccessAnyD.ElementView<N extends Comparable<N>>, AccessAnyD.MatrixView<N extends Comparable<N>>, AccessAnyD.SelectionView<N extends Comparable<N>>, AccessAnyD.Sliceable<N extends Comparable<N>>, AccessAnyD.VectorView<N extends Comparable<N>>, AccessAnyD.Visitable<N extends 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.structure.Mutate1D
Mutate1D.Fillable<N extends Comparable<N>>, Mutate1D.Mixable<N extends Comparable<N>>, Mutate1D.Modifiable<N extends Comparable<N>>, Mutate1D.ModifiableReceiver<N extends Comparable<N>>, Mutate1D.Receiver<N extends Comparable<N>>, Mutate1D.SortableNested classes/interfaces inherited from interface org.ojalgo.structure.MutateAnyD
MutateAnyD.Fillable<N extends Comparable<N>>, MutateAnyD.Mixable<N extends Comparable<N>>, MutateAnyD.Modifiable<N extends Comparable<N>>, MutateAnyD.ModifiableReceiver<N extends Comparable<N>>, MutateAnyD.Receiver<N extends Comparable<N>>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>> Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.Logical<S extends Structure1D,B extends Structure1D.Logical<S, B>>, Structure1D.LongIndex, Structure1D.LoopCallback Nested classes/interfaces inherited from interface org.ojalgo.structure.StructureAnyD
StructureAnyD.IntReference, StructureAnyD.Logical<S extends StructureAnyD,B extends StructureAnyD.Logical<S, B>>, StructureAnyD.LongReference, StructureAnyD.ReducibleTo1D<R extends Structure1D>, StructureAnyD.ReducibleTo2D<R extends Structure2D>, StructureAnyD.ReferenceCallback, StructureAnyD.ReferenceMapper, StructureAnyD.Reshapable -
Method Summary
Modifier and TypeMethodDescriptionbytebyteValue(long... ref) This method will (most likely) be moved to some other interface in the future!longcount(int dimension) count() == count(0) * count(1) * count(2) * count(3) * ...final intThe range of the indices that identify the scalar components.doubledoubleValue(int index) doubledoubleValue(long... ref) booleanstatic <N extends Comparable<N>>
TensorFactoryAnyD<N, AnyTensor<N>> factory(DenseArray.Factory<N, ?> arrayFactory) voidvoidfillSet(int dimension, long dimensionalIndex, NullaryFunction<?> supplier) voidvoidfillSet(long[] initial, int dimension, NullaryFunction<?> supplier) floatfloatValue(long... ref) get(long index) get(long... ref) inthashCode()intintValue(long... ref) longlongValue(long... ref) multiply(double scalarMultiplicand) negate()The additive inverse of this.doublenorm()this == this.signum().multiply(this.norm())final intrank()The total number of indices required to uniquely identify each scalar component is called the order, degree or rank of the tensor.voidset(int index, double value) voidset(long[] reference, byte value) voidset(long[] reference, double value) voidset(long[] reference, float value) voidset(long[] reference, int value) voidset(long[] reference, long value) voidset(long[] reference, short value) voidset(long[] reference, Comparable<?> value) voidset(long index, Comparable<?> value) long[]shape()shortshortValue(long... ref) signum()this == this.signum().multiply(this.norm())intsize()The total number of elements in this structure.intsize(int dimension) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ojalgo.structure.Access1D
asCollectable1D, asKeyed1D, asList, axpy, byteValue, byteValue, dot, doubleValue, floatValue, floatValue, intValue, intValue, longValue, longValue, nonzeros, select, shortValue, shortValue, supplyTo, toList, toRawCopy1DMethods inherited from interface org.ojalgo.structure.AccessAnyD
asCollectableAnyD, byteValue, doubleValue, elements, floatValue, get, intValue, longValue, matrices, select, shortValue, vectorsMethods inherited from interface org.ojalgo.structure.Mutate1D
reset, set, set, set, set, set, set, set, set, set, set, setMethods inherited from interface org.ojalgo.structure.Mutate1D.Fillable
fillAll, fillAll, fillCompatible, fillMatching, fillMatching, fillMatching, fillMatching, fillRange, fillRangeMethods inherited from interface org.ojalgo.structure.MutateAnyD.Fillable
fillCompatibleMethods inherited from interface org.ojalgo.structure.MutateAnyD.Receiver
accept, isAcceptableMethods inherited from interface org.ojalgo.algebra.NormedVectorSpace
isSmallMethods inherited from interface org.ojalgo.algebra.ScalarOperation.Multiplication
multiplyMethods inherited from interface org.ojalgo.structure.Structure1D
countMethods inherited from interface org.ojalgo.structure.StructureAnyD
loop, loop, loopAllReferences, loopReferences, rankMethods inherited from interface org.ojalgo.tensor.Tensor
components, isSameShape
-
Method Details
-
factory
public static <N extends Comparable<N>> TensorFactoryAnyD<N,AnyTensor<N>> factory(DenseArray.Factory<N, ?> arrayFactory) -
add
- Specified by:
addin interfaceOperation.Addition<N extends Comparable<N>>- Parameters:
addend- What to add- Returns:
this + addend
-
byteValue
public byte byteValue(long... ref) - Specified by:
byteValuein interfaceAccessAnyD<N extends Comparable<N>>
-
conjugate
Description copied from interface:VectorSpaceThis method will (most likely) be moved to some other interface in the future! Just have to figure out where it fits...
The conjugate transpose of a matrix and/or the conjugate of a scalar/field like ComplexNumber or Quaternion.
The conjugate transpose of a real matrix is simply its transpose.
- Specified by:
conjugatein interfaceVectorSpace<AnyTensor<N extends Comparable<N>>,N extends Comparable<N>>
-
count
public long count(int dimension) Description copied from interface:StructureAnyDcount() == count(0) * count(1) * count(2) * count(3) * ...- Specified by:
countin interfaceStructureAnyD
-
doubleValue
public double doubleValue(int index) - Specified by:
doubleValuein interfaceAccess1D<N extends Comparable<N>>
-
doubleValue
public double doubleValue(long... ref) - Specified by:
doubleValuein interfaceAccessAnyD<N extends Comparable<N>>
-
equals
-
fillSet
- Specified by:
fillSetin interfaceMutateAnyD.Fillable<N extends Comparable<N>>
-
fillSet
- Specified by:
fillSetin interfaceMutateAnyD.Fillable<N extends Comparable<N>>
-
fillSet
- Specified by:
fillSetin interfaceMutateAnyD.Fillable<N extends Comparable<N>>
-
fillSet
- Specified by:
fillSetin interfaceMutateAnyD.Fillable<N extends Comparable<N>>
-
floatValue
public float floatValue(long... ref) - Specified by:
floatValuein interfaceAccessAnyD<N extends Comparable<N>>
-
get
- Specified by:
getin interfaceAccessAnyD<N extends Comparable<N>>
-
get
- Specified by:
getin interfaceAccess1D<N extends Comparable<N>>
-
hashCode
public int hashCode() -
intValue
public int intValue(long... ref) - Specified by:
intValuein interfaceAccessAnyD<N extends Comparable<N>>
-
longValue
public long longValue(long... ref) - Specified by:
longValuein interfaceAccessAnyD<N extends Comparable<N>>
-
multiply
- Specified by:
multiplyin interfaceScalarOperation.Multiplication<AnyTensor<N extends Comparable<N>>,N extends Comparable<N>> - Returns:
this * scalarMultiplicand.
-
multiply
- Specified by:
multiplyin interfaceScalarOperation.Multiplication<AnyTensor<N extends Comparable<N>>,N extends Comparable<N>> - Returns:
this * multiplicand.
-
negate
Description copied from interface:Group.AdditiveThe additive inverse of this.- Specified by:
negatein interfaceGroup.Additive<N extends Comparable<N>>- Returns:
-this.
-
norm
public double norm()Description copied from interface:NormedVectorSpacethis == this.signum().multiply(this.norm())- Specified by:
normin interfaceNormedVectorSpace<AnyTensor<N extends Comparable<N>>,N extends Comparable<N>> - Returns:
- The norm
-
set
public void set(int index, double value) -
set
-
set
public void set(long[] reference, byte value) - Specified by:
setin interfaceMutateAnyD
-
set
- Specified by:
setin interfaceMutateAnyD
-
set
public void set(long[] reference, double value) - Specified by:
setin interfaceMutateAnyD
-
set
public void set(long[] reference, float value) - Specified by:
setin interfaceMutateAnyD
-
set
public void set(long[] reference, int value) - Specified by:
setin interfaceMutateAnyD
-
set
public void set(long[] reference, long value) - Specified by:
setin interfaceMutateAnyD
-
set
public void set(long[] reference, short value) - Specified by:
setin interfaceMutateAnyD
-
shape
public long[] shape()- Specified by:
shapein interfaceStructureAnyD
-
shortValue
public short shortValue(long... ref) - Specified by:
shortValuein interfaceAccessAnyD<N extends Comparable<N>>
-
size
public int size()Description copied from interface:Structure1DThe total number of elements in this structure.- Specified by:
sizein interfaceStructure1D
-
size
public int size(int dimension) - Specified by:
sizein interfaceStructureAnyD
-
toString
-
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 org.ojalgo.tensor.ArrayBasedTensor<N, T>>
-
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 org.ojalgo.tensor.ArrayBasedTensor<N, T>>
-
signum
Description copied from interface:NormedVectorSpacethis == this.signum().multiply(this.norm())- Specified by:
signumin interfaceNormedVectorSpace<N extends Comparable<N>,T extends org.ojalgo.tensor.ArrayBasedTensor<N, T>> - Returns:
- A unit "vector"
-