Package org.ojalgo.matrix.store
Class ZeroStore<N extends java.lang.Comparable<N>>
- java.lang.Object
-
- org.ojalgo.matrix.store.AbstractStore<N>
-
- org.ojalgo.matrix.store.FactoryStore<N>
-
- org.ojalgo.matrix.store.ZeroStore<N>
-
- All Implemented Interfaces:
Group
,Group.Additive<MatrixStore<N>>
,NormedVectorSpace<MatrixStore<N>,N>
,Operation
,Operation.Addition<MatrixStore<N>>
,Operation.Multiplication<MatrixStore<N>>
,Operation.Subtraction<MatrixStore<N>>
,ScalarOperation
,ScalarOperation.Addition<MatrixStore<N>,N>
,ScalarOperation.Division<MatrixStore<N>,N>
,ScalarOperation.Multiplication<MatrixStore<N>,N>
,ScalarOperation.Subtraction<MatrixStore<N>,N>
,VectorSpace<MatrixStore<N>,N>
,Matrix2D<N,MatrixStore<N>>
,ElementsSupplier<N>
,MatrixStore<N>
,Access1D<N>
,Access1D.Aggregatable<N>
,Access1D.Sliceable<N>
,Access1D.Visitable<N>
,Access2D<N>
,Access2D.Aggregatable<N>
,Access2D.Collectable<N,TransformableRegion<N>>
,Access2D.Sliceable<N>
,Access2D.Visitable<N>
,Operate2D<N,ElementsSupplier<N>>
,Structure1D
,Structure2D
,Structure2D.Logical<Access2D<N>,MatrixStore<N>>
,Structure2D.ReducibleTo1D<ElementsSupplier<N>>
final class ZeroStore<N extends java.lang.Comparable<N>> extends FactoryStore<N>
ZeroStore
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Access2D
Access2D.Aggregatable<N extends java.lang.Comparable<N>>, Access2D.Collectable<N extends java.lang.Comparable<N>,R extends Mutate2D>, Access2D.ColumnView<N extends java.lang.Comparable<N>>, Access2D.ElementView<N extends java.lang.Comparable<N>>, Access2D.RowView<N extends java.lang.Comparable<N>>, Access2D.SelectionView<N extends java.lang.Comparable<N>>, Access2D.Sliceable<N extends java.lang.Comparable<N>>, Access2D.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.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.Structure2D
Structure2D.IntRowColumn, Structure2D.Logical<S extends Structure2D,B extends Structure2D.Logical<S,B>>, Structure2D.LongRowColumn, Structure2D.ReducibleTo1D<R extends Structure1D>, Structure2D.Reshapable, Structure2D.RowColumnKey<R,C>, Structure2D.RowColumnMapper<R,C>
-
-
Constructor Summary
Constructors Constructor Description ZeroStore(PhysicalStore.Factory<N,?> factory, int rowsCount, int columnsCount)
ZeroStore(PhysicalStore.Factory<N,?> factory, long rowsCount, long columnsCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MatrixStore<N>
add(MatrixStore<N> addend)
MatrixStore<N>
conjugate()
Returns the conjugate transpose of this matrix.double
doubleValue(int aRow, int aCol)
Extracts one element of this matrix as a double.double
doubleValue(long anInd)
int
firstInColumn(int col)
The default value is simply0
, and if all elements are zeros thenthis.countRows()
.int
firstInRow(int row)
The default value is simply0
, and if all elements are zeros thenthis.countColumns()
.N
get(int aRow, int aCol)
int
limitOfColumn(int col)
The default value is simplythis.countRows()
, and if all elements are zeros then0
.int
limitOfRow(int row)
The default value is simplythis.countColumns()
, and if all elements are zeros then0
.ZeroStore<N>
multiply(double scalar)
ZeroStore<N>
multiply(N scalar)
ZeroStore<N>
multiply(MatrixStore<N> right)
void
multiply(Access1D<N> right, TransformableRegion<N> target)
N
multiplyBoth(Access1D<N> leftAndRight)
Assumes [leftAndRight] is a vector and will calulate [leftAndRight]H[this][leftAndRight]ZeroStore<N>
premultiply(Access1D<N> left)
Thepremultiply
method differs frommultiply
in 3 ways: The matrix positions are swapped - left/right. It does NOT return a MatrixStore but an ElementsSupplier instead. It accepts an Access1D as the argument left matrix.void
supplyTo(TransformableRegion<N> receiver)
Scalar<N>
toScalar(int row, int col)
Extracts one element of this matrix as a Scalar.MatrixStore<N>
transpose()
-
Methods inherited from class org.ojalgo.matrix.store.FactoryStore
equals, hashCode, one, physical, zero
-
Methods inherited from class org.ojalgo.matrix.store.AbstractStore
buildColumn, buildColumn, buildColumn, buildRow, buildRow, buildRow, cast, countColumns, countRows, getColDim, getComponentType, getMaxDim, getMinDim, getRowDim, isPrimitive, toString
-
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, axpy, dot, select, supplyTo, toRawCopy1D
-
Methods inherited from interface org.ojalgo.structure.Access1D.Visitable
visitAll, visitRange
-
Methods inherited from interface org.ojalgo.structure.Access2D
asCollectable2D, asKeyed2D, byteValue, byteValue, byteValue, byteValue, columns, doubleValue, doubleValue, elements, floatValue, floatValue, floatValue, floatValue, get, intValue, intValue, intValue, intValue, longValue, longValue, longValue, longValue, nonzeros, rows, shortValue, shortValue, shortValue, shortValue, toRawCopy2D
-
Methods inherited from interface org.ojalgo.structure.Access2D.Aggregatable
aggregateColumn, aggregateDiagonal, aggregateRow, reduceColumns, reduceRows
-
Methods inherited from interface org.ojalgo.structure.Access2D.Collectable
collect
-
Methods inherited from interface org.ojalgo.structure.Access2D.Sliceable
sliceColumn, sliceDiagonal, sliceRow
-
Methods inherited from interface org.ojalgo.structure.Access2D.Visitable
visitColumn, visitColumn, visitDiagonal, visitDiagonal, visitOne, visitRow, visitRow
-
Methods inherited from interface org.ojalgo.matrix.store.ElementsSupplier
onAny, onColumns, onColumns, onMatching, onMatching, onRows, onRows
-
Methods inherited from interface org.ojalgo.matrix.store.MatrixStore
above, above, above, add, add, aggregateAll, aggregateColumn, aggregateDiagonal, aggregateRange, aggregateRow, below, below, below, bidiagonal, column, column, columns, columns, copy, diagonal, diagonally, divide, divide, equals, get, get, hermitian, hessenberg, indexOfLargest, isHermitian, isNormal, isSmall, isSmall, left, left, left, limits, logical, negate, norm, offsets, onAll, operate, power, reduceColumns, reduceRows, repeat, right, right, right, row, row, rows, rows, select, select, signum, sliceColumn, sliceDiagonal, sliceRange, sliceRow, subtract, subtract, subtract, superimpose, superimpose, symmetric, triangular, tridiagonal, visitOne
-
Methods inherited from interface org.ojalgo.structure.Operate2D
onAll, onAll, onAll, onAll, onAll, onCompatible, onCompatible
-
Methods inherited from interface org.ojalgo.algebra.ScalarOperation.Addition
add
-
Methods inherited from interface org.ojalgo.algebra.ScalarOperation.Division
divide
-
Methods inherited from interface org.ojalgo.algebra.ScalarOperation.Multiplication
multiply
-
Methods inherited from interface org.ojalgo.algebra.ScalarOperation.Subtraction
subtract
-
-
-
-
Constructor Detail
-
ZeroStore
ZeroStore(PhysicalStore.Factory<N,?> factory, int rowsCount, int columnsCount)
-
ZeroStore
ZeroStore(PhysicalStore.Factory<N,?> factory, long rowsCount, long columnsCount)
-
-
Method Detail
-
add
public MatrixStore<N> add(MatrixStore<N> addend)
- Parameters:
addend
- What to add- Returns:
this + addend
-
conjugate
public MatrixStore<N> conjugate()
Description copied from interface:MatrixStore
Returns the conjugate transpose of this matrix. The conjugate transpose is also known as adjoint matrix, adjugate matrix, hermitian adjoint or hermitian transpose. (The conjugate matrix is the complex conjugate of each element. This NOT what is returned here!)- See Also:
VectorSpace.conjugate()
-
doubleValue
public double doubleValue(int aRow, int aCol)
Description copied from interface:Access2D
Extracts one element of this matrix as a double.- Parameters:
aRow
- A row index.aCol
- A column index.- Returns:
- One matrix element
-
doubleValue
public double doubleValue(long anInd)
-
firstInColumn
public int firstInColumn(int col)
Description copied from interface:Structure2D
The default value is simply0
, and if all elements are zeros thenthis.countRows()
.- Parameters:
col
- The column index- Returns:
- The row index of the first non-zero element in the specified column
-
firstInRow
public int firstInRow(int row)
Description copied from interface:Structure2D
The default value is simply0
, and if all elements are zeros thenthis.countColumns()
.- Returns:
- The column index of the first non-zero element in the specified row
-
get
public N get(int aRow, int aCol)
-
limitOfColumn
public int limitOfColumn(int col)
Description copied from interface:Structure2D
The default value is simplythis.countRows()
, and if all elements are zeros then0
.- Specified by:
limitOfColumn
in interfaceStructure2D
- Overrides:
limitOfColumn
in classAbstractStore<N extends java.lang.Comparable<N>>
- Returns:
- The row index of the first zero element, after all non-zeros, in the specified column (index of the last non-zero + 1)
-
limitOfRow
public int limitOfRow(int row)
Description copied from interface:Structure2D
The default value is simplythis.countColumns()
, and if all elements are zeros then0
.- Specified by:
limitOfRow
in interfaceStructure2D
- Overrides:
limitOfRow
in classAbstractStore<N extends java.lang.Comparable<N>>
- Returns:
- The column index of the first zero element, after all non-zeros, in the specified row (index of the last non-zero + 1)
-
multiply
public void multiply(Access1D<N> right, TransformableRegion<N> target)
-
multiply
public ZeroStore<N> multiply(MatrixStore<N> right)
- Parameters:
right
- The multiplicand- Returns:
this * multiplicand
.
-
multiplyBoth
public N multiplyBoth(Access1D<N> leftAndRight)
Description copied from interface:MatrixStore
Assumes [leftAndRight] is a vector and will calulate [leftAndRight]H[this][leftAndRight]- Specified by:
multiplyBoth
in interfaceMatrixStore<N extends java.lang.Comparable<N>>
- Overrides:
multiplyBoth
in classAbstractStore<N extends java.lang.Comparable<N>>
- Parameters:
leftAndRight
- The argument vector- Returns:
- A scalar (extracted from the resulting 1 x 1 matrix)
-
premultiply
public ZeroStore<N> premultiply(Access1D<N> left)
Description copied from interface:MatrixStore
Thepremultiply
method differs frommultiply
in 3 ways:- The matrix positions are swapped - left/right.
- It does NOT return a MatrixStore but an ElementsSupplier instead.
- It accepts an Access1D as the argument left matrix.
- Parameters:
left
- The left matrix- Returns:
- The matrix product
-
supplyTo
public void supplyTo(TransformableRegion<N> receiver)
-
toScalar
public Scalar<N> toScalar(int row, int col)
Description copied from interface:Matrix2D
Extracts one element of this matrix as a Scalar.- Parameters:
row
- A row index.col
- A column index.- Returns:
- One matrix element as a Scalar.
-
transpose
public MatrixStore<N> transpose()
- Returns:
- A transposed matrix instance.
-
-