jsci.util.array
Class SparseDoubleArray2D
java.lang.Object
jsci.util.array.AbstractDoubleArray2D
jsci.util.array.SparseDoubleArray2D
- All Implemented Interfaces:
- Array2D<java.lang.Double>, DoubleArray2D
- Direct Known Subclasses:
- AlgorithmsSparseDoubleArray2D
public class SparseDoubleArray2D
- extends AbstractDoubleArray2D
Field Summary |
protected int |
capacityIncrement
Amount by which to increase the capacity. |
protected int[] |
colPos
Sparse indexing data. |
protected double[] |
elements
Matrix elements. |
protected int |
numCols
|
protected int |
numRows
|
protected int[] |
rows
Sparse indexing data. |
protected double |
zeroTol
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
numRows
protected final int numRows
numCols
protected final int numCols
zeroTol
protected final double zeroTol
elements
protected double[] elements
- Matrix elements.
colPos
protected int[] colPos
- Sparse indexing data.
Contains the column positions of each element,
e.g.
colPos[n]
is the column position
of the n
th element.
rows
protected final int[] rows
- Sparse indexing data.
Contains the indices of the start of each row,
e.g.
rows[i]
is the index
where the i
th row starts.
capacityIncrement
protected final int capacityIncrement
- Amount by which to increase the capacity.
SparseDoubleArray2D
public SparseDoubleArray2D(int rowCount,
int colCount)
SparseDoubleArray2D
public SparseDoubleArray2D(int rowCount,
int colCount,
double zeroTol,
int capacityIncrement)
SparseDoubleArray2D
public SparseDoubleArray2D(double[][] array)
SparseDoubleArray2D
public SparseDoubleArray2D(double[][] array,
double zeroTol,
int capacityIncrement)
create
public SparseDoubleArray2D create(int rows,
int cols)
getDouble
public double getDouble(int i,
int j)
setDouble
public void setDouble(int i,
int j,
double x)
addTo
public void addTo(int i,
int j,
double delta)
rows
public int rows()
columns
public int columns()
getElementCount
public int getElementCount()