Package org.ojalgo.matrix.store
Interface MatrixStore<N extends java.lang.Comparable<N>>
-
- All Superinterfaces:
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>
,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
,ConjugatedStore
,DiagonalStore
,FactoryStore
,GenericStore
,IdentityStore
,ImageData
,ImageData.SingleChannel
,IterativeASS.SchurComplementSolver
,LeftRightStore
,LimitStore
,LogicalStore
,LowerHessenbergStore
,LowerSymmetricStore
,LowerTriangularStore
,OffsetStore
,R032Store
,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>>
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 futher funtionality - 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 N
aggregateAll(Aggregator aggregator)
default N
aggregateColumn(long row, long col, Aggregator aggregator)
default N
aggregateDiagonal(long row, long col, Aggregator aggregator)
default N
aggregateRange(long first, long limit, Aggregator aggregator)
default N
aggregateRow(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 double
doubleValue(int row, int col)
Extracts one element of this matrix as a double.default boolean
equals(MatrixStore<N> other, NumberContext context)
default MatrixStore<N>
get()
Deprecated.v50 No need asMatrixStore
now implementsLogical
and this method simply return "this".N
get(int row, int col)
default N
get(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 long
indexOfLargest()
default boolean
isHermitian()
default boolean
isNormal()
default boolean
isSmall(double comparedTo)
default boolean
isSmall(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 asMatrixStore
now implementsLogical
.default MatrixStore<N>
multiply(double scalarMultiplicand)
default MatrixStore<N>
multiply(N scalarMultiplicand)
default MatrixStore<N>
multiply(MatrixStore<N> right)
default void
multiply(Access1D<N> right, TransformableRegion<N> target)
default N
multiplyBoth(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 double
norm()
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 itselfpower
times.default ElementsSupplier<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.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 void
supplyTo(TransformableRegion<N> 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 void
visitOne(long row, long col, VoidFunction<N> visitor)
-
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, 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:
above
in 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:
above
in 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:
above
in 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:
add
in 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:
add
in 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:
add
in 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:
aggregateAll
in interfaceAccess1D.Aggregatable<N extends java.lang.Comparable<N>>
-
aggregateColumn
default N aggregateColumn(long row, long col, Aggregator aggregator)
- Specified by:
aggregateColumn
in interfaceAccess2D.Aggregatable<N extends java.lang.Comparable<N>>
-
aggregateDiagonal
default N aggregateDiagonal(long row, long col, Aggregator aggregator)
- Specified by:
aggregateDiagonal
in interfaceAccess2D.Aggregatable<N extends java.lang.Comparable<N>>
-
aggregateRange
default N aggregateRange(long first, long limit, Aggregator aggregator)
- Specified by:
aggregateRange
in interfaceAccess1D.Aggregatable<N extends java.lang.Comparable<N>>
-
aggregateRow
default N aggregateRow(long row, long col, Aggregator aggregator)
- Specified by:
aggregateRow
in interfaceAccess2D.Aggregatable<N extends java.lang.Comparable<N>>
-
below
default MatrixStore<N> below(Access2D<N>... matrices)
- Specified by:
below
in 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:
below
in 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:
below
in 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:
bidiagonal
in 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:
column
in 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:
column
in 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:
columns
in interfaceAccess2D<N extends java.lang.Comparable<N>>
- Specified by:
columns
in 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:
conjugate
in interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
- Specified by:
conjugate
in 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:
diagonal
in 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:
diagonally
in 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:
divide
in 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:
divide
in 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:Access2D
Extracts one element of this matrix as a double.- Specified by:
doubleValue
in 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 asMatrixStore
now implementsLogical
and 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.Logical
Similar toStructure2D.Logical.symmetric(boolean)
but in addition the mirrored elements are conjugated.- Specified by:
hermitian
in 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:
hessenberg
in interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
indexOfLargest
default long indexOfLargest()
- Specified by:
indexOfLargest
in interfaceAccess1D.Aggregatable<N extends java.lang.Comparable<N>>
-
isHermitian
default boolean isHermitian()
-
isNormal
default boolean isNormal()
-
isSmall
default boolean isSmall(double comparedTo)
- Specified by:
isSmall
in 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:
left
in 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:
left
in 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:
left
in 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:
limits
in 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 asMatrixStore
now implementsLogical
.
-
multiply
default void multiply(Access1D<N> right, TransformableRegion<N> target)
-
multiply
default MatrixStore<N> multiply(double scalarMultiplicand)
- Specified by:
multiply
in 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:
multiply
in interfaceOperation.Multiplication<N extends java.lang.Comparable<N>>
- Parameters:
right
- The multiplicand- Returns:
this * multiplicand
.
-
multiply
default MatrixStore<N> multiply(N scalarMultiplicand)
- Specified by:
multiply
in 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.Additive
The additive inverse of this.- Specified by:
negate
in interfaceGroup.Additive<N extends java.lang.Comparable<N>>
- Returns:
-this
.
-
norm
default double norm()
Description copied from interface:NormedVectorSpace
this == this.signum().multiply(this.norm())
- Specified by:
norm
in 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:
offsets
in 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 itselfpower
times.- Specified by:
power
in interfaceOperation.Multiplication<N extends java.lang.Comparable<N>>
-
premultiply
default ElementsSupplier<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.
- Parameters:
left
- The left matrix- Returns:
- The matrix product
-
reduceColumns
default ElementsSupplier<N> reduceColumns(Aggregator aggregator)
- Specified by:
reduceColumns
in interfaceStructure2D.ReducibleTo1D<N extends java.lang.Comparable<N>>
-
reduceRows
default ElementsSupplier<N> reduceRows(Aggregator aggregator)
- Specified by:
reduceRows
in interfaceStructure2D.ReducibleTo1D<N extends java.lang.Comparable<N>>
-
repeat
default MatrixStore<N> repeat(int rowsRepetitions, int columnsRepetitions)
Description copied from interface:Structure2D.Logical
Will repeat this structure creating a new structure with a multiple of rows and columns.- Specified by:
repeat
in 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:
right
in 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:
right
in 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:
right
in 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:
row
in 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:
row
in 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:
rows
in interfaceAccess2D<N extends java.lang.Comparable<N>>
- Specified by:
rows
in 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:Access2D
Creates 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:NormedVectorSpace
this == this.signum().multiply(this.norm())
- Specified by:
signum
in 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:
sliceColumn
in interfaceAccess2D.Sliceable<N extends java.lang.Comparable<N>>
-
sliceDiagonal
default Access1D<N> sliceDiagonal(long row, long col)
- Specified by:
sliceDiagonal
in interfaceAccess2D.Sliceable<N extends java.lang.Comparable<N>>
-
sliceRange
default Access1D<N> sliceRange(long first, long limit)
- Specified by:
sliceRange
in interfaceAccess1D.Sliceable<N extends java.lang.Comparable<N>>
-
sliceRow
default Access1D<N> sliceRow(long row, long col)
- Specified by:
sliceRow
in interfaceAccess2D.Sliceable<N extends java.lang.Comparable<N>>
-
subtract
default MatrixStore<N> subtract(double scalarSubtrahend)
- Specified by:
subtract
in 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:
subtract
in interfaceOperation.Subtraction<N extends java.lang.Comparable<N>>
- Parameters:
subtrahend
- The subtrahend- Returns:
this - subtrahend
.
-
subtract
default MatrixStore<N> subtract(N scalarSubtrahend)
- Specified by:
subtract
in 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:
superimpose
in 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:
superimpose
in interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
supplyTo
default void supplyTo(TransformableRegion<N> receiver)
- Specified by:
supplyTo
in 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.Logical
Defines a symmetricStructure2D
(matrix) by mirroring one half (diagonally) on the other.- Specified by:
symmetric
in 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:Matrix2D
Extracts one element of this matrix as a Scalar.
-
transpose
default MatrixStore<N> transpose()
- Specified by:
transpose
in interfaceElementsSupplier<N extends java.lang.Comparable<N>>
- Specified by:
transpose
in interfaceMatrix2D<N extends java.lang.Comparable<N>,MatrixStore<N extends java.lang.Comparable<N>>>
- Specified by:
transpose
in 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:
triangular
in interfaceStructure2D.Logical<Access2D<N extends java.lang.Comparable<N>>,MatrixStore<N extends java.lang.Comparable<N>>>
-
tridiagonal
default MatrixStore<N> tridiagonal()
- Specified by:
tridiagonal
in 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:
visitOne
in interfaceAccess2D.Visitable<N extends java.lang.Comparable<N>>
-
-