src/hugo/graph_wrapper.h
changeset 593 b83b36ee7f10
parent 589 d89575370bcb
child 594 23a608ba40ab
equal deleted inserted replaced
7:dc9a97eaaf41 8:f84fde2bbe2e
   463     /// Returns true if \c n is hidden.
   463     /// Returns true if \c n is hidden.
   464     bool hidden(const Node& n) const { return !(*node_filter_map)[n]; }
   464     bool hidden(const Node& n) const { return !(*node_filter_map)[n]; }
   465 
   465 
   466     /// Returns true if \c n is hidden.
   466     /// Returns true if \c n is hidden.
   467     bool hidden(const Edge& e) const { return !(*edge_filter_map)[e]; }
   467     bool hidden(const Edge& e) const { return !(*edge_filter_map)[e]; }
       
   468 
       
   469     /// This is a linear time operation an works only if 
       
   470     /// NodeIt is defined.
       
   471     int nodeNum() const { 
       
   472       int i=0;
       
   473       NodeIt n;
       
   474       for (this->first(n); this->valid(n); this->next(n)) ++i;
       
   475       return i; 
       
   476     }
       
   477 
       
   478     /// This is a linear time operation and works only if 
       
   479     /// EdgeIt is defined.
       
   480     int edgeNum() const { 
       
   481       int i=0;
       
   482       EdgeIt e;
       
   483       for (this->first(e); this->valid(e); this->next(e)) ++i;
       
   484       return i; 
       
   485     }
       
   486 
   468   };
   487   };
   469 
   488 
   470 
   489 
   471 
   490 
   472   /// A wrapper for forgetting the orientation of a graph.
   491   /// A wrapper for forgetting the orientation of a graph.
  1316 
  1335 
  1317   ///@}
  1336   ///@}
  1318 
  1337 
  1319 } //namespace hugo
  1338 } //namespace hugo
  1320 
  1339 
  1321 
       
  1322 #endif //HUGO_GRAPH_WRAPPER_H
  1340 #endif //HUGO_GRAPH_WRAPPER_H
  1323 
  1341