- java.lang.Object
-
- org.ojalgo.tensor.ArrayBasedTensor<N,AnyTensor<N>>
-
- org.ojalgo.tensor.AnyTensor<N>
-
- All Implemented Interfaces:
java.util.function.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 java.lang.Comparable<N>> extends ArrayBasedTensor<N,AnyTensor<N>> implements AccessAnyD<N>, MutateAnyD.Receiver<N>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classAnyTensor.Factory<N extends java.lang.Comparable<N>>-
Nested classes/interfaces inherited from interface org.ojalgo.structure.AccessAnyD
AccessAnyD.Aggregatable<N extends java.lang.Comparable<N>>, AccessAnyD.Collectable<N extends java.lang.Comparable<N>,R extends MutateAnyD>, AccessAnyD.ElementView<N extends java.lang.Comparable<N>>, AccessAnyD.MatrixView<N extends java.lang.Comparable<N>>, AccessAnyD.SelectionView<N extends java.lang.Comparable<N>>, AccessAnyD.Sliceable<N extends java.lang.Comparable<N>>, AccessAnyD.VectorView<N extends java.lang.Comparable<N>>, AccessAnyD.Visitable<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.structure.Mutate1D
Mutate1D.Fillable<N extends java.lang.Comparable<N>>, Mutate1D.Mixable<N extends java.lang.Comparable<N>>, Mutate1D.Modifiable<N extends java.lang.Comparable<N>>, Mutate1D.ModifiableReceiver<N extends java.lang.Comparable<N>>, Mutate1D.Receiver<N extends java.lang.Comparable<N>>, Mutate1D.Sortable
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.MutateAnyD
MutateAnyD.Fillable<N extends java.lang.Comparable<N>>, MutateAnyD.Mixable<N extends java.lang.Comparable<N>>, MutateAnyD.Modifiable<N extends java.lang.Comparable<N>>, MutateAnyD.ModifiableReceiver<N extends java.lang.Comparable<N>>, MutateAnyD.Receiver<N extends java.lang.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 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>>
-
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
-
-
Constructor Summary
Constructors Constructor Description AnyTensor(ArrayAnyD.Factory<N> factory, int rank, int dimensions)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AnyTensor<N>add(AnyTensor<N> addend)bytebyteValue(long... ref)AnyTensor<N>conjugate()This method will (most likely) be moved to some other interface in the future! Just have to figure out where it fits...longcount(int dimension)count() == count(0) * count(1) * count(2) * count(3) * ...doubledoubleValue(int index)doubledoubleValue(long... ref)booleanequals(java.lang.Object obj)static <N extends java.lang.Comparable<N>>
TensorFactoryAnyD<N,AnyTensor<N>>factory(DenseArray.Factory<N,?> arrayFactory)voidfillSet(int dimension, long dimensionalIndex, N value)voidfillSet(int dimension, long dimensionalIndex, NullaryFunction<?> supplier)voidfillSet(long[] initial, int dimension, N value)voidfillSet(long[] initial, int dimension, NullaryFunction<?> supplier)floatfloatValue(long... ref)Nget(long index)Nget(long... ref)(package private) ArrayAnyD<N>getArray()inthashCode()intintValue(long... ref)longlongValue(long... ref)AnyTensor<N>multiply(double scalarMultiplicand)AnyTensor<N>multiply(N scalarMultiplicand)AnyTensor<N>negate()The additive inverse of this.(package private) AnyTensor<N>newSameShape()doublenorm()this == this.signum().multiply(this.norm())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, java.lang.Comparable<?> value)voidset(long index, java.lang.Comparable<?> value)long[]shape()shortshortValue(long... ref)intsize()The total number of elements in this structure.intsize(int dimension)java.lang.StringtoString()-
Methods inherited from class org.ojalgo.tensor.ArrayBasedTensor
add, dimensions, multiply, multiply, negate, norm, rank, signum
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods 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, toRawCopy1D
-
Methods inherited from interface org.ojalgo.structure.AccessAnyD
asCollectableAnyD, byteValue, doubleValue, elements, floatValue, get, intValue, longValue, matrices, select, shortValue, vectors
-
Methods inherited from interface org.ojalgo.structure.Mutate1D
reset, set, set, set, set, set, set, set, set, set, set, set
-
Methods inherited from interface org.ojalgo.structure.Mutate1D.Fillable
fillAll, fillAll, fillCompatible, fillMatching, fillMatching, fillMatching, fillMatching, fillRange, fillRange
-
Methods inherited from interface org.ojalgo.structure.MutateAnyD.Fillable
fillCompatible
-
Methods inherited from interface org.ojalgo.structure.MutateAnyD.Receiver
accept, isAcceptable
-
Methods inherited from interface org.ojalgo.algebra.NormedVectorSpace
isSmall
-
Methods inherited from interface org.ojalgo.algebra.ScalarOperation.Multiplication
multiply
-
Methods inherited from interface org.ojalgo.structure.Structure1D
count
-
Methods inherited from interface org.ojalgo.structure.StructureAnyD
loop, loop, loopAllReferences, loopReferences, rank
-
Methods inherited from interface org.ojalgo.tensor.Tensor
components, isSameShape
-
-
-
-
Constructor Detail
-
AnyTensor
AnyTensor(ArrayAnyD.Factory<N> factory, int rank, int dimensions)
-
-
Method Detail
-
factory
public static <N extends java.lang.Comparable<N>> TensorFactoryAnyD<N,AnyTensor<N>> factory(DenseArray.Factory<N,?> arrayFactory)
-
add
public AnyTensor<N> add(AnyTensor<N> addend)
- Specified by:
addin interfaceOperation.Addition<N extends java.lang.Comparable<N>>- Parameters:
addend- What to add- Returns:
this + addend
-
byteValue
public byte byteValue(long... ref)
- Specified by:
byteValuein interfaceAccessAnyD<N extends java.lang.Comparable<N>>
-
conjugate
public AnyTensor<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.
-
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 java.lang.Comparable<N>>
-
doubleValue
public double doubleValue(long... ref)
- Specified by:
doubleValuein interfaceAccessAnyD<N extends java.lang.Comparable<N>>
-
equals
public boolean equals(java.lang.Object obj)
-
fillSet
public void fillSet(int dimension, long dimensionalIndex, N value)- Specified by:
fillSetin interfaceMutateAnyD.Fillable<N extends java.lang.Comparable<N>>
-
fillSet
public void fillSet(int dimension, long dimensionalIndex, NullaryFunction<?> supplier)- Specified by:
fillSetin interfaceMutateAnyD.Fillable<N extends java.lang.Comparable<N>>
-
fillSet
public void fillSet(long[] initial, int dimension, N value)- Specified by:
fillSetin interfaceMutateAnyD.Fillable<N extends java.lang.Comparable<N>>
-
fillSet
public void fillSet(long[] initial, int dimension, NullaryFunction<?> supplier)- Specified by:
fillSetin interfaceMutateAnyD.Fillable<N extends java.lang.Comparable<N>>
-
floatValue
public float floatValue(long... ref)
- Specified by:
floatValuein interfaceAccessAnyD<N extends java.lang.Comparable<N>>
-
get
public N get(long... ref)
- Specified by:
getin interfaceAccessAnyD<N extends java.lang.Comparable<N>>
-
get
public N get(long index)
-
hashCode
public int hashCode()
-
intValue
public int intValue(long... ref)
- Specified by:
intValuein interfaceAccessAnyD<N extends java.lang.Comparable<N>>
-
longValue
public long longValue(long... ref)
- Specified by:
longValuein interfaceAccessAnyD<N extends java.lang.Comparable<N>>
-
negate
public AnyTensor<N> negate()
Description copied from interface:Group.AdditiveThe additive inverse of this.- Specified by:
negatein interfaceGroup.Additive<N extends java.lang.Comparable<N>>- Returns:
-this.
-
norm
public double norm()
Description copied from interface:NormedVectorSpacethis == this.signum().multiply(this.norm())
-
set
public void set(long index, java.lang.Comparable<?> value)
-
set
public void set(long[] reference, byte value)- Specified by:
setin interfaceMutateAnyD
-
set
public void set(long[] reference, java.lang.Comparable<?> value)- 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 java.lang.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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
newSameShape
AnyTensor<N> newSameShape()
- Specified by:
newSameShapein classArrayBasedTensor<N extends java.lang.Comparable<N>,AnyTensor<N extends java.lang.Comparable<N>>>
-
-