public class SliceMatrixF extends MatrixF
SliceMatrixF
is a matrix whose implementation is a submatrix of some other matrix.Modifier and Type | Field and Description |
---|---|
protected int |
col |
protected MatrixF |
matrix |
protected int |
row |
Constructor and Description |
---|
SliceMatrixF(MatrixF matrix,
int row,
int col,
int numRows,
int numCols)
Creates a
SliceMatrixF based on the indicated matrix whose upper left corner is at
(row, col) of that matrix and whose size is numRows x numCols. |
Modifier and Type | Method and Description |
---|---|
MatrixF |
emptyMatrix(int numRows,
int numCols)
Returns a new empty matrix of the indicated dimensions.
|
float |
get(int row,
int col)
Returns a particular element of this matrix
|
void |
put(int row,
int col,
float value)
Updates a particular element of this matrix
|
adaptHomogeneous, add, add, add, added, added, added, diagonalMatrix, diagonalMatrix, dimensionsError, dimensionsError, formatAsTransform, formatAsTransform, getColumn, getRow, getTranslation, identityMatrix, inverted, multiplied, multiplied, multiplied, multiplied, multiply, multiply, multiply, multiply, numCols, numRows, slice, slice, subtract, subtract, subtract, subtracted, subtracted, subtracted, toString, toVector, transform, transposed
protected MatrixF matrix
protected int row
protected int col
public SliceMatrixF(MatrixF matrix, int row, int col, int numRows, int numCols)
SliceMatrixF
based on the indicated matrix whose upper left corner is at
(row, col) of that matrix and whose size is numRows x numCols.matrix
- the matrix we are to take a slice ofrow
- the row in matrix in which the slice is to begincol
- the column in matrix in which the slice is to beginnumRows
- the number of rows that the slice should benumCols
- the number of columns that the slice should bepublic float get(int row, int col)
MatrixF
get
in class MatrixF
row
- the index of the row of the element to returncol
- the index of the column of the element to returnMatrixF.put(int, int, float)
public void put(int row, int col, float value)
MatrixF
public MatrixF emptyMatrix(int numRows, int numCols)
MatrixF
emptyMatrix
in class MatrixF
OpenGLMatrix.emptyMatrix(int, int)