HLIBpro 3.1
|
Class for directed graph represented by adjacency matrix in sparse format (assuming sparse graph!)
#include <TDiGraph.hh>
Classes | |
class | TIterator |
iterator to predecessor/successor lists More... | |
Public Member Functions | |
TDiGraph () | |
construct empty digraph | |
template<typename value_t > | |
TDiGraph (const TSparseMatrix< value_t > *S, const double eps=0.0) | |
size_t | n_nodes () const |
return number of nodes in graph | |
size_t | n_edges () const |
return number of edges in graph | |
TIterator | predecessors (const node_t node) const |
return iterator to predecessors of node | |
TIterator | successors (const node_t node) const |
return iterator to successors of node | |
void | print (std::ostream &os) const |
print graph | |
void | print (std::ostream &os, const std::vector< uint > &label) const |
print graph with labels | |
void | write (std::ostream &os) const |
write in Chaco/Jostle/Metis file format | |
TDiGraph & | operator= (const TDiGraph &graph) |
copy operator | |
Protected Member Functions | |
virtual void | init (const size_t nnodes, const size_t npred, const size_t nsucc) |
initialise graph for n nodes, m1 pred. edges and m2 succ. edges | |