HLIBpro  1.2
Public Member Functions | Protected Member Functions | List of all members
TUniformVector Class Reference

Class for a uniform vector, e.g. represented as $x = V s$ with cluster basis $V$ and coefficients $s$.

#include <TUniformVector.hh>

Inheritance diagram for TUniformVector:
TVector TTypeInfo TUniformBlockVector

Public Member Functions

 TUniformVector (const TIndexSet &ais, const TClusterBasis< real > *acb, const BLAS::Vector< real > &acoeff)
 TUniformVector (const TIndexSet &ais, const TClusterBasis< complex > *acb, const BLAS::Vector< complex > &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
virtual real entry (const idx_t) const
 access coefficent i (real valued)
virtual const complex centry (const idx_t) const
 access coefficent i (complex valued)
const TClusterBasis< real > * rbasis () const
 return basis coefficients
BLAS::Vector< real > & rcoeff ()
 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 fill (const real alpha)
 fill vector with constant α
virtual void fill_rand (const uint seed)
 fill vector with random numbers
virtual void scale (const real alpha)
 set this ≔ α · this
virtual void assign (const real alpha, const TVector *x)
 set this ≔ α · x
virtual real norm2 () const
 compute ‖·‖₂
virtual real norm_inf () const
 compute ‖·‖∞
virtual void axpy (const real alpha, const TVector *x)
 set this ≔ this + α · x
virtual void conjugate ()
 conjugate coefficients
virtual void cfill (const complex &alpha)
 fill vector with constant α
virtual void cscale (const complex &alpha)
 set this ≔ α · this
virtual void cassign (const complex &alpha, const TVector *x)
 set this ≔ α · x
virtual complex dot (const TVector *x) const
 return inner product <this, x>
virtual void caxpy (const complex &f, const TVector *x)
 set this ≔ this + α · x
virtual typeid_t type () const
 return type of vector
virtual bool is_type (const typeid_t t) const
 return true if local object is of given type t
virtual size_t byte_size () const
 return size in bytes used by this object
virtual TVectorcopy () const
 return copy of vector
virtual TVectorcreate () const
 return object of same class
virtual TVectorrestrict_re () const
 return vector restricted to real part of coefficients
virtual TVectorrestrict_im () const
 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 TVector
 TVector (const idx_t offset=0, const bool use_complex=false)
 construct real or complex valued vector with first index offset
virtual ~TVector ()
 dtor
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
bool is_complex () const
 return true if vector is complex valued
void set_complex (const bool b)
 change between real and complex valued representation
virtual void set_entry (const idx_t i, const real f)
 set i'th entry
virtual void set_centry (const idx_t i, const complex f)
 set i'th entry
TVectoroperator= (const TVector &v)
 copy operator for all vectors
virtual size_t global_byte_size () const
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 String typestr () const
 return string representation of type

Protected Member Functions

virtual void to_real ()
 switch to real valued representation if possible
virtual void to_complex ()
 switch to complex valued representation

Constructor & Destructor Documentation

TUniformVector ( const TIndexSet ais,
const TClusterBasis< real > *  acb,
const BLAS::Vector< real > &  acoeff 
)
inline

construct vector over index set ais, cluster basis acb and with coefficients acoeff

TUniformVector ( const TIndexSet ais,
const TClusterBasis< complex > *  acb,
const BLAS::Vector< complex > &  acoeff 
)
inline

construct vector over index set ais, cluster basis acb and with coefficients acoeff