HLIBpro  2.2
Public Member Functions | List of all members
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 ()
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 *c)
 set row cluster
void set_colcl (TCluster *c)
 set column cluster
void set_clusters (TCluster *row_ct, TCluster *col_ct)
 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 size_t nsons () const
 return number of sons
virtual void set_nsons (const size_t n)
 set number of sons
virtual void adjust_nsons ()
 adjust number of sons to number of non-NULL sons in local list
virtual TBlockClusterson (const size_t i)
 return i'th son
virtual void set_son (const size_t i, TBlockCluster *son)
 set i'th son to son
virtual void add_son (TBlockCluster *son)
 add son to set of sons at first free slot
virtual TBlockClusterson (const size_t i, const size_t j)
 return son at position (i, j)
virtual void set_son (const size_t i, const size_t j, TBlockCluster *son)
 set son at position (i, j) to son
virtual TBlockClusterson (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 size_t nnodes () const
 return number of nodes in tree
virtual size_t 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 size_t 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