public final class AnyTensor<N extends Comparable<N>> extends Object implements AccessAnyD<N>, MutateAnyD.Receiver<N>
AccessAnyD.Aggregatable<N extends Comparable<N>>, AccessAnyD.Collectable<N extends Comparable<N>,R extends MutateAnyD>, AccessAnyD.Sliceable<N extends Comparable<N>>, AccessAnyD.Visitable<N extends Comparable<N>>
Access1D.ElementView<N extends Comparable<N>>
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>>
Mutate1D.Sortable
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
Structure1D.BasicMapper<T>, Structure1D.IndexCallback, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.LongIndex, Structure1D.LoopCallback
Group.Additive<T>, Group.Multiplicative<T>
Operation.Addition<T>, Operation.Division<T>, Operation.Multiplication<T>, Operation.Subtraction<T>
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>>
Modifier and Type | Method and Description |
---|---|
AnyTensor<N> |
add(AnyTensor<N> addend) |
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...
|
long |
count(int dimension) |
int |
dimensions()
The range of the indices that identify the scalar components.
|
double |
doubleValue(long[] ref) |
boolean |
equals(Object obj) |
static <N extends Comparable<N>> |
factory(DenseArray.Factory<N> arrayFactory) |
void |
fillOne(long[] reference,
N value) |
void |
fillOne(long[] reference,
NullaryFunction<?> supplier) |
void |
fillOne(long index,
Access1D<?> values,
long valueIndex) |
void |
fillOne(long index,
N value) |
void |
fillOne(long index,
NullaryFunction<?> supplier) |
void |
fillSet(int dimension,
long dimensionalIndex,
N value) |
void |
fillSet(int dimension,
long dimensionalIndex,
NullaryFunction<?> supplier) |
void |
fillSet(long[] initial,
int dimension,
N value) |
void |
fillSet(long[] initial,
int dimension,
NullaryFunction<?> supplier) |
N |
get(long[] ref) |
int |
hashCode() |
AnyTensor<N> |
multiply(double scalarMultiplicand) |
AnyTensor<N> |
multiply(N scalarMultiplicand) |
AnyTensor<N> |
negate()
The additive inverse of this.
|
double |
norm()
this == this.signum().multiply(this.norm()) |
int |
rank()
The total number of indices required to uniquely identify each scalar component is called the order,
degree or rank of the tensor.
|
void |
set(long[] reference,
Comparable<?> value) |
void |
set(long[] reference,
double value) |
long[] |
shape() |
T |
signum()
this == this.signum().multiply(this.norm()) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
asCollectableAnyD, asPrimitiveAnyD, byteValue, byteValue, doubleValue, equals, floatValue, floatValue, get, intValue, intValue, longValue, longValue, matrices, shortValue, shortValue, toString, vectors
asCollectable1D, asPrimitive1D, axpy, dot, elements, equals, hashCode, nonzeros, supplyTo, toRawCopy1D, toString, wrap, wrap, wrap
accept, isAcceptable
set, set, set, set
copyComplexArgument, copyComplexImaginary, copyComplexModulus, copyComplexModulusAndArgument, copyComplexReal, copyComplexRealAndImaginary, reset
count, count, count, count, count, index, index, loop, loop, loop, loopAll, loopMatching, mapperOf, rank, reference, shape, step, step, step, step
fillAll, fillAll, fillMatching, fillMatching, fillMatching, fillRange, fillRange
index, loopAll, loopMatching, loopRange, mapper, size, toIntIndexes
components, isSameShape
isSmall
multiply
public static <N extends Comparable<N>> TensorFactoryAnyD<N,AnyTensor<N>> factory(DenseArray.Factory<N> arrayFactory)
public AnyTensor<N> add(AnyTensor<N> addend)
add
in interface Operation.Addition<AnyTensor<N extends Comparable<N>>>
addend
- What to addthis + addend
public AnyTensor<N> conjugate()
VectorSpace
This 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.
conjugate
in interface VectorSpace<AnyTensor<N extends Comparable<N>>,N extends Comparable<N>>
public long count(int dimension)
count
in interface StructureAnyD
public double doubleValue(long[] ref)
doubleValue
in interface AccessAnyD<N extends Comparable<N>>
public boolean equals(Object obj)
public void fillOne(long index, Access1D<?> values, long valueIndex)
fillOne
in interface Mutate1D.Fillable<N extends Comparable<N>>
public void fillOne(long index, N value)
fillOne
in interface Mutate1D.Fillable<N extends Comparable<N>>
public void fillOne(long index, NullaryFunction<?> supplier)
fillOne
in interface Mutate1D.Fillable<N extends Comparable<N>>
public void fillOne(long[] reference, N value)
fillOne
in interface MutateAnyD.Fillable<N extends Comparable<N>>
public void fillOne(long[] reference, NullaryFunction<?> supplier)
fillOne
in interface MutateAnyD.Fillable<N extends Comparable<N>>
public void fillSet(int dimension, long dimensionalIndex, N value)
fillSet
in interface MutateAnyD.Fillable<N extends Comparable<N>>
public void fillSet(int dimension, long dimensionalIndex, NullaryFunction<?> supplier)
fillSet
in interface MutateAnyD.Fillable<N extends Comparable<N>>
public void fillSet(long[] initial, int dimension, N value)
fillSet
in interface MutateAnyD.Fillable<N extends Comparable<N>>
public void fillSet(long[] initial, int dimension, NullaryFunction<?> supplier)
fillSet
in interface MutateAnyD.Fillable<N extends Comparable<N>>
public N get(long[] ref)
get
in interface AccessAnyD<N extends Comparable<N>>
public int hashCode()
public AnyTensor<N> multiply(double scalarMultiplicand)
multiply
in interface ScalarOperation.Multiplication<AnyTensor<N extends Comparable<N>>,N extends Comparable<N>>
this * scalarMultiplicand
.public AnyTensor<N> multiply(N scalarMultiplicand)
multiply
in interface ScalarOperation.Multiplication<AnyTensor<N extends Comparable<N>>,N extends Comparable<N>>
this * multiplicand
.public AnyTensor<N> negate()
Group.Additive
negate
in interface Group.Additive<AnyTensor<N extends Comparable<N>>>
-this
.public double norm()
NormedVectorSpace
this == this.signum().multiply(this.norm())
norm
in interface NormedVectorSpace<AnyTensor<N extends Comparable<N>>,N extends Comparable<N>>
public void set(long[] reference, Comparable<?> value)
set
in interface MutateAnyD
public void set(long[] reference, double value)
set
in interface MutateAnyD
public long[] shape()
shape
in interface StructureAnyD
public final int dimensions()
Tensor
dimensions
in interface Tensor<N extends Comparable<N>,T extends org.ojalgo.tensor.ArrayBasedTensor<N,T>>
public final int rank()
Tensor
rank
in interface Tensor<N extends Comparable<N>,T extends org.ojalgo.tensor.ArrayBasedTensor<N,T>>
public T signum()
NormedVectorSpace
this == this.signum().multiply(this.norm())
signum
in interface NormedVectorSpace<T extends org.ojalgo.tensor.ArrayBasedTensor<N,T>,N extends Comparable<N>>
Copyright © 2022 Optimatika. All rights reserved.