|
JMSLTM Numerical Library 5.0.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.imsl.math.SparseMatrix.SparseArray
public static class SparseMatrix.SparseArray
The SparseArray
class uses public fields to hold
the data for a sparse matrix in the Java Sparse Array format.
This format came about as a means for storing sparse matrices in Java.
In this format, a sparse matrix is represented by two arrays of arrays.
One array contains the references to the nonzero value arrays
for each row of the sparse matrix.
The other contains the references to the associated column
index arrays.
As an example, consider the following real sparse matrix:
InSparseArray
, this matrix can be represented by the two jagged arrays,
values
and index
, where values
refers to the nonzero entries in A and index
to
the column indices:
double values[][] = {
{10.0},
{10.0, -3.0, -1.0},
{15.0},
{-2.0, 10.0, -1.0},
{-1.0, -5.0, 1.0, -3.0},
{-1.0, -2.0, 6.0}
}
int index[][] = {
{0},
{1, 2, 3},
{2},
{0, 3, 4},
{0, 3, 4, 5},
{0, 1, 5}
}
Field Summary | |
---|---|
int[][] |
index
Jagged array containing column indices. |
int |
numberOfColumns
Number of columns in the matrix. |
long |
numberOfNonZeros
Number of nonzeros in the matrix. |
int |
numberOfRows
Number of rows in the matrix. |
double[][] |
values
Jagged array containing sparse array values. |
Constructor Summary | |
---|---|
SparseMatrix.SparseArray()
|
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int[][] index
numberOfRows
.
The length of each row equals the number of nonzeros
in that row of the sparse matrix.
public int numberOfColumns
public long numberOfNonZeros
public int numberOfRows
public double[][] values
index
.
Constructor Detail |
---|
public SparseMatrix.SparseArray()
|
JMSLTM Numerical Library 5.0.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |