public abstract class AbstractMatrix2D extends AbstractMatrix
int
, double
, etc. First see the package summary and javadoc tree view to get the broad picture.
Note that this implementation is not synchronized.
Modifier and Type | Method and Description |
---|---|
void |
checkShape(AbstractMatrix2D B)
Sanity check for operations requiring two matrices with the same number
of columns and rows.
|
void |
checkShape(AbstractMatrix2D B,
AbstractMatrix2D C)
Sanity check for operations requiring matrices with the same number of
columns and rows.
|
int |
columns()
Returns the number of columns.
|
int |
columnStride()
Returns the column stride.
|
long |
index(int row,
int column)
Returns the position of the given coordinate within the (virtual or
non-virtual) internal 1-dimensional array.
|
int |
rows()
Returns the number of rows.
|
int |
rowStride()
Returns the row stride.
|
long |
size()
Returns the number of cells which is rows()*columns().
|
String |
toStringShort()
Returns a string representation of the receiver's shape.
|
ensureCapacity, isView, trimToSize
clone
public void checkShape(AbstractMatrix2D B)
IllegalArgumentException
- if columns() != B.columns() || rows() != B.rows().public void checkShape(AbstractMatrix2D B, AbstractMatrix2D C)
IllegalArgumentException
- if
columns() != B.columns() || rows() != B.rows() || columns() != C.columns() || rows() != C.rows()
.public int columns()
public int columnStride()
public long index(int row, int column)
row
- the index of the row-coordinate.column
- the index of the column-coordinate.public int rows()
public int rowStride()
public long size()
size
in class AbstractMatrix
public String toStringShort()
Jump to the Parallel Colt Homepage