HLIBpro  3.0
TClusterBasis< T_value > Class Template Reference

class representing a nested cluster basis

#include <TClusterBasis.hh>

Inheritance diagram for TClusterBasis< T_value >:
TIndexSet TTypeInfo

Public Types

using value_t = T_value
 value type of cluster basis
 
using son_iter_t = typename std::vector< TClusterBasis * >::iterator
 iterator for sons
 

Public Member Functions

 TClusterBasis (const TIndexSet &is, const BLAS::Matrix< value_t > &V)
 
 TClusterBasis (const TIndexSet &is, const std::vector< TClusterBasis< value_t > * > &asons, const std::vector< BLAS::Matrix< value_t > > &aE)
 
 TClusterBasis (const TIndexSet &is, const std::vector< TClusterBasis< value_t > * > &asons)
 
virtual ~TClusterBasis ()
 dtor: delete all sons
 
virtual size_t nnodes () const
 return no of nodes
 
virtual size_t depth () const
 return depth of tree
 
uint rank () const
 return basis rank
 
size_t nsons () const
 return number of sons
 
TClusterBasisson (const size_t i)
 return i'th son basis
 
const BLAS::Matrix< value_t > & basis () const
 access to explicit local basis
 
const BLAS::Matrix< value_t > & transfer_mat (const uint i) const
 access to transfer matrices
 
void truncate (const TTruncAcc &acc)
 truncate basis as defined by accuracy acc
 
BLAS::Vector< value_ttransfer_to_son (const uint i, const BLAS::Vector< value_t > &s) const
 transfer given data to basis of i'th son and return result
 
std::unique_ptr< TUniformVector< value_t > > build_vec () const
 construct uniform vector corresponding to cluster basis
 
void transform_forward (const BLAS::Vector< value_t > &v, BLAS::Vector< value_t > &s) const
 forward transformation: s ≔ V^H · v
 
std::unique_ptr< TUniformVector< value_t > > transform_forward (const TVector< value_t > *v) const
 forward transformation: return uniform vector
 
template<typename T_mat >
void transform_forward (const BLAS::MatrixBase< T_mat > &M, BLAS::Matrix< value_t > &S) const
 block forward transformation: S ≔ V^H · M
 
void transform_backward (const BLAS::Vector< value_t > &s, BLAS::Vector< value_t > &v) const
 backward transformation: v ≔ V · s
 
std::unique_ptr< TVector< value_t > > transform_backward (const TUniformVector< value_t > *v) const
 backward transformation: return transformed vector
 
template<typename T_mat >
void transform_backward (const BLAS::MatrixBase< T_mat > &S, BLAS::Matrix< value_t > &M) const
 block backward transformation: M ≔ V · S
 
virtual auto copy () const -> std::unique_ptr< TClusterBasis< value_t > >
 return copy of basis
 
virtual size_t byte_size () const
 return size in bytes used by this object
 
virtual void print (const uint ofs=0) const
 print basis to terminal
 
- Public Member Functions inherited from TIndexSet
 TIndexSet () noexcept
 construct empty index set
 
 TIndexSet (const size_t n) noexcept
 construct indexset if size n
 
 TIndexSet (const idx_t afirst, const idx_t alast) noexcept
 construct indexset by first and last index
 
 TIndexSet (const TIndexSet &is) noexcept
 copy constructor
 
idx_t first () const noexcept
 return first index in set
 
idx_t last () const noexcept
 return last index in set
 
size_t size () const noexcept
 return last index in set
 
void set_first_last (const idx_t afirst, const idx_t alast) noexcept
 set indexset by first and last index
 
void set_first_size (const idx_t afirstf, const size_t asize) noexcept
 set indexset by first and size
 
bool is_in (const idx_t idx) const noexcept
 return true if given index is part of indexset and false otherwise
 
bool is_sub (const TIndexSet &is) const noexcept
 return true if given indexset is subset
 
bool is_subset_of (const TIndexSet &is) const noexcept
 return true if local indexset is subset of given indexset
 
bool is_empty () const noexcept
 return true if indexset is empty
 
TIndexSetoperator= (const TIndexSet &is) noexcept
 copy operator
 
bool operator== (const TIndexSet &is) const noexcept
 equality operator
 
bool operator!= (const TIndexSet &is) const noexcept
 inequality operator
 
bool is_strictly_left_of (const TIndexSet &is) const noexcept
 this is strictly left of is iff ∀ i ∈ this, j ∈ is : i < j
 
bool is_left_or_equal_to (const TIndexSet &is) const noexcept
 this is left or equal to is iff this ∖ is < is
 
bool is_strictly_right_of (const TIndexSet &is) const noexcept
 this is strictly right of is iff ∀ i ∈ this, j ∈ is : i > j
 
bool is_right_or_equal_to (const TIndexSet &is) const noexcept
 this is right or equal to is iff this ∖ is > is
 
std::string to_string () const
 string output
 
size_t byte_size () const
 return size in bytes used by this object
 
- Public Member Functions inherited from TTypeInfo
virtual typeid_t type () const =0
 return type ID of object
 
virtual bool is_type (const typeid_t t) const
 return true if local object is of given type ID t
 
virtual std::string typestr () const
 return string representation of type
 

Constructor & Destructor Documentation

◆ TClusterBasis() [1/3]

TClusterBasis ( const TIndexSet is,
const BLAS::Matrix< value_t > &  V 
)

construct cluster basis corresponding to cluster cl with basis defined by V

◆ TClusterBasis() [2/3]

TClusterBasis ( const TIndexSet is,
const std::vector< TClusterBasis< value_t > * > &  asons,
const std::vector< BLAS::Matrix< value_t > > &  aE 
)

construct cluster basis corresponding to cluster cl with son bases asons and transfer matrices aE

◆ TClusterBasis() [3/3]

TClusterBasis ( const TIndexSet is,
const std::vector< TClusterBasis< value_t > * > &  asons 
)

construct cluster basis corresponding to cluster cl with son bases asons (no transfer matrices)