Module ojalgo
Package org.ojalgo.matrix.store
Interface MatrixStore<N extends java.lang.Comparable<N>>
-
- All Superinterfaces:
Access1D<N>,Access1D.Aggregatable<N>,Access1D.Collectable<N,Mutate1D>,Access1D.Sliceable<N>,Access1D.Visitable<N>,Access2D<N>,Access2D.Aggregatable<N>,Access2D.Collectable<N,TransformableRegion<N>>,Access2D.Sliceable<N>,Access2D.Visitable<N>,ElementsSupplier<N>,Group,Group.Additive<MatrixStore<N>>,Matrix2D<N,MatrixStore<N>>,NormedVectorSpace<MatrixStore<N>,N>,Operate2D<N,ElementsSupplier<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>,Structure1D,Structure2D,Structure2D.Logical<Access2D<N>,MatrixStore<N>>,Structure2D.ReducibleTo1D<ElementsSupplier<N>>,VectorSpace<MatrixStore<N>,N>
- All Known Subinterfaces:
DecompositionStore<N>,PhysicalStore<N>
- All Known Implementing Classes:
AboveBelowStore,AbstractStore,ColumnsStore,ColumnsSupplier,ComposingStore,CompressedSparseR064,ConjugatedStore,DiagonalStore,FactoryStore,GenericStore,IdentityStore,ImageData,ImageData.SingleChannel,LeftRightStore,LimitStore,LogicalStore,LowerHessenbergStore,LowerSymmetricStore,LowerTriangularStore,OffsetStore,R032Store,R064CSC,R064CSR,R064Store,RawStore,RepeatedColumnsStore,RepeatedRowsStore,RowsStore,RowsSupplier,SelectingStore,ShadingStore,SingleStore,SparseStore,SuperimposedStore,TransjugatedStore,TransposedStore,UnaryOperatoStore,UpperHessenbergStore,UpperSymmetricStore,UpperTriangularStore,WrapperStore,ZeroStore
public interface MatrixStore<N extends java.lang.Comparable<N>> extends Matrix2D<N,MatrixStore<N>>, ElementsSupplier<N>, Access2D.Visitable<N>, Access2D.Sliceable<N>, Structure2D.ReducibleTo1D<ElementsSupplier<N>>, Structure2D.Logical<Access2D<N>,MatrixStore<N>>, Access1D.Collectable<N,Mutate1D>
A MatrixStore is a two dimensional store of numbers/scalars.
A MatrixStore extends Access2D (as well as Access2D.Visitable and org.ojalgo.structure.Access2D.Elements) and defines some further functionality - mainly matrix multiplication.
This interface does not define any methods that require implementations to alter the matrix. Either the methods return matrix elements, some meta data or produce new instances.
The methods conjugate(), copy() and transpose() return PhysicalStore instances. PhysicalStore extends MatrixStore. It defines additional methods, and is mutable.
-
-
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>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default MatrixStore<N>above(long numberOfRows)default MatrixStore<N>above(Access2D<N> matrix)default MatrixStore<N>above(Access2D<N>... matrices)default MatrixStore<N>add(double scalarAddend)default MatrixStore<N>add(N scalarAddend)default MatrixStore<N>add(MatrixStore<N> addend)default NaggregateAll(Aggregator aggregator)default NaggregateColumn(long row, long col, Aggregator aggregator)default NaggregateDiagonal(long row, long col, Aggregator aggregator)default NaggregateRange(long first, long limit, Aggregator aggregator)default NaggregateRow(long row, long col, Aggregator aggregator)default MatrixStore<N>below(long numberOfRows)default MatrixStore<N>below(Access2D<N> matrix)default MatrixStore<N>below(Access2D<N>... matrices)default MatrixStore<N>bidiagonal(boolean upper)default MatrixStore<N>column(int column)default MatrixStore<N>column(long column)default MatrixStore<N>columns(int... columns)A selection (re-ordering) of columns.default MatrixStore<N>columns(long... columns)default MatrixStore<N>conjugate()Returns the conjugate transpose of this matrix.default PhysicalStore<N>copy()Each call must produce a new instance.default MatrixStore<N>diagonal()default MatrixStore<N>diagonally(Access2D<N>... diagonally)default MatrixStore<N>divide(double scalarDivisor)default MatrixStore<N>divide(N scalarDivisor)default doubledoubleValue(int row, int col)Extracts one element of this matrix as a double.default booleanequals(MatrixStore<N> other, NumberContext context)default MatrixStore<N>get()Deprecated.v50 No need asMatrixStorenow implementsLogicaland this method simply return "this".Nget(int row, int col)default Nget(long row, long col)default MatrixStore<N>hermitian(boolean upper)Similar toStructure2D.Logical.symmetric(boolean)but in addition the mirrored elements are conjugated.default MatrixStore<N>hessenberg(boolean upper)default longindexOfLargest()default booleanisHermitian()default booleanisNormal()default booleanisSmall(double comparedTo)default booleanisSmall(long row, long col, double comparedTo)default MatrixStore<N>left(long numberOfColumns)default MatrixStore<N>left(Access2D<N> matrix)default MatrixStore<N>left(Access2D<N>... matrices)default MatrixStore<N>limits(long rowLimit, long columnLimit)Setting either limit to < 0 is interpreted as "no limit" (useful when you only want to limit either the rows or columns, and don't know the size of the other)default MatrixStore<N>logical()Deprecated.v50 No need asMatrixStorenow implementsLogical.default MatrixStore<N>multiply(double scalarMultiplicand)default MatrixStore<N>multiply(N scalarMultiplicand)default MatrixStore<N>multiply(MatrixStore<N> right)default voidmultiply(Access1D<N> right, TransformableRegion<N> target)default NmultiplyBoth(Access1D<N> leftAndRight)Assumes [leftAndRight] is a vector and will calulate [leftAndRight]H[this][leftAndRight]default MatrixStore<N>negate()The additive inverse of this.default doublenorm()this == this.signum().multiply(this.norm())default MatrixStore<N>offsets(long rowOffset, long columnOffset)default MatrixStore<N>onAll(UnaryFunction<N> operator)default ElementsSupplier<N>operate()PhysicalStore.Factory<N,?>physical()default MatrixStore<N>power(int power)Multiply this matrix by itselfpowertimes.default ElementsSupplier<N>premultiply(Access1D<N> left)Thepremultiplymethod differs frommultiplyin 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.default ElementsSupplier<N>reduceColumns(Aggregator aggregator)default ElementsSupplier<N>reduceRows(Aggregator aggregator)default MatrixStore<N>repeat(int rowsRepetitions, int columnsRepetitions)Will repeat this structure creating a new structure with a multiple of rows and columns.default MatrixStore<N>right(long numberOfColumns)default MatrixStore<N>right(Access2D<N> matrix)default MatrixStore<N>right(Access2D<N>... matrices)default MatrixStore<N>row(int row)default MatrixStore<N>row(long row)default MatrixStore<N>rows(int... rows)A selection (re-ordering) of rows.default MatrixStore<N>rows(long... rows)default MatrixStore<N>select(int[] rows, int[] columns)default MatrixStore<N>select(long[] rows, long[] columns)Creates a view of the underlying data structure of only the selected elements.default MatrixStore<N>signum()this == this.signum().multiply(this.norm())default Access1D<N>sliceColumn(long row, long col)default Access1D<N>sliceDiagonal(long row, long col)default Access1D<N>sliceRange(long first, long limit)default Access1D<N>sliceRow(long row, long col)default MatrixStore<N>subtract(double scalarSubtrahend)default MatrixStore<N>subtract(N scalarSubtrahend)default MatrixStore<N>subtract(MatrixStore<N> subtrahend)default MatrixStore<N>superimpose(long row, long col, Access2D<N> matrix)default MatrixStore<N>superimpose(Access2D<N> matrix)default voidsupplyTo(TransformableRegion<N> receiver)default voidsupplyTo(Mutate1D receiver)default MatrixStore<N>symmetric(boolean upper)Defines a symmetricStructure2D(matrix) by mirroring one half (diagonally) on the other.default Scalar<N>toScalar(int row, int col)Extracts one element of this matrix as a Scalar.default MatrixStore<N>transpose()default MatrixStore<N>triangular(boolean upper, boolean assumeOne)default MatrixStore<N>tridiagonal()default voidvisitOne(long row, long col, VoidFunction<N> visitor)-
Methods inherited from interface org.ojalgo.structure.Access1D
asCollectable1D, asKeyed1D, asList, axpy, dot, select, supplyTo, toList, toRawCopy1D
-
Methods inherited from interface org.ojalgo.structure.Access1D.Collectable
collect
-
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, 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.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
-
Methods inherited from interface org.ojalgo.structure.Structure2D
count, countColumns, countRows, firstInColumn, firstInRow, getColDim, getMaxDim, getMinDim, getRowDim, isEmpty, isFat, isScalar, isSquare, isTall, isVector, limitOfColumn, limitOfRow, size
-
-
-
-
Method Detail
-
above
default MatrixStore<N> above(Access2D<N>... matrices)
- Specified by:
abovein interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
above
default MatrixStore<N> above(Access2D<N> matrix)
- Specified by:
abovein interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
above
default MatrixStore<N> above(long numberOfRows)
- Specified by:
abovein interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
add
default MatrixStore<N> add(double scalarAddend)
- Specified by:
addin interfaceScalarOperation.Addition<MatrixStore<N extends java.lang.Comparable<N>>,N extends java.lang.Comparable<N>>- Returns:
this + scalarAddend.
-
add
default MatrixStore<N> add(MatrixStore<N> addend)
- Specified by:
addin interfaceOperation.Addition<N extends java.lang.Comparable<N>>- Parameters:
addend- What to add- Returns:
this + addend
-
add
default MatrixStore<N> add(N scalarAddend)
- Specified by:
addin interfaceScalarOperation.Addition<MatrixStore<N extends java.lang.Comparable<N>>,N extends java.lang.Comparable<N>>- Returns:
this + scalarAddend.
-
aggregateAll
default N aggregateAll(Aggregator aggregator)
- Specified by:
aggregateAllin interfaceAccess1D.Aggregatable<N extends java.lang.Comparable<N>>
-
aggregateColumn
default N aggregateColumn(long row, long col, Aggregator aggregator)
- Specified by:
aggregateColumnin interfaceAccess2D.Aggregatable<N extends java.lang.Comparable<N>>
-
aggregateDiagonal
default N aggregateDiagonal(long row, long col, Aggregator aggregator)
- Specified by:
aggregateDiagonalin interfaceAccess2D.Aggregatable<N extends java.lang.Comparable<N>>
-
aggregateRange
default N aggregateRange(long first, long limit, Aggregator aggregator)
- Specified by:
aggregateRangein interfaceAccess1D.Aggregatable<N extends java.lang.Comparable<N>>
-
aggregateRow
default N aggregateRow(long row, long col, Aggregator aggregator)
- Specified by:
aggregateRowin interfaceAccess2D.Aggregatable<N extends java.lang.Comparable<N>>
-
below
default MatrixStore<N> below(Access2D<N>... matrices)
- Specified by:
belowin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
below
default MatrixStore<N> below(Access2D<N> matrix)
- Specified by:
belowin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
below
default MatrixStore<N> below(long numberOfRows)
- Specified by:
belowin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
bidiagonal
default MatrixStore<N> bidiagonal(boolean upper)
- Specified by:
bidiagonalin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
column
default MatrixStore<N> column(int column)
- Specified by:
columnin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>- See Also:
Structure2D.Logical.columns(int[])
-
column
default MatrixStore<N> column(long column)
- Specified by:
columnin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>- See Also:
Structure2D.Logical.columns(int[])
-
columns
default MatrixStore<N> columns(int... columns)
A selection (re-ordering) of columns. Note that it's ok to reference the same base column more than once, and any negative column reference/index will translate to a column of zeros. The number of columns in the resulting matrix is the same as the number of elements in the columns index array.
-
columns
default MatrixStore<N> columns(long... columns)
- Specified by:
columnsin interfaceAccess2D<N extends java.lang.Comparable<N>>- Specified by:
columnsin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>- See Also:
Structure2D.Logical.columns(int[])
-
conjugate
default MatrixStore<N> conjugate()
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!)- Specified by:
conjugatein interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>- Specified by:
conjugatein interfaceVectorSpace<MatrixStore<N extends java.lang.Comparable<N>>,N extends java.lang.Comparable<N>>- See Also:
VectorSpace.conjugate()
-
copy
default PhysicalStore<N> copy()
Each call must produce a new instance.- Returns:
- A new PhysicalStore copy.
-
diagonal
default MatrixStore<N> diagonal()
- Specified by:
diagonalin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>- Returns:
- A diagonal matrix (main diagonal only)
-
diagonally
default MatrixStore<N> diagonally(Access2D<N>... diagonally)
- Specified by:
diagonallyin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
divide
default MatrixStore<N> divide(double scalarDivisor)
- Specified by:
dividein interfaceScalarOperation.Division<MatrixStore<N extends java.lang.Comparable<N>>,N extends java.lang.Comparable<N>>- Returns:
this / scalarDivisor.
-
divide
default MatrixStore<N> divide(N scalarDivisor)
- Specified by:
dividein interfaceScalarOperation.Division<MatrixStore<N extends java.lang.Comparable<N>>,N extends java.lang.Comparable<N>>- Returns:
this / scalarDivisor.
-
doubleValue
default double doubleValue(int row, int col)Description copied from interface:Access2DExtracts one element of this matrix as a double.- Specified by:
doubleValuein interfaceAccess2D<N extends java.lang.Comparable<N>>- Parameters:
row- A row index.col- A column index.- Returns:
- One matrix element
-
equals
default boolean equals(MatrixStore<N> other, NumberContext context)
-
get
@Deprecated default MatrixStore<N> get()
Deprecated.v50 No need asMatrixStorenow implementsLogicaland this method simply return "this".
-
get
N get(int row, int col)
-
get
default N get(long row, long col)
-
hermitian
default MatrixStore<N> hermitian(boolean upper)
Description copied from interface:Structure2D.LogicalSimilar toStructure2D.Logical.symmetric(boolean)but in addition the mirrored elements are conjugated.- Specified by:
hermitianin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
hessenberg
default MatrixStore<N> hessenberg(boolean upper)
- Specified by:
hessenbergin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
indexOfLargest
default long indexOfLargest()
- Specified by:
indexOfLargestin interfaceAccess1D.Aggregatable<N extends java.lang.Comparable<N>>
-
isHermitian
default boolean isHermitian()
-
isNormal
default boolean isNormal()
-
isSmall
default boolean isSmall(double comparedTo)
- Specified by:
isSmallin interfaceNormedVectorSpace<MatrixStore<N extends java.lang.Comparable<N>>,N extends java.lang.Comparable<N>>- Parameters:
comparedTo- What to compare with- Returns:
- true if this is small compared to the magnitude of the input reference value.
-
isSmall
default boolean isSmall(long row, long col, double comparedTo)
-
left
default MatrixStore<N> left(Access2D<N>... matrices)
- Specified by:
leftin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
left
default MatrixStore<N> left(Access2D<N> matrix)
- Specified by:
leftin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
left
default MatrixStore<N> left(long numberOfColumns)
- Specified by:
leftin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
limits
default MatrixStore<N> limits(long rowLimit, long columnLimit)
Setting either limit to < 0 is interpreted as "no limit" (useful when you only want to limit either the rows or columns, and don't know the size of the other)- Specified by:
limitsin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
logical
@Deprecated default MatrixStore<N> logical()
Deprecated.v50 No need asMatrixStorenow implementsLogical.
-
multiply
default void multiply(Access1D<N> right, TransformableRegion<N> target)
-
multiply
default MatrixStore<N> multiply(double scalarMultiplicand)
- Specified by:
multiplyin interfaceScalarOperation.Multiplication<MatrixStore<N extends java.lang.Comparable<N>>,N extends java.lang.Comparable<N>>- Returns:
this * scalarMultiplicand.
-
multiply
default MatrixStore<N> multiply(MatrixStore<N> right)
- Specified by:
multiplyin interfaceOperation.Multiplication<N extends java.lang.Comparable<N>>- Parameters:
right- The multiplicand- Returns:
this * multiplicand.
-
multiply
default MatrixStore<N> multiply(N scalarMultiplicand)
- Specified by:
multiplyin interfaceScalarOperation.Multiplication<MatrixStore<N extends java.lang.Comparable<N>>,N extends java.lang.Comparable<N>>- Returns:
this * multiplicand.
-
multiplyBoth
default N multiplyBoth(Access1D<N> leftAndRight)
Assumes [leftAndRight] is a vector and will calulate [leftAndRight]H[this][leftAndRight]- Parameters:
leftAndRight- The argument vector- Returns:
- A scalar (extracted from the resulting 1 x 1 matrix)
-
negate
default MatrixStore<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
default double norm()
Description copied from interface:NormedVectorSpacethis == this.signum().multiply(this.norm())- Specified by:
normin interfaceNormedVectorSpace<MatrixStore<N extends java.lang.Comparable<N>>,N extends java.lang.Comparable<N>>- Returns:
- The norm
-
offsets
default MatrixStore<N> offsets(long rowOffset, long columnOffset)
- Specified by:
offsetsin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
onAll
default MatrixStore<N> onAll(UnaryFunction<N> operator)
-
operate
default ElementsSupplier<N> operate()
-
physical
PhysicalStore.Factory<N,?> physical()
-
power
default MatrixStore<N> power(int power)
Multiply this matrix by itselfpowertimes.- Specified by:
powerin interfaceOperation.Multiplication<N extends java.lang.Comparable<N>>
-
premultiply
default ElementsSupplier<N> premultiply(Access1D<N> left)
Thepremultiplymethod differs frommultiplyin 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
-
reduceColumns
default ElementsSupplier<N> reduceColumns(Aggregator aggregator)
- Specified by:
reduceColumnsin interfaceStructure2D.ReducibleTo1D<N extends java.lang.Comparable<N>>
-
reduceRows
default ElementsSupplier<N> reduceRows(Aggregator aggregator)
- Specified by:
reduceRowsin interfaceStructure2D.ReducibleTo1D<N extends java.lang.Comparable<N>>
-
repeat
default MatrixStore<N> repeat(int rowsRepetitions, int columnsRepetitions)
Description copied from interface:Structure2D.LogicalWill repeat this structure creating a new structure with a multiple of rows and columns.- Specified by:
repeatin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>- Parameters:
rowsRepetitions- The number of times to repeat the rowscolumnsRepetitions- The number of times to repeat the columns- Returns:
- The builder
-
right
default MatrixStore<N> right(Access2D<N>... matrices)
- Specified by:
rightin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
right
default MatrixStore<N> right(Access2D<N> matrix)
- Specified by:
rightin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
right
default MatrixStore<N> right(long numberOfColumns)
- Specified by:
rightin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
row
default MatrixStore<N> row(int row)
- Specified by:
rowin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>- See Also:
Structure2D.Logical.rows(int[])
-
row
default MatrixStore<N> row(long row)
- Specified by:
rowin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>- See Also:
Structure2D.Logical.rows(int[])
-
rows
default MatrixStore<N> rows(int... rows)
A selection (re-ordering) of rows. Note that it's ok to reference the same base row more than once, and any negative row reference/index will translate to a row of zeros. The number of rows in the resulting matrix is the same as the number of elements in the rows index array.
-
rows
default MatrixStore<N> rows(long... rows)
- Specified by:
rowsin interfaceAccess2D<N extends java.lang.Comparable<N>>- Specified by:
rowsin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>- See Also:
Structure2D.Logical.rows(int[])
-
select
default MatrixStore<N> select(int[] rows, int[] columns)
-
select
default MatrixStore<N> select(long[] rows, long[] columns)
Description copied from interface:Access2DCreates a view of the underlying data structure of only the selected elements. If either the rows or columns input arguments are null or empty arrays, then that transaltes to all rows and/or columns.
-
signum
default MatrixStore<N> signum()
Description copied from interface:NormedVectorSpacethis == this.signum().multiply(this.norm())- Specified by:
signumin interfaceNormedVectorSpace<MatrixStore<N extends java.lang.Comparable<N>>,N extends java.lang.Comparable<N>>- Returns:
- A unit "vector"
-
sliceColumn
default Access1D<N> sliceColumn(long row, long col)
- Specified by:
sliceColumnin interfaceAccess2D.Sliceable<N extends java.lang.Comparable<N>>
-
sliceDiagonal
default Access1D<N> sliceDiagonal(long row, long col)
- Specified by:
sliceDiagonalin interfaceAccess2D.Sliceable<N extends java.lang.Comparable<N>>
-
sliceRange
default Access1D<N> sliceRange(long first, long limit)
- Specified by:
sliceRangein interfaceAccess1D.Sliceable<N extends java.lang.Comparable<N>>
-
sliceRow
default Access1D<N> sliceRow(long row, long col)
- Specified by:
sliceRowin interfaceAccess2D.Sliceable<N extends java.lang.Comparable<N>>
-
subtract
default MatrixStore<N> subtract(double scalarSubtrahend)
- Specified by:
subtractin interfaceScalarOperation.Subtraction<MatrixStore<N extends java.lang.Comparable<N>>,N extends java.lang.Comparable<N>>- Returns:
this - scalarSubtrahend.
-
subtract
default MatrixStore<N> subtract(MatrixStore<N> subtrahend)
- Specified by:
subtractin interfaceOperation.Subtraction<N extends java.lang.Comparable<N>>- Parameters:
subtrahend- The subtrahend- Returns:
this - subtrahend.
-
subtract
default MatrixStore<N> subtract(N scalarSubtrahend)
- Specified by:
subtractin interfaceScalarOperation.Subtraction<MatrixStore<N extends java.lang.Comparable<N>>,N extends java.lang.Comparable<N>>- Returns:
this - scalarSubtrahend.
-
superimpose
default MatrixStore<N> superimpose(Access2D<N> matrix)
- Specified by:
superimposein interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
superimpose
default MatrixStore<N> superimpose(long row, long col, Access2D<N> matrix)
- Specified by:
superimposein interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
supplyTo
default void supplyTo(Mutate1D receiver)
- Specified by:
supplyToin interfaceAccess1D.Collectable<N extends java.lang.Comparable<N>,Mutate1D>
-
supplyTo
default void supplyTo(TransformableRegion<N> receiver)
- Specified by:
supplyToin interfaceAccess2D.Collectable<N extends java.lang.Comparable<N>,TransformableRegion<N extends java.lang.Comparable<N>>>
-
symmetric
default MatrixStore<N> symmetric(boolean upper)
Description copied from interface:Structure2D.LogicalDefines a symmetricStructure2D(matrix) by mirroring one half (diagonally) on the other.- Specified by:
symmetricin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>- Parameters:
upper- From where are the elements read?
-
toScalar
default Scalar<N> toScalar(int row, int col)
Description copied from interface:Matrix2DExtracts one element of this matrix as a Scalar.
-
transpose
default MatrixStore<N> transpose()
- Specified by:
transposein interfaceElementsSupplier<N extends java.lang.Comparable<N>>- Specified by:
transposein interfaceMatrix2D<N extends java.lang.Comparable<N>,MatrixStore<N extends java.lang.Comparable<N>>>- Specified by:
transposein interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>- Returns:
- A transposed matrix instance.
-
triangular
default MatrixStore<N> triangular(boolean upper, boolean assumeOne)
- Specified by:
triangularin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
tridiagonal
default MatrixStore<N> tridiagonal()
- Specified by:
tridiagonalin interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
visitOne
default void visitOne(long row, long col, VoidFunction<N> visitor)- Specified by:
visitOnein interfaceAccess2D.Visitable<N extends java.lang.Comparable<N>>
-
-