HLIBpro  2.0
Public Member Functions | Protected Member Functions | List of all members
TCoarsen Class Reference

Implements coarsening, e.g. agglomeration of blocked matrices into dense or low-rank matrices if the later use less memory.

#include <TCoarsen.hh>

Public Member Functions

 TCoarsen (const bool aallow_dense=true, const bool arecompress_lr=false, const size_t amax_block_size=50, const size_t amax_dense_size=500)
 constructs coarsening object
 
virtual ~TCoarsen ()
 destructor
 
TCoarsenallow_dense (const bool b)
 set dense conversion mode, e.g. low-rank to dense or block to dense
 
TCoarsenrecompress_lr (const bool b)
 set recompression of low-rank blocks
 
TCoarsenonly_offdiag_lr (const bool b)
 turn on/off low-rank compression of diagonal blocks
 
TCoarsenmax_block_size (const size_t n)
 set maximal size of block-matrices, still worth to try coarsening
 
TCoarsenmax_dense_size (const size_t n)
 set maximal size of dense matrices, still worth to try coarsening
 
virtual TMatrixrec_coarsen (TMatrix *A, const TTruncAcc &acc) const
 
virtual TMatrixcoarsen (TMatrix *A, const TTruncAcc &acc) const
 

Protected Member Functions

size_t byte_size (const TMatrix *A) const
 return "corrected" bytesizes, e.g. in symmetric case, of matrices for internal use
 

Member Function Documentation

virtual TMatrix* coarsen ( TMatrix A,
const TTruncAcc acc 
) const
virtual

coarsen matrix A without recursion, i.e. no coarsening of subblocks.

Parameters
Amatrix to coarsen
accaccuracy to maintain during coarsening
virtual TMatrix* rec_coarsen ( TMatrix A,
const TTruncAcc acc 
) const
virtual

coarsen matrix A with recursion, i.e. first try to coarsen subblocks.

Parameters
Amatrix to coarsen
accaccuracy to maintain during coarsening