public class DenseMatrixBool extends java.lang.Object implements ReshapeMatrix
| Modifier and Type | Field and Description |
|---|---|
boolean[] |
data
1D row-major array for storing theboolean matrix
|
int |
numCols
Number of columns in the matrix.
|
int |
numRows
Number of rows in the matrix.
|
| Constructor and Description |
|---|
DenseMatrixBool(int numRows,
int numCols) |
| Modifier and Type | Method and Description |
|---|---|
<T extends Matrix> |
copy()
Creates an exact copy of the matrix
|
boolean |
get(int index) |
boolean |
get(int row,
int col) |
int |
getIndex(int row,
int col) |
int |
getNumCols()
Returns the number of columns in this matrix.
|
int |
getNumElements() |
int |
getNumRows()
Returns the number of rows in this matrix.
|
boolean |
isInBounds(int row,
int col)
Determines if the specified element is inside the bounds of the Matrix.
|
void |
print()
Prints the matrix to standard out.
|
void |
reshape(int numRows,
int numCols)
Equivalent to invoking reshape(numRows,numCols,false);
|
void |
set(int row,
int col,
boolean value) |
void |
set(Matrix original)
Sets this matrix to be identical to the 'original' matrix passed in.
|
boolean |
unsafe_get(int row,
int col) |
void |
unsafe_set(int row,
int col,
boolean value) |
public boolean[] data
public int numRows
public int numCols
public int getNumElements()
public int getIndex(int row,
int col)
public boolean get(int index)
public boolean get(int row,
int col)
public void set(int row,
int col,
boolean value)
public boolean unsafe_get(int row,
int col)
public void unsafe_set(int row,
int col,
boolean value)
public boolean isInBounds(int row,
int col)
row - The element's row.col - The element's column.public void reshape(int numRows,
int numCols)
ReshapeMatrixreshape in interface ReshapeMatrixnumRows - The new number of rows in the matrix.numCols - The new number of columns in the matrix.public int getNumRows()
MatrixgetNumRows in interface Matrixpublic int getNumCols()
MatrixgetNumCols in interface Matrixpublic <T extends Matrix> T copy()
Matrixpublic void set(Matrix original)
Matrix