Package gov.nih.mipav.model.algorithms
Class CeresSolver.SchurEliminator
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.CeresSolver.SchurEliminatorBase
-
- gov.nih.mipav.model.algorithms.CeresSolver.SchurEliminator
-
- Enclosing class:
- CeresSolver
class CeresSolver.SchurEliminator extends CeresSolver.SchurEliminatorBase
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
assume_full_rank_ete_
private double[]
buffer_
(package private) int
buffer_size_
private double[]
chunk_outer_product_buffer_
(package private) java.util.Vector<CeresSolver.Chunk>
chunks_
private CeresSolver.Context
context_
private int
kEBlockSize
private int
kFBlockSize
private int
kRowBlockSize
private java.util.Vector<java.lang.Integer>
lhs_row_layout_
private int
num_eliminate_blocks_
private int
num_threads_
private java.util.Vector<java.util.concurrent.locks.Lock>
rhs_locks_
(package private) int
uneliminated_row_begins_
-
Constructor Summary
Constructors Constructor Description SchurEliminator(int kRowBlockSize, int kEBlockSize, int kFBlockSize, CeresSolver.LinearSolverOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
BackSubstitute(CeresSolver.BlockSparseMatrix A, double[] b, double[] D, double[] z, double[] y)
private void
ChunkDiagonalBlockAndGradient(CeresSolver.Chunk chunk, CeresSolver.BlockSparseMatrix A, double[] b, int row_block_counter, double[][] etearr, double[] g, double[] buffer, CeresSolver.BlockRandomAccessMatrix lhs)
private void
ChunkOuterProduct(int thread_id, CeresSolver.CompressedRowBlockStructure bs, double[][] inverse_ete, double[] buffer, java.util.HashMap<java.lang.Integer,java.lang.Integer> buffer_layout, CeresSolver.BlockRandomAccessMatrix lhs)
private void
EBlockRowOuterProduct(CeresSolver.BlockSparseMatrix A, int row_block_index, CeresSolver.BlockRandomAccessMatrix lhs)
void
Eliminate(CeresSolver.BlockSparseMatrix A, double[] b, double[] D, CeresSolver.BlockRandomAccessMatrix lhs, double[] rhs)
void
finalize()
void
Init(int num_eliminate_blocks, boolean assume_full_rank_ete, CeresSolver.CompressedRowBlockStructure bs)
private void
NoEBlockRowOuterProduct(CeresSolver.BlockSparseMatrix A, int row_block_index, CeresSolver.BlockRandomAccessMatrix lhs)
private void
NoEBlockRowsUpdate(CeresSolver.BlockSparseMatrix A, double[] b, int row_block_counter, CeresSolver.BlockRandomAccessMatrix lhs, double[] rhs)
private void
UpdateRhs(CeresSolver.Chunk chunk, CeresSolver.BlockSparseMatrix A, double[] b, int row_block_counter, double[] inverse_ete_g, double[] rhs)
-
-
-
Field Detail
-
kRowBlockSize
private int kRowBlockSize
-
kEBlockSize
private int kEBlockSize
-
kFBlockSize
private int kFBlockSize
-
num_threads_
private int num_threads_
-
context_
private CeresSolver.Context context_
-
num_eliminate_blocks_
private int num_eliminate_blocks_
-
assume_full_rank_ete_
private boolean assume_full_rank_ete_
-
lhs_row_layout_
private java.util.Vector<java.lang.Integer> lhs_row_layout_
-
chunks_
java.util.Vector<CeresSolver.Chunk> chunks_
-
buffer_
private double[] buffer_
-
chunk_outer_product_buffer_
private double[] chunk_outer_product_buffer_
-
buffer_size_
int buffer_size_
-
uneliminated_row_begins_
int uneliminated_row_begins_
-
rhs_locks_
private java.util.Vector<java.util.concurrent.locks.Lock> rhs_locks_
-
-
Constructor Detail
-
SchurEliminator
public SchurEliminator(int kRowBlockSize, int kEBlockSize, int kFBlockSize, CeresSolver.LinearSolverOptions options)
-
-
Method Detail
-
finalize
public void finalize()
- Overrides:
finalize
in classjava.lang.Object
-
Init
public void Init(int num_eliminate_blocks, boolean assume_full_rank_ete, CeresSolver.CompressedRowBlockStructure bs)
- Specified by:
Init
in classCeresSolver.SchurEliminatorBase
-
Eliminate
public void Eliminate(CeresSolver.BlockSparseMatrix A, double[] b, double[] D, CeresSolver.BlockRandomAccessMatrix lhs, double[] rhs)
- Specified by:
Eliminate
in classCeresSolver.SchurEliminatorBase
-
BackSubstitute
public void BackSubstitute(CeresSolver.BlockSparseMatrix A, double[] b, double[] D, double[] z, double[] y)
- Specified by:
BackSubstitute
in classCeresSolver.SchurEliminatorBase
-
NoEBlockRowsUpdate
private void NoEBlockRowsUpdate(CeresSolver.BlockSparseMatrix A, double[] b, int row_block_counter, CeresSolver.BlockRandomAccessMatrix lhs, double[] rhs)
-
NoEBlockRowOuterProduct
private void NoEBlockRowOuterProduct(CeresSolver.BlockSparseMatrix A, int row_block_index, CeresSolver.BlockRandomAccessMatrix lhs)
-
ChunkOuterProduct
private void ChunkOuterProduct(int thread_id, CeresSolver.CompressedRowBlockStructure bs, double[][] inverse_ete, double[] buffer, java.util.HashMap<java.lang.Integer,java.lang.Integer> buffer_layout, CeresSolver.BlockRandomAccessMatrix lhs)
-
UpdateRhs
private void UpdateRhs(CeresSolver.Chunk chunk, CeresSolver.BlockSparseMatrix A, double[] b, int row_block_counter, double[] inverse_ete_g, double[] rhs)
-
ChunkDiagonalBlockAndGradient
private void ChunkDiagonalBlockAndGradient(CeresSolver.Chunk chunk, CeresSolver.BlockSparseMatrix A, double[] b, int row_block_counter, double[][] etearr, double[] g, double[] buffer, CeresSolver.BlockRandomAccessMatrix lhs)
-
EBlockRowOuterProduct
private void EBlockRowOuterProduct(CeresSolver.BlockSparseMatrix A, int row_block_index, CeresSolver.BlockRandomAccessMatrix lhs)
-
-