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 int
num_cols_
private int
num_rows_
private java.util.Vector<java.lang.Integer>
row_blocks_
private int[]
rows_
private CeresSolver2.StorageType
storage_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 void
AppendRows(CeresSolver.CompressedRowSparseMatrix m)
java.util.Vector<java.lang.Integer>
col_blocks()
int[]
cols()
void
DeleteRows(int delta_rows)
void
LeftMultiply(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()
int
num_cols()
int
num_nonzeros()
int
num_rows()
void
RightMultiply(double[] x, double[] y)
java.util.Vector<java.lang.Integer>
row_blocks()
int[]
rows()
void
ScaleColumns(double[] scale)
void
set_col_blocks(java.util.Vector<java.lang.Integer> col_blocks)
void
set_num_cols(int num_cols)
void
set_num_rows(int num_rows)
void
set_row_blocks(java.util.Vector<java.lang.Integer> row_blocks)
void
set_storage_type(CeresSolver2.StorageType storage_type)
void
SetMaxNumNonZeros(int num_nonzeros)
void
SetZero()
void
SquaredColumnNorm(double[] x)
CeresSolver2.StorageType
storage_type()
CeresSolver.CRSMatrix
ToCRSMatrix()
void
ToCRSMatrix(CeresSolver.CRSMatrix matrix)
Jama.Matrix
ToDenseMatrix()
void
ToTextFile(java.io.File file)
CeresSolver.CompressedRowSparseMatrix
Transpose()
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_rows
in classCeresSolver.SparseMatrix
-
num_cols
public int num_cols()
- Specified by:
num_cols
in classCeresSolver.SparseMatrix
-
num_nonzeros
public int num_nonzeros()
- Specified by:
num_nonzeros
in classCeresSolver.SparseMatrix
-
values
public double[] values()
- Specified by:
values
in classCeresSolver.SparseMatrix
-
mutable_values
public double[] mutable_values()
- Specified by:
mutable_values
in 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:
SquaredColumnNorm
in classCeresSolver.SparseMatrix
-
ToDenseMatrix
public Jama.Matrix ToDenseMatrix()
- Specified by:
ToDenseMatrix
in classCeresSolver.SparseMatrix
-
SetZero
public void SetZero()
- Specified by:
SetZero
in classCeresSolver.SparseMatrix
-
LeftMultiply
public void LeftMultiply(double[] x, double[] y)
- Specified by:
LeftMultiply
in classCeresSolver.SparseMatrix
-
RightMultiply
public void RightMultiply(double[] x, double[] y)
- Specified by:
RightMultiply
in classCeresSolver.SparseMatrix
-
ToTextFile
public void ToTextFile(java.io.File file)
- Specified by:
ToTextFile
in classCeresSolver.SparseMatrix
-
ScaleColumns
public void ScaleColumns(double[] scale)
- Specified by:
ScaleColumns
in 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()
-
-