java.lang.Object
org.ojalgo.tensor.ArrayBasedTensor<N,VectorTensor<N>>
org.ojalgo.tensor.VectorTensor<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 org.ojalgo.structure.Access1D
Access1D.Aggregatable<N extends Comparable<N>>, Access1D.Collectable<N extends Comparable<N>,R extends Mutate1D>, Access1D.ElementView<N extends Comparable<N>>, Access1D.SelectionView<N extends Comparable<N>>, Access1D.Sliceable<N extends Comparable<N>>, Access1D.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.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 -
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 org.ojalgo.tensor.ArrayBasedTensor
add, dimensions, multiply, multiply, negate, norm, rank, signumMethods 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, dot, elements, nonzeros, select, supplyTo, toList, toRawCopy1DMethods inherited from interface org.ojalgo.structure.Mutate1D.Fillable
fillAll, fillAll, fillCompatible, fillMatching, fillMatching, fillMatching, fillMatching, fillRange, fillRangeMethods inherited from interface org.ojalgo.structure.Mutate1D.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.tensor.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
- Specified by:
getin interfaceAccess1D<N extends Comparable<N>>
-
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
public void set(int index, byte value) -
set
public void set(int index, double value) -
set
public void set(int index, float value) -
set
public void set(int index, int value) -
set
public void set(int index, long value) -
set
public void set(int index, short value) -
set
public void set(long index, byte value) -
set
-
set
public void set(long index, double value) -
set
public void set(long index, float value) -
set
public void set(long index, int value) -
set
public void set(long index, long value) -
set
public void set(long index, short value) -
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>>>
-