|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmathcomp.la.Matrix
public abstract class Matrix
A quadratic matrix based on an index.
To access the elements use the methods get(Object i, Object j)
and set(Object i, Object j, double value)
.
The Matrix is designed for sparse handling. So use the
relevantIndices(Object row)
for handling the matrix.
Constructor Summary | |
---|---|
Matrix()
|
Method Summary | |
---|---|
void |
add(java.lang.Object i,
java.lang.Object j,
double x)
Performs this(i,j) = this(i.j) + x . |
abstract Matrix |
copy()
Creates a copy of this matrix. |
abstract double |
get(java.lang.Object i,
java.lang.Object j)
Returns value at (i,j) . |
abstract Index |
getIndex()
|
double |
map(Vector v,
java.lang.Object row)
|
Vector |
map(Vector v,
Vector ret)
Performs ret := this*v , i.e. |
java.util.Iterator |
relevantIndices(java.lang.Object row)
Returns Iterator , that traverses all indices of nonnull elements
in the row row . |
int |
relevantIndicesNum(java.lang.Object row)
Returns the number of nonnull elements in row row . |
abstract void |
set(java.lang.Object i,
java.lang.Object j,
double x)
Sets value at (i,j) to x . |
Matrix |
transpose(Matrix ret)
Performs ret := this^T , i.e. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Matrix()
Method Detail |
---|
public abstract Index getIndex()
public abstract double get(java.lang.Object i, java.lang.Object j)
(i,j)
.
i
- index of the rowj
- index of the column
(i,j)
public abstract void set(java.lang.Object i, java.lang.Object j, double x)
(i,j)
to x
.
i
- index of the rowj
- index of the columnx
- value to set at (i,j)
public abstract Matrix copy()
public java.util.Iterator relevantIndices(java.lang.Object row)
Iterator
, that traverses all indices of nonnull elements
in the row row
.
row
- the index of the row
Iterator
, that traverses all indices of nonnull elements
in the row row
public int relevantIndicesNum(java.lang.Object row)
row
.
row
- the index of the row
row
public double map(Vector v, java.lang.Object row)
v
- the vector to maprow
- index of the component we want to calculate
v
and the row row
.public Vector map(Vector v, Vector ret)
ret := this*v
, i.e. matrix-vector
multiplication of this matrix and v
, stored
the result in ret
, which will be returned.
v
- the vector to mapret
- vector in which will be stored the result of the mapping.
v
. ret
will be returnedpublic void add(java.lang.Object i, java.lang.Object j, double x)
this(i,j) = this(i.j) + x
.
i
- index of the rowj
- index of the columnx
- the value to addpublic Matrix transpose(Matrix ret)
ret := this^T
, i.e. this
transposed and stores
the result in ret
, which will be returned.
ret
- temporary Matrix
this
transposed. ret
will be returned
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |