public abstract class CMatrixD1 extends java.lang.Object implements CMatrix, ReshapeMatrix
Modifier and Type | Field and Description |
---|---|
float[] |
data
Where the raw data for the matrix is stored.
|
int |
numCols
Number of columns in the matrix.
|
int |
numRows
Number of rows in the matrix.
|
Constructor and Description |
---|
CMatrixD1() |
Modifier and Type | Method and Description |
---|---|
float[] |
getData()
Used to get a reference to the internal data.
|
abstract int |
getIndex(int row,
int col)
Returns the internal array index for the specified row and column.
|
int |
getNumCols()
Returns the number of columns in this matrix.
|
int |
getNumElements() |
int |
getNumRows()
Returns the number of rows in this matrix.
|
void |
set(CMatrixD1 b)
Sets the value of this matrix to be the same as the value of the provided matrix.
|
void |
setData(float[] data)
Changes the internal array reference.
|
void |
setNumCols(int numCols)
Sets the number of columns.
|
void |
setNumRows(int numRows)
Sets the number of rows.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, getDataLength, getImag, getReal, set, setImag, setReal
reshape
public float[] data
public int numRows
public int numCols
public float[] getData()
public void setData(float[] data)
public abstract int getIndex(int row, int col)
row
- Row index.col
- Column index.public void set(CMatrixD1 b)
b
- The matrix that this matrix is to be set equal to.public int getNumRows()
getNumRows
in interface Matrix
public int getNumCols()
getNumCols
in interface Matrix
public void setNumRows(int numRows)
numRows
- Number of rowspublic void setNumCols(int numCols)
numCols
- Number of columnspublic int getNumElements()