Package gov.nih.mipav.model.algorithms
Class CeresSolver.DenseSparseMatrix
java.lang.Object
gov.nih.mipav.model.algorithms.CeresSolver.LinearOperator
gov.nih.mipav.model.algorithms.CeresSolver.SparseMatrix
gov.nih.mipav.model.algorithms.CeresSolver.DenseSparseMatrix
- Enclosing class:
CeresSolver
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate Jama.Matrix -
Constructor Summary
ConstructorsConstructorDescriptionDenseSparseMatrix(int num_rows, int num_cols) DenseSparseMatrix(int num_rows, int num_cols, boolean reserve_diagonal) DenseSparseMatrix(Jama.Matrix m) -
Method Summary
Modifier and TypeMethodDescriptionvoidAppendDiagonal(double[] d) voidLeftMultiply(double[] x, double[] y) Jama.Matrixmatrix()Jama.Matrixdouble[]intnum_cols()intintnum_rows()voidvoidrestoreBackFromColMajorRef(Jama.Matrix new_arrayMat) voidRightMultiply(double[] x, double[] y) voidScaleColumns(double[] scale) voidsetMatrix(int r, int c, double val) voidSetZero()voidSquaredColumnNorm(double[] x) Jama.MatrixvoidToTextFile(File file) double[]values()Methods inherited from class gov.nih.mipav.model.algorithms.CeresSolver.SparseMatrix
RightMultiply, ScaleColumns, SquaredColumnNorm
-
Field Details
-
m_
private Jama.Matrix m_ -
has_diagonal_appended_
private boolean has_diagonal_appended_ -
has_diagonal_reserved_
private boolean has_diagonal_reserved_
-
-
Constructor Details
-
DenseSparseMatrix
-
DenseSparseMatrix
public DenseSparseMatrix(Jama.Matrix m) -
DenseSparseMatrix
public DenseSparseMatrix(int num_rows, int num_cols) -
DenseSparseMatrix
public DenseSparseMatrix(int num_rows, int num_cols, boolean reserve_diagonal)
-
-
Method Details
-
setMatrix
public void setMatrix(int r, int c, double val) -
SetZero
public void SetZero()- Specified by:
SetZeroin classCeresSolver.SparseMatrix
-
RightMultiply
public void RightMultiply(double[] x, double[] y) - Specified by:
RightMultiplyin classCeresSolver.SparseMatrix
-
LeftMultiply
public void LeftMultiply(double[] x, double[] y) - Specified by:
LeftMultiplyin classCeresSolver.SparseMatrix
-
SquaredColumnNorm
public void SquaredColumnNorm(double[] x) - Specified by:
SquaredColumnNormin classCeresSolver.SparseMatrix
-
ScaleColumns
public void ScaleColumns(double[] scale) - Specified by:
ScaleColumnsin classCeresSolver.SparseMatrix
-
ToDenseMatrix
public Jama.Matrix ToDenseMatrix()- Specified by:
ToDenseMatrixin classCeresSolver.SparseMatrix
-
ToTextFile
- Specified by:
ToTextFilein classCeresSolver.SparseMatrix
-
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
-
restoreBackFromColMajorRef
public void restoreBackFromColMajorRef(Jama.Matrix new_arrayMat) -
matrix
public Jama.Matrix matrix() -
mutable_matrix
public Jama.Matrix mutable_matrix() -
AppendDiagonal
public void AppendDiagonal(double[] d) -
RemoveDiagonal
public void RemoveDiagonal()
-