mathcomp.la
Class MapMatrix

java.lang.Object
  extended by mathcomp.la.Matrix
      extended by mathcomp.la.MapMatrix

public class MapMatrix
extends Matrix

Author:
pht

Method Summary
 Matrix copy()
          Creates a copy of this matrix.
 double get(java.lang.Object i, java.lang.Object j)
          Returns value at (i,j).
 Index getIndex()
           
 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.
 void set(java.lang.Object i, java.lang.Object j, double x)
          Sets value at (i,j) to x.
 java.lang.String toString()
           
 
Methods inherited from class mathcomp.la.Matrix
add, map, map, transpose
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getIndex

public Index getIndex()
Specified by:
getIndex in class Matrix

get

public double get(java.lang.Object i,
                  java.lang.Object j)
Description copied from class: Matrix
Returns value at (i,j).

Specified by:
get in class Matrix
Parameters:
i - index of the row
j - index of the column
Returns:
value at (i,j)

set

public void set(java.lang.Object i,
                java.lang.Object j,
                double x)
Description copied from class: Matrix
Sets value at (i,j) to x.

Specified by:
set in class Matrix
Parameters:
i - index of the row
j - index of the column
x - value to set at (i,j)

copy

public Matrix copy()
Description copied from class: Matrix
Creates a copy of this matrix.

Specified by:
copy in class Matrix
Returns:
a copy of this matrix

relevantIndices

public java.util.Iterator relevantIndices(java.lang.Object row)
Description copied from class: Matrix
Returns Iterator, that traverses all indices of nonnull elements in the row row.

Overrides:
relevantIndices in class Matrix
Parameters:
row - the index of the row
Returns:
Iterator, that traverses all indices of nonnull elements in the row row

relevantIndicesNum

public int relevantIndicesNum(java.lang.Object row)
Description copied from class: Matrix
Returns the number of nonnull elements in row row.

Overrides:
relevantIndicesNum in class Matrix
Parameters:
row - the index of the row
Returns:
the number of nonnull elements in row row

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object