public interface MatrixAccess extends Table
get(1,1)
.
This is what mathematicians (not programmers) are accustomed to.
Invalid access such as using out-of-range indices or altering immutable matrix
will lead to MatrixAccessException
.
The only way to change a matrix is by calling set(int, int, double)
.
Other operations that "change" the matrix actually creates a new and independent copy.Modifier and Type | Method and Description |
---|---|
double |
get(int i,
int j)
Get the matrix entry at [i,j].
|
void |
set(int i,
int j,
double value)
Set the matrix entry at [i,j] to a value.
|
void set(int i, int j, double value) throws MatrixAccessException
i
- the row indexj
- the column indexvalue
- the value to set A[i,j] toMatrixAccessException
- if i or j is out of rangedouble get(int i, int j) throws MatrixAccessException
i
- the row indexj
- the column indexMatrixAccessException
- if i or j is out of rangeCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.