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
public class CeresSolver.CompressedRowSparseMatrix extends CeresSolver.SparseMatrix
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Vector<java.lang.Integer>col_blocks_private int[]cols_private intnum_cols_private intnum_rows_private java.util.Vector<java.lang.Integer>row_blocks_private int[]rows_private CeresSolver2.StorageTypestorage_type_private double[]values_
-
Constructor Summary
Constructors Constructor Description CompressedRowSparseMatrix()CompressedRowSparseMatrix(double[] diagonal, int num_rows)CompressedRowSparseMatrix(int num_rows, int num_cols, int max_num_nonzeros)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidAppendRows(CeresSolver.CompressedRowSparseMatrix m)java.util.Vector<java.lang.Integer>col_blocks()int[]cols()voidDeleteRows(int delta_rows)voidLeftMultiply(double[] x, double[] y)java.util.Vector<java.lang.Integer>mutable_col_blocks()int[]mutable_cols()java.util.Vector<java.lang.Integer>mutable_row_blocks()int[]mutable_rows()double[]mutable_values()intnum_cols()intnum_nonzeros()intnum_rows()voidRightMultiply(double[] x, double[] y)java.util.Vector<java.lang.Integer>row_blocks()int[]rows()voidScaleColumns(double[] scale)voidset_col_blocks(java.util.Vector<java.lang.Integer> col_blocks)voidset_num_cols(int num_cols)voidset_num_rows(int num_rows)voidset_row_blocks(java.util.Vector<java.lang.Integer> row_blocks)voidset_storage_type(CeresSolver2.StorageType storage_type)voidSetMaxNumNonZeros(int num_nonzeros)voidSetZero()voidSquaredColumnNorm(double[] x)CeresSolver2.StorageTypestorage_type()CeresSolver.CRSMatrixToCRSMatrix()voidToCRSMatrix(CeresSolver.CRSMatrix matrix)Jama.MatrixToDenseMatrix()voidToTextFile(java.io.File file)CeresSolver.CompressedRowSparseMatrixTranspose()double[]values()-
Methods inherited from class gov.nih.mipav.model.algorithms.CeresSolver.SparseMatrix
RightMultiply, ScaleColumns, SquaredColumnNorm
-
-
-
-
Field Detail
-
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_
private CeresSolver2.StorageType storage_type_
-
row_blocks_
private java.util.Vector<java.lang.Integer> row_blocks_
-
col_blocks_
private java.util.Vector<java.lang.Integer> col_blocks_
-
-
Method Detail
-
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
public CeresSolver2.StorageType storage_type()
-
set_storage_type
public void set_storage_type(CeresSolver2.StorageType storage_type)
-
row_blocks
public java.util.Vector<java.lang.Integer> row_blocks()
-
mutable_row_blocks
public java.util.Vector<java.lang.Integer> mutable_row_blocks()
-
set_row_blocks
public void set_row_blocks(java.util.Vector<java.lang.Integer> row_blocks)
-
col_blocks
public java.util.Vector<java.lang.Integer> col_blocks()
-
mutable_col_blocks
public java.util.Vector<java.lang.Integer> mutable_col_blocks()
-
set_col_blocks
public void set_col_blocks(java.util.Vector<java.lang.Integer> 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
public void ToTextFile(java.io.File file)
- Specified by:
ToTextFilein classCeresSolver.SparseMatrix
-
ScaleColumns
public void ScaleColumns(double[] scale)
- Specified by:
ScaleColumnsin classCeresSolver.SparseMatrix
-
DeleteRows
public void DeleteRows(int delta_rows)
-
AppendRows
public void AppendRows(CeresSolver.CompressedRowSparseMatrix m)
-
ToCRSMatrix
public CeresSolver.CRSMatrix ToCRSMatrix()
-
ToCRSMatrix
public void ToCRSMatrix(CeresSolver.CRSMatrix matrix)
-
SetMaxNumNonZeros
public void SetMaxNumNonZeros(int num_nonzeros)
-
Transpose
public CeresSolver.CompressedRowSparseMatrix Transpose()
-
-