1.1 --- a/src/hugo/graph_wrapper.h Sun May 09 16:29:53 2004 +0000
1.2 +++ b/src/hugo/graph_wrapper.h Mon May 10 08:25:10 2004 +0000
1.3 @@ -465,6 +465,25 @@
1.4
1.5 /// Returns true if \c n is hidden.
1.6 bool hidden(const Edge& e) const { return !(*edge_filter_map)[e]; }
1.7 +
1.8 + /// This is a linear time operation an works only if
1.9 + /// NodeIt is defined.
1.10 + int nodeNum() const {
1.11 + int i=0;
1.12 + NodeIt n;
1.13 + for (this->first(n); this->valid(n); this->next(n)) ++i;
1.14 + return i;
1.15 + }
1.16 +
1.17 + /// This is a linear time operation and works only if
1.18 + /// EdgeIt is defined.
1.19 + int edgeNum() const {
1.20 + int i=0;
1.21 + EdgeIt e;
1.22 + for (this->first(e); this->valid(e); this->next(e)) ++i;
1.23 + return i;
1.24 + }
1.25 +
1.26 };
1.27
1.28
1.29 @@ -1318,6 +1337,5 @@
1.30
1.31 } //namespace hugo
1.32
1.33 -
1.34 #endif //HUGO_GRAPH_WRAPPER_H
1.35