Package com.actelion.research.util
Class MatrixSparse
- java.lang.Object
-
- com.actelion.research.util.MatrixSparse
-
public class MatrixSparse extends java.lang.Object
MatrixSparse- Version:
- 1.0 2008 MvK: Start implementation
- Author:
- Modest von Korff
-
-
Constructor Summary
Constructors Constructor Description MatrixSparse(int rows, int cols)
MatrixSparse(java.io.File fi)
MatrixSparse(java.io.File fi, int rows)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
cols()
double
get(int row, int col)
double[]
getArray()
Matrix
getMatrixK()
void
init()
int
rows()
void
set(int row, int col, double v)
java.lang.String
toString()
java.lang.String
toString(java.text.NumberFormat nf)
java.lang.String
toStringRow(int row, java.text.NumberFormat nf)
-
-
-
Method Detail
-
init
public void init()
-
set
public void set(int row, int col, double v)
-
get
public double get(int row, int col)
- Parameters:
row
-col
-- Returns:
- NaN if the value was not set.
-
getArray
public double[] getArray()
-
getMatrixK
public Matrix getMatrixK()
-
cols
public int cols()
-
rows
public int rows()
-
toStringRow
public java.lang.String toStringRow(int row, java.text.NumberFormat nf)
-
toString
public java.lang.String toString(java.text.NumberFormat nf)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-