HLIBpro  2.6
TDenseMatBuilder< T > Class Template Reference

Creates matrices by computing low rank approximations of dense sub matrices, e.g. via ACA or SVD.

#include <TMatBuilder.hh>

Inheritance diagram for TDenseMatBuilder< T >:
TMatBuilder

Classes

struct  stat_t
 statistical data of computations More...
 

Public Member Functions

 TDenseMatBuilder (const coeff_fn_t *coeff_fn, const TLowRankApx *lr_apx, const bool recompress=CFG::Build::recompress, const bool cvt_to_dense=CFG::Build::to_dense, stat_t *stat=nullptr)
 
void set_recompression (const bool b)
 (de-) activate recompression of low-rank blocks
 
void set_stat (stat_t *stat)
 assign statistics object
 
virtual std::unique_ptr< TMatrixbuild_leaf (const TBlockCluster *bc, const matform_t matformat, const TTruncAcc &acc) const
 construct matrices for leaves in the block cluster tree
 
virtual std::unique_ptr< TMatrixbuild_ghost (const TBlockCluster *bc) const
 build placeholder matrix for remote blocks
 
virtual matform_t matrix_format () const
 return matrix format
 
- Public Member Functions inherited from TMatBuilder
 TMatBuilder (const bool coarsening=CFG::Build::coarsen)
 
void set_coarsening (const bool b)
 (de-) activate coarsening with standard accuracy (default: off)
 
void set_coarsening (const TTruncAcc &acc)
 activate coarsening with accuracy acc
 
void set_build_ghosts (const bool b)
 
void set_bc_builder (const TBCBuilder *bc_builder)
 set block cluster tree builder object (default: nullptr)
 
virtual std::unique_ptr< TMatrixbuild (const TBlockClusterTree *bct, const TTruncAcc &acc, TProgressBar *progress=nullptr) const
 build the H-matrix with block-wise accuracy defined by acc
 
virtual std::unique_ptr< TMatrixbuild (const TBlockCluster *bc, const TTruncAcc &acc, TProgressBar *progress=nullptr) const
 
virtual std::unique_ptr< TMatrixbuild (const TBlockClusterTree *cluster, const matform_t matformat, const TTruncAcc &acc, TProgressBar *progress=nullptr) const
 same as More...
 
virtual std::unique_ptr< TMatrixbuild (const TBlockCluster *cluster, const matform_t matformat, const TTruncAcc &acc, TProgressBar *progress=nullptr) const
 same as More...
 
virtual std::unique_ptr< TBlockMatrixbuild_blocked (const TBlockCluster *bc) const
 build blocked matrix
 
const stat_t & statistics () const
 return statistics information
 

Protected Member Functions

std::unique_ptr< TMatrixbuild_dense (const TBlockCluster *bc, const matform_t matformat, const TTruncAcc &acc) const
 
std::unique_ptr< TMatrixbuild_rank (const TBlockCluster *bc, const TTruncAcc &acc) const
 
- Protected Member Functions inherited from TMatBuilder
virtual std::unique_ptr< TMatrixthr_build (const TBlockCluster *bc, const matform_t matformat, const TTruncAcc &acc, TProgressBar *progress) const
 threaded building process
 

Protected Attributes

const coeff_fn_t_coeff_fn
 function for computing matrix entries
 
const TLowRankApx_lr_apx
 low-rank approximation algorithm
 
bool _recompress
 if true, use recompression for low-rank blocks
 
const bool _convert_to_dense
 if true, convert low-rank to dense if rank too high
 
stat_t_stat
 statistics object
 

Constructor & Destructor Documentation

◆ TDenseMatBuilder()

TDenseMatBuilder ( const coeff_fn_t coeff_fn,
const TLowRankApx lr_apx,
const bool  recompress = CFG::Build::recompress,
const bool  cvt_to_dense = CFG::Build::to_dense,
stat_t stat = nullptr 
)

ctor for construction of H-matrix out of given coefficient function and low-rank approximation method.

Member Function Documentation

◆ build_dense()

std::unique_ptr< TMatrix > build_dense ( const TBlockCluster bc,
const matform_t  matformat,
const TTruncAcc acc 
) const
protected

build dense matrix for given block cluster by directly evaluating the matrix coefficient via the coefficient function

◆ build_rank()

std::unique_ptr< TMatrix > build_rank ( const TBlockCluster bc,
const TTruncAcc acc 
) const
protected

build low-rank matrix for given block cluster by using internal low-rank approximation object