Package gov.nih.mipav.model.algorithms
Class CeresSolver.TripletSparseMatrix
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.CeresSolver.LinearOperator
-
- gov.nih.mipav.model.algorithms.CeresSolver.SparseMatrix
-
- gov.nih.mipav.model.algorithms.CeresSolver.TripletSparseMatrix
-
- Enclosing class:
- CeresSolver
class CeresSolver.TripletSparseMatrix extends CeresSolver.SparseMatrix
-
-
Field Summary
Fields Modifier and Type Field Description private int[]
cols_
private int
max_num_nonzeros_
private int
num_cols_
private int
num_nonzeros_
private int
num_rows_
CeresSolver.TripletSparseMatrixRandomMatrixOptions
randomMatrixOptions
private int[]
rows_
private double[]
values_
-
Constructor Summary
Constructors Constructor Description TripletSparseMatrix()
TripletSparseMatrix(int num_rows, int num_cols, int max_num_nonzeros)
TripletSparseMatrix(int num_rows, int num_cols, java.util.Vector<java.lang.Integer> rows, java.util.Vector<java.lang.Integer> cols, java.util.Vector<java.lang.Double> values)
TripletSparseMatrix(CeresSolver.TripletSparseMatrix orig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
AllocateMemory()
boolean
AllTripletsWithinBounds()
void
AppendCols(CeresSolver.TripletSparseMatrix B)
void
AppendRows(CeresSolver.TripletSparseMatrix B)
int[]
cols()
void
CopyData(CeresSolver.TripletSparseMatrix orig)
boolean
IsValid()
void
LeftMultiply(double[] x, double[] y)
int
max_num_nonzeros()
int[]
mutable_cols()
int[]
mutable_rows()
double[]
mutable_values()
int
num_cols()
int
num_nonzeros()
int
num_rows()
void
Reserve(int new_max_num_nonzeros)
void
Resize(int new_num_rows, int new_num_cols)
void
RightMultiply(double[] x, double[] y)
int[]
rows()
void
ScaleColumns(double[] scale)
void
set_num_nonzeros(int num_nonzeros)
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
-
-
-
-
Field Detail
-
randomMatrixOptions
public CeresSolver.TripletSparseMatrixRandomMatrixOptions randomMatrixOptions
-
num_rows_
private int num_rows_
-
num_cols_
private int num_cols_
-
max_num_nonzeros_
private int max_num_nonzeros_
-
num_nonzeros_
private int num_nonzeros_
-
rows_
private int[] rows_
-
cols_
private int[] cols_
-
values_
private double[] values_
-
-
Constructor Detail
-
TripletSparseMatrix
public TripletSparseMatrix()
-
TripletSparseMatrix
public TripletSparseMatrix(int num_rows, int num_cols, int max_num_nonzeros)
-
TripletSparseMatrix
public TripletSparseMatrix(int num_rows, int num_cols, java.util.Vector<java.lang.Integer> rows, java.util.Vector<java.lang.Integer> cols, java.util.Vector<java.lang.Double> values)
-
TripletSparseMatrix
public TripletSparseMatrix(CeresSolver.TripletSparseMatrix orig)
-
-
Method Detail
-
AllocateMemory
public void AllocateMemory()
-
CopyData
public void CopyData(CeresSolver.TripletSparseMatrix orig)
-
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
-
set_num_nonzeros
public void set_num_nonzeros(int num_nonzeros)
-
Reserve
public void Reserve(int new_max_num_nonzeros)
-
AppendRows
public void AppendRows(CeresSolver.TripletSparseMatrix B)
-
AppendCols
public void AppendCols(CeresSolver.TripletSparseMatrix B)
-
Resize
public void Resize(int new_num_rows, int new_num_cols)
-
max_num_nonzeros
public int max_num_nonzeros()
-
rows
public int[] rows()
-
cols
public int[] cols()
-
mutable_rows
public int[] mutable_rows()
-
mutable_cols
public int[] mutable_cols()
-
AllTripletsWithinBounds
public boolean AllTripletsWithinBounds()
-
IsValid
public boolean IsValid()
-
-