Package gov.nih.mipav.model.algorithms
Class CeresSolver.CompressedRowSparseMatrix
java.lang.Object
gov.nih.mipav.model.algorithms.CeresSolver.LinearOperator
gov.nih.mipav.model.algorithms.CeresSolver.SparseMatrix
gov.nih.mipav.model.algorithms.CeresSolver.CompressedRowSparseMatrix
- Direct Known Subclasses:
CeresSolver2.DynamicCompressedRowSparseMatrix
- Enclosing class:
CeresSolver
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int[]private intprivate intprivate int[]private CeresSolver2.StorageTypeprivate double[] -
Constructor Summary
ConstructorsConstructorDescriptionCompressedRowSparseMatrix(double[] diagonal, int num_rows) CompressedRowSparseMatrix(int num_rows, int num_cols, int max_num_nonzeros) -
Method Summary
Modifier and TypeMethodDescriptionvoidint[]cols()voidDeleteRows(int delta_rows) voidLeftMultiply(double[] x, double[] y) int[]int[]double[]intnum_cols()intintnum_rows()voidRightMultiply(double[] x, double[] y) int[]rows()voidScaleColumns(double[] scale) voidset_col_blocks(Vector<Integer> col_blocks) voidset_num_cols(int num_cols) voidset_num_rows(int num_rows) voidset_row_blocks(Vector<Integer> row_blocks) voidset_storage_type(CeresSolver2.StorageType storage_type) voidSetMaxNumNonZeros(int num_nonzeros) voidSetZero()voidSquaredColumnNorm(double[] x) voidToCRSMatrix(CeresSolver.CRSMatrix matrix) Jama.MatrixvoidToTextFile(File file) double[]values()Methods inherited from class gov.nih.mipav.model.algorithms.CeresSolver.SparseMatrix
RightMultiply, ScaleColumns, SquaredColumnNorm
-
Field Details
-
num_rows_
private int num_rows_ -
num_cols_
private int num_cols_ -
rows_
private int[] rows_ -
cols_
private int[] cols_ -
values_
private double[] values_ -
storage_type_
-
row_blocks_
-
col_blocks_
-
-
Constructor Details
-
CompressedRowSparseMatrix
public CompressedRowSparseMatrix() -
CompressedRowSparseMatrix
public CompressedRowSparseMatrix(int num_rows, int num_cols, int max_num_nonzeros) -
CompressedRowSparseMatrix
public CompressedRowSparseMatrix(double[] diagonal, int num_rows)
-
-
Method Details
-
num_rows
public int num_rows()- Specified by:
num_rowsin classCeresSolver.SparseMatrix
-
num_cols
public int num_cols()- Specified by:
num_colsin classCeresSolver.SparseMatrix
-
num_nonzeros
public int num_nonzeros()- Specified by:
num_nonzerosin classCeresSolver.SparseMatrix
-
values
public double[] values()- Specified by:
valuesin classCeresSolver.SparseMatrix
-
mutable_values
public double[] mutable_values()- Specified by:
mutable_valuesin classCeresSolver.SparseMatrix
-
set_num_rows
public void set_num_rows(int num_rows) -
set_num_cols
public void set_num_cols(int num_cols) -
cols
public int[] cols() -
mutable_cols
public int[] mutable_cols() -
rows
public int[] rows() -
mutable_rows
public int[] mutable_rows() -
storage_type
-
set_storage_type
-
row_blocks
-
mutable_row_blocks
-
set_row_blocks
-
col_blocks
-
mutable_col_blocks
-
set_col_blocks
-
SquaredColumnNorm
public void SquaredColumnNorm(double[] x) - Specified by:
SquaredColumnNormin classCeresSolver.SparseMatrix
-
ToDenseMatrix
public Jama.Matrix ToDenseMatrix()- Specified by:
ToDenseMatrixin classCeresSolver.SparseMatrix
-
SetZero
public void SetZero()- Specified by:
SetZeroin classCeresSolver.SparseMatrix
-
LeftMultiply
public void LeftMultiply(double[] x, double[] y) - Specified by:
LeftMultiplyin classCeresSolver.SparseMatrix
-
RightMultiply
public void RightMultiply(double[] x, double[] y) - Specified by:
RightMultiplyin classCeresSolver.SparseMatrix
-
ToTextFile
- Specified by:
ToTextFilein classCeresSolver.SparseMatrix
-
ScaleColumns
public void ScaleColumns(double[] scale) - Specified by:
ScaleColumnsin classCeresSolver.SparseMatrix
-
DeleteRows
public void DeleteRows(int delta_rows) -
AppendRows
-
ToCRSMatrix
-
ToCRSMatrix
-
SetMaxNumNonZeros
public void SetMaxNumNonZeros(int num_nonzeros) -
Transpose
-