COIN-OR::LEMON - Graph Library

Changeset 593:b83b36ee7f10 in lemon-0.x for src/hugo


Ignore:
Timestamp:
05/10/04 10:25:10 (20 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@772
Message:

comleteGraph

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/hugo/graph_wrapper.h

    r589 r593  
    466466    /// Returns true if \c n is hidden.
    467467    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
    468487  };
    469488
     
    13191338} //namespace hugo
    13201339
    1321 
    13221340#endif //HUGO_GRAPH_WRAPPER_H
    13231341
Note: See TracChangeset for help on using the changeset viewer.