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
class CeresSolver.DenseSparseMatrix extends CeresSolver.SparseMatrix
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
has_diagonal_appended_
private boolean
has_diagonal_reserved_
private Jama.Matrix
m_
-
Constructor Summary
Constructors Constructor Description DenseSparseMatrix(int num_rows, int num_cols)
DenseSparseMatrix(int num_rows, int num_cols, boolean reserve_diagonal)
DenseSparseMatrix(CeresSolver.TripletSparseMatrix m)
DenseSparseMatrix(Jama.Matrix m)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
AppendDiagonal(double[] d)
void
LeftMultiply(double[] x, double[] y)
Jama.Matrix
matrix()
Jama.Matrix
mutable_matrix()
double[]
mutable_values()
int
num_cols()
int
num_nonzeros()
int
num_rows()
void
RemoveDiagonal()
void
restoreBackFromColMajorRef(Jama.Matrix new_arrayMat)
void
RightMultiply(double[] x, double[] y)
void
ScaleColumns(double[] scale)
void
setMatrix(int r, int c, double val)
void
SetZero()
void
SquaredColumnNorm(double[] x)
Jama.Matrix
ToDenseMatrix()
void
ToTextFile(java.io.File file)
double[]
values()
-
Methods inherited from class gov.nih.mipav.model.algorithms.CeresSolver.SparseMatrix
RightMultiply, ScaleColumns, SquaredColumnNorm
-
-
-
-
Constructor Detail
-
DenseSparseMatrix
public DenseSparseMatrix(CeresSolver.TripletSparseMatrix m)
-
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 Detail
-
setMatrix
public void setMatrix(int r, int c, double val)
-
SetZero
public void SetZero()
- Specified by:
SetZero
in classCeresSolver.SparseMatrix
-
RightMultiply
public void RightMultiply(double[] x, double[] y)
- Specified by:
RightMultiply
in classCeresSolver.SparseMatrix
-
LeftMultiply
public void LeftMultiply(double[] x, double[] y)
- Specified by:
LeftMultiply
in classCeresSolver.SparseMatrix
-
SquaredColumnNorm
public void SquaredColumnNorm(double[] x)
- Specified by:
SquaredColumnNorm
in classCeresSolver.SparseMatrix
-
ScaleColumns
public void ScaleColumns(double[] scale)
- Specified by:
ScaleColumns
in classCeresSolver.SparseMatrix
-
ToDenseMatrix
public Jama.Matrix ToDenseMatrix()
- Specified by:
ToDenseMatrix
in classCeresSolver.SparseMatrix
-
ToTextFile
public void ToTextFile(java.io.File file)
- Specified by:
ToTextFile
in classCeresSolver.SparseMatrix
-
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
-
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()
-
-