|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MatrixLike<M extends MatrixLike<M>>
Common Interface for Matrix and Vector objects, where M is the actual type. The type M guarantees type safety for many operations.
Method Summary | |
---|---|
Object |
clone()
Clone the Matrix object. |
M |
copy()
Make a deep copy of a matrix. |
double |
get(int i,
int j)
Get a single element. |
int |
getColumnDimensionality()
Returns the dimensionality of the columns of this matrix. |
Vector |
getColumnVector(int i)
Returns the i th column of this matrix as vector. |
int |
getRowDimensionality()
Returns the dimensionality of the rows of this matrix. |
M |
increment(int i,
int j,
double s)
Increments a single element. |
M |
minus(M B)
C = A - B |
M |
minusEquals(M B)
A = A - B |
M |
minusTimes(M B,
double s)
C = A - s*B |
M |
minusTimesEquals(M B,
double s)
C = A - s*B |
M |
plus(M B)
C = A + B |
M |
plusEquals(M B)
A = A + B |
M |
plusTimes(M B,
double s)
C = A + s*B |
M |
plusTimesEquals(M B,
double s)
C = A + s*B |
M |
set(int i,
int j,
double s)
Set a single element. |
M |
times(double s)
Multiply a matrix by a scalar, C = s*A |
M |
timesEquals(double s)
Multiply a matrix by a scalar in place, A = s*A |
Matrix |
transpose()
Matrix transpose. |
Method Detail |
---|
M copy()
Object clone()
int getRowDimensionality()
int getColumnDimensionality()
double get(int i, int j)
i
- Row index.j
- Column index.
ArrayIndexOutOfBoundsException
- on bounds errorM set(int i, int j, double s)
i
- Row index.j
- Column index.s
- A(i,j).
ArrayIndexOutOfBoundsException
- on bounds errorM increment(int i, int j, double s)
i
- the row indexj
- the column indexs
- the increment value: A(i,j) = A(i.j) + s.
ArrayIndexOutOfBoundsException
- on bounds errorVector getColumnVector(int i)
i
th column of this matrix as vector.
i
- the index of the column to be returned
i
th column of this matrixMatrix transpose()
M plus(M B)
B
- another matrix
M plusTimes(M B, double s)
B
- another matrixs
- scalar
M plusEquals(M B)
B
- another matrix
M plusTimesEquals(M B, double s)
B
- another matrixs
- scalar
M minus(M B)
B
- another matrix
M minusTimes(M B, double s)
B
- another matrixs
- Scalar
M minusEquals(M B)
B
- another matrix
M minusTimesEquals(M B, double s)
B
- another matrixs
- Scalar
M times(double s)
s
- scalar
M timesEquals(double s)
s
- scalar
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |