|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.multicorebsp.util.Matrix<DataType> com.multicorebsp.util.SparseMatrix<DataType,CRS<DataType>> com.multicorebsp.util.CRS<DataType>
DataType
- What kind of data to store.public class CRS<DataType extends MatrixData<DataType>>
Compressed row storage of sparse matrices. The nonzeroes and column indices are stored in CRS order in full arrays. Since the nonzeroes are in CRS order, however, the row indices do not need to be contained in a full array: instead it is possible to store only the starting and ending points of each individual row. This is done by the start array.
Field Summary | |
---|---|
int[] |
index_array
Column index array |
int[] |
start_array
Row start array |
Fields inherited from class com.multicorebsp.util.SparseMatrix |
---|
data, n |
Fields inherited from class com.multicorebsp.util.Matrix |
---|
m, nz |
Constructor Summary | |
---|---|
protected |
CRS(CRS<DataType> toCopy)
Deep copy constructor. |
|
CRS(DataType data,
int m,
int n,
int nz)
Base constructor. |
|
CRS(TS<DataType> triplet_scheme)
Constructs CRS representation of a TS matrix. |
Method Summary | |
---|---|
void |
removeAndAddDuplicates()
Removes and combines any double entries. |
CRS<DataType> |
safeClone()
|
CRS<DataType> |
toCRS()
Warning: returns current matrix if this matrix already is CRS. |
ICRS<DataType> |
toICRS()
Warning: returns current matrix if this matrix already is CRS. |
TS<DataType> |
toTS()
Warning: returns current matrix if this matrix already is TS. |
Methods inherited from class com.multicorebsp.util.SparseMatrix |
---|
clone |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int[] start_array
public int[] index_array
Constructor Detail |
---|
public CRS(DataType data, int m, int n, int nz)
data
- Where to store matrix data.m
- Number of rows in matrix.n
- Number of columns in matrix.nz
- Number of nonzeroes in matrix.public CRS(TS<DataType> triplet_scheme)
triplet_scheme
- The TS representation to copy.protected CRS(CRS<DataType> toCopy)
Method Detail |
---|
public CRS<DataType> toCRS()
SparseMatrix
toCRS
in class SparseMatrix<DataType extends MatrixData<DataType>,CRS<DataType extends MatrixData<DataType>>>
public ICRS<DataType> toICRS()
SparseMatrix
toICRS
in class SparseMatrix<DataType extends MatrixData<DataType>,CRS<DataType extends MatrixData<DataType>>>
public TS<DataType> toTS()
SparseMatrix
toTS
in class SparseMatrix<DataType extends MatrixData<DataType>,CRS<DataType extends MatrixData<DataType>>>
public void removeAndAddDuplicates()
Matrix
removeAndAddDuplicates
in class Matrix<DataType extends MatrixData<DataType>>
public CRS<DataType> safeClone()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |