HLIBpro  2.9.1
TBlockCluster Class Reference

Representing a node in a block cluster tree as product of two clusters.

#include <TBlockCluster.hh>

Public Member Functions

 TBlockCluster (TBlockCluster *parent)
 construct empty, leaf block cluster with parent as parent node
 
 TBlockCluster (TBlockCluster *parent, TCluster *rowcl, TCluster *colcl)
 construct leaf block cluster defined by rowcl × colcl with parent as parent node
 
virtual ~TBlockCluster ()
 dtor
 
int id () const
 return ID
 
TBlockClusterparent ()
 return parent cluster
 
void set_parent (TBlockCluster *bct)
 set parent cluster to bct
 
const TProcSetprocs () const
 return processor set
 
void set_procs (const TProcSet &ps, const bool recursive=false)
 set local processor set and if recursive is true also son sets to ps
 
TClusterrowcl ()
 return row cluster
 
TClustercolcl ()
 return column cluster
 
void set_rowcl (TCluster *cl)
 set row cluster
 
void set_colcl (TCluster *cl)
 set column cluster
 
void set_clusters (TCluster *row_cl, TCluster *col_cl)
 set row and column cluster
 
TBlockIndexSet is () const
 return block index set of block cluster
 
bool is_adm () const
 return true if block cluster is admissible
 
void set_adm (const bool b)
 set admissibility of block cluster to b
 
virtual uint nsons () const
 return number of sons
 
virtual TBlockClusterson (const uint i)
 return i'th son
 
virtual void set_son (const uint i, TBlockCluster *son, const bool del_son=true)
 set i'th son to son
 
virtual void add_son (TBlockCluster *son)
 add son to set of sons at first free slot
 
virtual void set_layout (const uint nrows, const uint ncols)
 change block layout
 
virtual uint nrows () const
 return number of rows
 
virtual uint ncols () const
 return number of columns
 
virtual TBlockClusterson (const uint i, const uint j)
 return son at position (i, j)
 
virtual void set_son (const uint i, const uint j, TBlockCluster *son, const bool del_son=true)
 set son at position (i, j) to son
 
virtual TBlockClusterson_cl (const TCluster *rowcl, const TCluster *colcl)
 return son corresponding to block cluster rowcl × colcl
 
virtual bool is_leaf () const
 return true of node is leaf
 
virtual void make_leaf ()
 make node a leaf
 
virtual uint nnodes () const
 return number of nodes in tree
 
virtual uint depth () const
 return depth of tree
 
void assign_procs ()
 adjust processor set such that local set is union of son sets
 
bool has_son (const uint i) const
 return true if i'th son is present
 
bool is_sub_cluster (const TBlockCluster *c) const
 return true if given cluster is a subcluster of this
 
virtual TBlockClustercreate () const
 return object of same type
 
void collect_leaves (std::list< TBlockCluster * > &leaves, const int depth=-1, const int level=0) const
 collect leaves or nodes with depth depth in tree
 
uint compute_c_sp () const
 compute sparsity constant of tree
 
uint compute_c_sh (const uint nprocs) const
 compute sharing constant of tree for index set partition with nprocs processors
 
virtual TBlockClustercopy () const
 return copy of node/subtree
 
virtual size_t byte_size () const
 return size in bytes used by this object
 
void print (const uint ofs=0) const
 stream output
 
std::string to_string () const
 return string representation