public class SparseMatrix extends AbstractMatrix
Matrix.ElementHandler
Modifier and Type | Field and Description |
---|---|
static boolean |
NATIVE_INIT |
Constructor and Description |
---|
SparseMatrix(int m,
int n,
int estimatedNonZeroValueCount) |
SparseMatrix(int m,
int n,
int[] columnStart,
int[] rowIndices,
double[] values) |
Modifier and Type | Method and Description |
---|---|
LUDecomposition |
decomposeLU() |
boolean |
equals(java.lang.Object obj) |
protected int |
getEstimatedNonZeroValueCount() |
int |
getM() |
int |
getN() |
int |
hashCode() |
void |
iterateNonZeroValue(Matrix.ElementHandler handler) |
void |
iterateNonZeroValueOfColumn(int j,
Matrix.ElementHandler handler) |
void |
print() |
void |
print(java.util.List<java.lang.String> rowNames,
java.util.List<java.lang.String> columnNames) |
void |
print(java.io.PrintStream out) |
void |
print(java.io.PrintStream out,
java.util.List<java.lang.String> rowNames,
java.util.List<java.lang.String> columnNames) |
void |
setValue(int m,
int n,
double value) |
Matrix |
times(Matrix other) |
Matrix |
to(MatrixFactory factory) |
DenseMatrix |
toDense() |
SparseMatrix |
toSparse() |
copy
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
createFromColumn
public SparseMatrix(int m, int n, int[] columnStart, int[] rowIndices, double[] values)
public SparseMatrix(int m, int n, int estimatedNonZeroValueCount)
public int getM()
public int getN()
public void setValue(int m, int n, double value)
public LUDecomposition decomposeLU()
public void iterateNonZeroValue(Matrix.ElementHandler handler)
public void iterateNonZeroValueOfColumn(int j, Matrix.ElementHandler handler)
public DenseMatrix toDense()
public SparseMatrix toSparse()
public Matrix to(MatrixFactory factory)
protected int getEstimatedNonZeroValueCount()
getEstimatedNonZeroValueCount
in class AbstractMatrix
public void print()
public void print(java.util.List<java.lang.String> rowNames, java.util.List<java.lang.String> columnNames)
public void print(java.io.PrintStream out)
public void print(java.io.PrintStream out, java.util.List<java.lang.String> rowNames, java.util.List<java.lang.String> columnNames)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object