Class MutableMatrix<E>
java.lang.Object
dk.jonaslindstrom.ruffini.common.matrices.elements.BaseMatrix<E>
dk.jonaslindstrom.ruffini.common.matrices.elements.MutableMatrix<E>
Instances of this class represents a mutable matrix.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMutableMatrix(int m, int n, IntBinaryFunction<E> populator) MutableMatrix(int m, int n, E defaultValue) -
Method Summary
Modifier and TypeMethodDescriptionReturns a new larger matrix of size m x n which has this matrix in the top left corner and pads the rest using the given padding value.get(int i, int j) getColumn(int j) intgetRow(int i) intgetWidth()<F> Matrix<F>minor(int i, int j) rows()voidsubmatrix(int[] rows, int[] columns) Return a submatrix of this matrix with the given rows and columns.submatrix(int r0, int r1, int c0, int c1) Return a submatrix of this matrix containing row r0,...,r1-1 and column c0,...,c1-1.view()Returns a view of the given matrix.Methods inherited from class dk.jonaslindstrom.ruffini.common.matrices.elements.BaseMatrix
apply, columns, equals, equals, isSquare, mutable, toString, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThenMethods inherited from interface dk.jonaslindstrom.ruffini.common.matrices.elements.Matrix
collapseColumns, collapseRows, extendWith, get, stream
-
Field Details
-
rows
-
-
Constructor Details
-
MutableMatrix
-
MutableMatrix
-
-
Method Details
-
set
-
submatrix
Return a submatrix of this matrix containing row r0,...,r1-1 and column c0,...,c1-1. -
minor
-
transpose
-
submatrix
Return a submatrix of this matrix with the given rows and columns.- Parameters:
rows- Rows to include in submatrix.columns- Columns to include in submatrix.
-
get
-
getRow
- Specified by:
getRowin interfaceMatrix<E>- Overrides:
getRowin classBaseMatrix<E>
-
getColumn
- Specified by:
getColumnin interfaceMatrix<E>- Overrides:
getColumnin classBaseMatrix<E>
-
getHeight
public int getHeight() -
getWidth
public int getWidth() -
rows
- Specified by:
rowsin interfaceMatrix<E>- Overrides:
rowsin classBaseMatrix<E>
-
view
Description copied from interface:MatrixReturns a view of the given matrix. This does not store any values but instead maps operations to this matrix. -
extendTo
Description copied from interface:MatrixReturns a new larger matrix of size m x n which has this matrix in the top left corner and pads the rest using the given padding value. -
map
-