COIN-OR::LEMON - Graph Library

Changeset 1909:2d806130e700 in lemon-0.x for lemon/euler.h


Ignore:
Timestamp:
01/26/06 16:42:13 (14 years ago)
Author:
Mihaly Barasz
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2484
Message:

Undir -> U transition

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/euler.h

    r1875 r1909  
    125125  ///Euler tour of \c g.
    126126  ///\code
    127   ///  for(UndirEulerIt<UndirListGraph> e(g),e!=INVALID;++e) {
    128   ///    std::cout << g.id(UndirEdge(e)) << std::eol;
     127  ///  for(UEulerIt<ListUGraph> e(g),e!=INVALID;++e) {
     128  ///    std::cout << g.id(UEdge(e)) << std::eol;
    129129  ///  }
    130130  ///\endcode
    131131  ///Although the iterator provides an Euler tour of an undirected graph,
    132   ///in order to indicate the direction of the tour, UndirEulerIt
     132  ///in order to indicate the direction of the tour, UEulerIt
    133133  ///returns directed edges (that convert to the undirected ones, of course).
    134134  ///
     
    136136  ///\todo Test required
    137137  template<class Graph>
    138   class UndirEulerIt
     138  class UEulerIt
    139139  {
    140140    typedef typename Graph::Node Node;
     
    147147    const Graph &g;
    148148    typename Graph::NodeMap<OutEdgeIt> nedge;
    149     typename Graph::UndirEdgeMap<bool> visited;
     149    typename Graph::UEdgeMap<bool> visited;
    150150    std::list<Edge> euler;
    151151
     
    157157    ///\param start The starting point of the tour. If it is not given
    158158    ///       the tour will start from the first node.
    159     UndirEulerIt(const Graph &_g,typename Graph::Node start=INVALID)
     159    UEulerIt(const Graph &_g,typename Graph::Node start=INVALID)
    160160      : g(_g), nedge(g), visited(g,false)
    161161    {
     
    176176   
    177177    ///Next edge of the tour
    178     UndirEulerIt &operator++() {
     178    UEulerIt &operator++() {
    179179      Node s=g.target(euler.front());
    180180      euler.pop_front();
     
    197197   
    198198    ///\warning This incrementation
    199     ///returns an \c Edge, not an \ref UndirEulerIt, as one may
     199    ///returns an \c Edge, not an \ref UEulerIt, as one may
    200200    ///expect.
    201201    Edge operator++(int)
     
    225225  bool
    226226#else
    227   typename enable_if<typename Graph::UndirTag,bool>::type
     227  typename enable_if<typename Graph::UTag,bool>::type
    228228  euler(const Graph &g)
    229229  {
     
    233233  }
    234234  template<class Graph>
    235   typename disable_if<typename Graph::UndirTag,bool>::type
     235  typename disable_if<typename Graph::UTag,bool>::type
    236236#endif
    237237  euler(const Graph &g)
Note: See TracChangeset for help on using the changeset viewer.