|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMatrix<T>
Generic interface for matrix data types
Method Summary | |
---|---|
IMatrix<T> |
createMatrix(int num_rows,
int num_columns)
Create a matrix with a given number of rows and columns. |
T |
get(int x,
int y)
Get the value at (i,j) |
void |
grow(int numRows,
int numCols)
Grows the matrix to the requested size, if necessary. |
boolean |
isSymmetric()
True if the matrix is symmetric, false otherwise. |
int |
numberOfColumns()
Get the number of columns of the matrix. |
int |
numberOfRows()
Get the number of rows of the matrix. |
void |
set(int x,
int y,
T value)
Set the value at (i,j) |
IMatrix<T> |
transpose()
Get the transpose of the matrix, i.e. |
Method Detail |
---|
T get(int x, int y)
x
- the row IDy
- the column ID
void set(int x, int y, T value)
x
- the row IDy
- the column IDvalue
- the valueint numberOfRows()
int numberOfColumns()
boolean isSymmetric()
IMatrix<T> transpose()
IMatrix<T> createMatrix(int num_rows, int num_columns)
num_rows
- the number of rowsnum_columns
- the number of columns
void grow(int numRows, int numCols)
numRows
- the minimum number of rowsnumCols
- the minimum number of columns
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |