|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
F - the number Fieldpublic interface MatrixAccessor<F extends Field<F>>
This interface defines methods for accessing elements in a matrix.
Indices count from 1, e.g., get(1,1),
which is what mathematicians (not programmers) are accustomed to.
The only way to change a matrix is by set(int, int, com.numericalmethod.suanshu.mathstructure.Field).
Other operations that "change" the matrix actually creates an independent copy.
Field| Method Summary | |
|---|---|
F |
get(int row,
int col)
Get the matrix element at [row, col]. |
void |
set(int row,
int col,
F value)
Set the matrix element at [row, col] to value. |
| Method Detail |
|---|
void set(int row,
int col,
F value)
throws MatrixAccessException
[row, col] to value.
This is the only function that may change the entries of a matrix.
row - the row indexcol - the column indexvalue - the value to set A[row, col] to
MatrixAccessException - if row or col is out of range
F get(int row,
int col)
throws MatrixAccessException
[row, col].
row - the row indexcol - the column index
A[row, col]
MatrixAccessException - if row or col is out of range
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||