HLIBpro  3.0
TUniformBlockVector< T_value > Class Template Reference

Class for a uniform block vector, e.g. of uniform sub blocks. More...

#include <TUniformBlockVector.hh>

Inheritance diagram for TUniformBlockVector< T_value >:
TUniformVector< T_value > TVector< T_value > TTypeInfo

Public Member Functions

 TUniformBlockVector (const TIndexSet &ais, const TClusterBasis< value_t > *acb, const BLAS::Vector< value_t > &acoeff, const std::vector< TUniformVector< value_t > * > &asubvec)
 
 TUniformBlockVector (const TUniformBlockVector< value_t > &v)
 copy constructor
 
virtual ~TUniformBlockVector ()
 destructor
 
virtual uint n_blocks () const
 return number of blocks
 
TUniformVector< value_t > * block (const uint i)
 access single vector block
 
const TUniformVector< value_t > * block (const uint i) const
 access single vector block
 
virtual value_t entry (const idx_t) const
 access coefficent i (real valued)
 
virtual void fill (const value_t alpha)
 fill vector with constant α
 
virtual void fill_rand (const uint seed)
 fill vector with random numbers
 
virtual void scale (const value_t alpha)
 set this ≔ α · this
 
virtual void assign (const value_t alpha, const TVector< value_t > *x)
 set this ≔ α · x
 
virtual value_t dot (const TVector< value_t > *x) const
 return inner product <this, x> = this^H x
 
virtual value_t dotu (const TVector< value_t > *x) const
 return inner product <this, x> = this^T x
 
virtual real_t norm2 () const
 compute ‖·‖₂
 
virtual real_t norm_inf () const
 compute ‖·‖∞
 
virtual void axpy (const value_t alpha, const TVector< value_t > *x)
 set this ≔ this + α · x
 
virtual size_t byte_size () const
 return size in bytes used by this object
 
virtual auto copy () const -> std::unique_ptr< TVector< value_t > >
 return copy of vector
 
virtual auto create () const -> std::unique_ptr< TVector< value_t > >
 return object of same class
 
virtual auto restrict_re () const -> std::unique_ptr< TVector< real_t > >
 return vector restricted to real part of coefficients
 
virtual auto restrict_im () const -> std::unique_ptr< TVector< real_t > >
 return vector restricted to imaginary part of coefficients
 
virtual void read (TByteStream &s)
 read vector from stream
 
virtual void write (TByteStream &s) const
 write vector to stream
 
virtual size_t bs_size () const
 returns size of object in bytestream
 
virtual void sum (const TProcSet &ps)
 pointwise summation between all vectors in ps
 
- Public Member Functions inherited from TUniformVector< T_value >
 TUniformVector (const TIndexSet &ais, const TClusterBasis< value_t > *acb, const BLAS::Vector< value_t > &acoeff)
 
 TUniformVector (const TUniformVector &v)
 copy constructor
 
virtual ~TUniformVector ()
 destructor
 
virtual size_t size () const
 return size of vector
 
virtual size_t rank () const
 return rank of vector, e.g. rank of cluster basis
 
const TClusterBasis< value_t > * basis () const
 return basis coefficients
 
BLAS::Vector< value_t > & coeff ()
 return basis coefficients
 
virtual void set_size (const size_t n)
 set size of vector
 
virtual void set_cluster (const TCluster *c)
 define vector by cluster
 
virtual void set_is (const TIndexSet &ais)
 define vector by indexset
 
virtual void conjugate ()
 conjugate coefficients
 
- Public Member Functions inherited from TVector< T_value >
 TVector (const idx_t offset=0)
 construct real or complex valued vector with first index offset
 
 TVector (const TVector< value_t > &v)
 copy constructor
 
virtual ~TVector ()
 dtor
 
virtual bool is_complex () const
 return true, if field type is complex valued
 
virtual bool is_real () const
 return true, if field type is real valued
 
idx_t ofs () const
 return first index (offset)
 
virtual void set_ofs (const idx_t n)
 set first index (offset)
 
TIndexSet is () const
 return index set
 
virtual void set_entry (const idx_t i, const value_t f)
 set i'th entry
 
TVector< value_t > & operator= (const TVector< value_t > &v)
 copy operator for all vectors
 
virtual size_t global_byte_size () const
 
virtual void copy_to (TVector< value_t > *x) const
 assign local values to vector x
 
virtual auto restrict_abs () const -> std::unique_ptr< TVector< real_t > >
 create vector restricted to absolute value of coefficients
 
virtual void sum (const TProcSet &p, const uint pid, const uint nparts, TByteStream *bs=NULL)
 
virtual void print (const uint ofs=0) const
 print vector to stdout
 
- 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
 

Detailed Description

template<typename T_value>
class Hpro::TUniformBlockVector< T_value >

In contrast to a TBlockVector, a TUniformBlockVector stores only uniform sub vectors and, furthermore, also contains local data. Hence, the data of the whole vector is not stored in the leaf vectors alone, as in the case of a TBlockVector, but is distributed through the complete hierarchy of a TUniformBlockVector.

Constructor & Destructor Documentation

◆ TUniformBlockVector()

TUniformBlockVector ( const TIndexSet ais,
const TClusterBasis< value_t > *  acb,
const BLAS::Vector< value_t > &  acoeff,
const std::vector< TUniformVector< value_t > * > &  asubvec 
)
inline

construct vector over index set ais, cluster basis acb, with coefficients acoeff and sub vectors defined in subvec