- java.lang.Object
-
- org.ojalgo.tensor.ArrayBasedTensor<N,VectorTensor<N>>
-
- org.ojalgo.tensor.VectorTensor<N>
-
- All Implemented Interfaces:
java.util.function.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 java.lang.Comparable<N>> extends ArrayBasedTensor<N,VectorTensor<N>> implements Access1D<N>, Mutate1D.Receiver<N>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classVectorTensor.Factory<N extends java.lang.Comparable<N>>-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Access1D
Access1D.Aggregatable<N extends java.lang.Comparable<N>>, Access1D.Collectable<N extends java.lang.Comparable<N>,R extends Mutate1D>, Access1D.ElementView<N extends java.lang.Comparable<N>>, Access1D.SelectionView<N extends java.lang.Comparable<N>>, Access1D.Sliceable<N extends java.lang.Comparable<N>>, Access1D.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.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
-
-
Constructor Summary
Constructors Constructor Description VectorTensor(Array1D.Factory<N> factory, int dimensions)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VectorTensor<N>add(VectorTensor<N> addend)bytebyteValue(int index)bytebyteValue(long index)VectorTensor<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()The total number of elements in this structure.doubledoubleValue(int index)doubledoubleValue(long index)booleanequals(java.lang.Object obj)static <N extends java.lang.Comparable<N>>
TensorFactory1D<N,VectorTensor<N>>factory(DenseArray.Factory<N,?> arrayFactory)floatfloatValue(int index)floatfloatValue(long index)Nget(long index)(package private) Array1D<N>getArray()inthashCode()intintValue(int index)intintValue(long index)longlongValue(int index)longlongValue(long index)VectorTensor<N>multiply(double scalarMultiplicand)VectorTensor<N>multiply(N scalarMultiplicand)VectorTensor<N>negate()The additive inverse of this.(package private) VectorTensor<N>newSameShape()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, java.lang.Comparable<?> value)shortshortValue(int index)shortshortValue(long index)intsize()The total number of elements in this structure.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, dot, elements, nonzeros, select, supplyTo, toList, toRawCopy1D
-
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.Mutate1D.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.tensor.Tensor
components, isSameShape
-
-
-
-
Constructor Detail
-
VectorTensor
VectorTensor(Array1D.Factory<N> factory, int dimensions)
-
-
Method Detail
-
factory
public static <N extends java.lang.Comparable<N>> TensorFactory1D<N,VectorTensor<N>> factory(DenseArray.Factory<N,?> arrayFactory)
-
add
public VectorTensor<N> add(VectorTensor<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(int index)
-
byteValue
public byte byteValue(long index)
-
conjugate
public VectorTensor<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 java.lang.Comparable<N>>,N extends java.lang.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 java.lang.Comparable<N>>
-
doubleValue
public double doubleValue(long index)
- Specified by:
doubleValuein interfaceAccess1D<N extends java.lang.Comparable<N>>
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classArrayBasedTensor<N extends java.lang.Comparable<N>,VectorTensor<N extends java.lang.Comparable<N>>>
-
floatValue
public float floatValue(int index)
- Specified by:
floatValuein interfaceAccess1D<N extends java.lang.Comparable<N>>
-
floatValue
public float floatValue(long index)
- Specified by:
floatValuein interfaceAccess1D<N extends java.lang.Comparable<N>>
-
get
public N get(long index)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classArrayBasedTensor<N extends java.lang.Comparable<N>,VectorTensor<N extends java.lang.Comparable<N>>>
-
intValue
public int intValue(int index)
-
intValue
public int intValue(long index)
-
longValue
public long longValue(int index)
-
longValue
public long longValue(long index)
-
multiply
public VectorTensor<N> multiply(double scalarMultiplicand)
- Specified by:
multiplyin interfaceScalarOperation.Multiplication<VectorTensor<N extends java.lang.Comparable<N>>,N extends java.lang.Comparable<N>>- Returns:
this * scalarMultiplicand.
-
multiply
public VectorTensor<N> multiply(N scalarMultiplicand)
- Specified by:
multiplyin interfaceScalarOperation.Multiplication<VectorTensor<N extends java.lang.Comparable<N>>,N extends java.lang.Comparable<N>>- Returns:
this * multiplicand.
-
negate
public VectorTensor<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())- Specified by:
normin interfaceNormedVectorSpace<VectorTensor<N extends java.lang.Comparable<N>>,N extends java.lang.Comparable<N>>- Returns:
- The norm
-
set
public void set(long index, java.lang.Comparable<?> value)
-
shortValue
public short shortValue(int index)
- Specified by:
shortValuein interfaceAccess1D<N extends java.lang.Comparable<N>>
-
shortValue
public short shortValue(long index)
- Specified by:
shortValuein interfaceAccess1D<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
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
newSameShape
VectorTensor<N> newSameShape()
- Specified by:
newSameShapein classArrayBasedTensor<N extends java.lang.Comparable<N>,VectorTensor<N extends java.lang.Comparable<N>>>
-
-