public interface IAbstractMatrix<E>
IAbstractMatrix is an interface for clients to realize that provides the basic functionality of a nRows x nCols matrix of elements. It is generic so that it can contain a matrix of any object.
Modifier and Type | Method and Description |
---|---|
boolean |
deleteColumn()
This method removes the last column from this KDDMatrix.
|
boolean |
deleteRow()
This method removes the last row from this KDDMatrix.
|
E |
getElement(int rowIndex,
int colIndex)
Get the element value at the given row and column index.Returns null if
invalid index.
|
int |
numberOfColumns()
Returns the number of columns in this matrix.
|
int |
numberOfRows()
Returns the number of rows in this matrix
|
boolean |
setElement(int rowIndex,
int colIndex,
E value)
Set the value of the individual matrix element at index i,j.
|
void |
transpose()
This method transposes this KDDMatrix.
|
E getElement(int rowIndex, int colIndex)
Get the element value at the given row and column index.Returns null if invalid index.
rowIndex
- colIndex
- boolean setElement(int rowIndex, int colIndex, E value)
Set the value of the individual matrix element at index i,j.
rowIndex
- colIndex
- value
- void transpose()
This method transposes this KDDMatrix.
int numberOfRows()
Returns the number of rows in this matrix
int numberOfColumns()
Returns the number of columns in this matrix.
boolean deleteRow()
This method removes the last row from this KDDMatrix. Returns a boolean to indicate success or failure.
boolean deleteColumn()
This method removes the last column from this KDDMatrix. Returns boolean to indicate success or failure.