Class VectorTensor<N extends Comparable<N>>
- All Implemented Interfaces:
Consumer<Access1D<?>>, Group, Group.Additive<VectorTensor<N>>, NormedVectorSpace<VectorTensor<N>, N>, Operation, Operation.Addition<VectorTensor<N>>, ScalarOperation, ScalarOperation.Multiplication<VectorTensor<N>, N>, VectorSpace<VectorTensor<N>, N>, Access1D<N>, Mutate1D, Mutate1D.Fillable<N>, Mutate1D.Receiver<N>, Structure1D, Tensor<N, VectorTensor<N>>
public final class VectorTensor<N extends Comparable<N>>
extends ArrayBasedTensor<N, VectorTensor<N>>
implements Access1D<N>, Mutate1D.Receiver<N>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final classVectorTensor.Factory<N extends Comparable<N>>Nested classes/interfaces inherited from interface Access1D
Access1D.Aggregatable<N>, Access1D.Collectable<N,R>, Access1D.ElementView<N>, Access1D.SelectionView<N>, Access1D.Sliceable<N>, Access1D.Visitable<N> Nested classes/interfaces inherited from interface Group
Group.Additive<T>, Group.Multiplicative<T>Nested classes/interfaces inherited from interface Mutate1D
Mutate1D.Fillable<N>, Mutate1D.Mixable<N>, Mutate1D.Modifiable<N>, Mutate1D.ModifiableReceiver<N>, Mutate1D.Receiver<N>, Mutate1D.SortableNested classes/interfaces inherited from interface Operation
Operation.Addition<T>, Operation.Division<T>, Operation.Multiplication<T>, Operation.Subtraction<T>Nested classes/interfaces inherited from interface ScalarOperation
ScalarOperation.Addition<T,N>, ScalarOperation.Division<T, N>, ScalarOperation.Multiplication<T, N>, ScalarOperation.Subtraction<T, N> Nested classes/interfaces inherited from interface Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.Logical<S,B>, Structure1D.LongIndex, Structure1D.LoopCallback -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(VectorTensor<N> addend) bytebyteValue(int index) bytebyteValue(long index) This method will (most likely) be moved to some other interface in the future! Just have to figure out where it fits...longcount()The total number of elements in this structure.doubledoubleValue(int index) doubledoubleValue(long index) booleanstatic <N extends Comparable<N>>
TensorFactory1D<N, VectorTensor<N>> factory(DenseArray.Factory<N, ?> arrayFactory) floatfloatValue(int index) floatfloatValue(long index) get(long index) getArray()inthashCode()intintValue(int index) intintValue(long index) longlongValue(int index) longlongValue(long index) multiply(double scalarMultiplicand) negate()The additive inverse of this.(package private) VectorTensor<N> doublenorm()this == this.signum().multiply(this.norm())voidset(int index, byte value) voidset(int index, double value) voidset(int index, float value) voidset(int index, int value) voidset(int index, long value) voidset(int index, short value) voidset(long index, byte value) voidset(long index, double value) voidset(long index, float value) voidset(long index, int value) voidset(long index, long value) voidset(long index, short value) voidset(long index, Comparable<?> value) shortshortValue(int index) shortshortValue(long index) intsize()The total number of elements in this structure.toString()Methods inherited from class ArrayBasedTensor
add, dimensions, multiply, multiply, negate, norm, rank, signumMethods inherited from interface Access1D
asCollectable1D, asKeyed1D, asList, axpy, dot, elements, nonzeros, select, supplyTo, toList, toRawCopy1DMethods inherited from interface Mutate1D.Fillable
fillAll, fillAll, fillCompatible, fillMatching, fillMatching, fillMatching, fillMatching, fillRange, fillRangeMethods inherited from interface Mutate1D.Receiver
accept, isAcceptableMethods inherited from interface NormedVectorSpace
isSmallMethods inherited from interface ScalarOperation.Multiplication
multiplyMethods inherited from interface Tensor
components, isSameShape
-
Field Details
-
myArray
-
myFactory
-
-
Constructor Details
-
VectorTensor
VectorTensor(Array1D.Factory<N> factory, int dimensions)
-
-
Method Details
-
factory
public static <N extends Comparable<N>> TensorFactory1D<N, VectorTensor<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(int index) - Specified by:
byteValuein interfaceAccess1D<N extends Comparable<N>>
-
byteValue
public byte byteValue(long index) - Specified by:
byteValuein interfaceAccess1D<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<VectorTensor<N extends Comparable<N>>, N extends Comparable<N>>
-
count
public long count()Description copied from interface:Structure1DThe total number of elements in this structure.You only need to implement this method if the structure can contain more than Integer.MAX_VALUE elements.
- Specified by:
countin interfaceStructure1D
-
doubleValue
public double doubleValue(int index) - Specified by:
doubleValuein interfaceAccess1D<N extends Comparable<N>>
-
doubleValue
public double doubleValue(long index) - Specified by:
doubleValuein interfaceAccess1D<N extends Comparable<N>>
-
equals
- Overrides:
equalsin classArrayBasedTensor<N extends Comparable<N>, VectorTensor<N extends Comparable<N>>>
-
floatValue
public float floatValue(int index) - Specified by:
floatValuein interfaceAccess1D<N extends Comparable<N>>
-
floatValue
public float floatValue(long index) - Specified by:
floatValuein interfaceAccess1D<N extends Comparable<N>>
-
get
-
hashCode
public int hashCode()- Overrides:
hashCodein classArrayBasedTensor<N extends Comparable<N>, VectorTensor<N extends Comparable<N>>>
-
intValue
public int intValue(int index) - Specified by:
intValuein interfaceAccess1D<N extends Comparable<N>>
-
intValue
public int intValue(long index) - Specified by:
intValuein interfaceAccess1D<N extends Comparable<N>>
-
longValue
public long longValue(int index) - Specified by:
longValuein interfaceAccess1D<N extends Comparable<N>>
-
longValue
public long longValue(long index) - Specified by:
longValuein interfaceAccess1D<N extends Comparable<N>>
-
multiply
- Specified by:
multiplyin interfaceScalarOperation.Multiplication<VectorTensor<N extends Comparable<N>>, N extends Comparable<N>>- Returns:
this * scalarMultiplicand.
-
multiply
- Specified by:
multiplyin interfaceScalarOperation.Multiplication<VectorTensor<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<VectorTensor<N extends Comparable<N>>, N extends Comparable<N>>- Returns:
- The norm
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
shortValue
public short shortValue(int index) - Specified by:
shortValuein interfaceAccess1D<N extends Comparable<N>>
-
shortValue
public short shortValue(long index) - Specified by:
shortValuein interfaceAccess1D<N extends Comparable<N>>
-
size
public int size()Description copied from interface:Structure1DThe total number of elements in this structure.- Specified by:
sizein interfaceStructure1D
-
toString
-
getArray
-
newSameShape
VectorTensor<N> newSameShape()- Specified by:
newSameShapein classArrayBasedTensor<N extends Comparable<N>, VectorTensor<N extends Comparable<N>>>
-