test/euler_test.cc
changeset 535 6a17a722b50e
parent 522 22f932bbb305
child 592 2ebfdb89ec66
equal deleted inserted replaced
0:94ffa78f548d 1:34281b2714f4
    23 using namespace lemon;
    23 using namespace lemon;
    24 
    24 
    25 template <typename Digraph>
    25 template <typename Digraph>
    26 void checkDiEulerIt(const Digraph& g)
    26 void checkDiEulerIt(const Digraph& g)
    27 {
    27 {
    28   typename Digraph::template ArcMap<int> visitationNumber(g);
    28   typename Digraph::template ArcMap<int> visitationNumber(g, 0);
    29 
    29 
    30   DiEulerIt<Digraph> e(g);
    30   DiEulerIt<Digraph> e(g);
    31   typename Digraph::Node firstNode = g.source(e);
    31   typename Digraph::Node firstNode = g.source(e);
    32   typename Digraph::Node lastNode;
    32   typename Digraph::Node lastNode = g.target(e);
    33 
    33 
    34   for (; e != INVALID; ++e)
    34   for (; e != INVALID; ++e)
    35   {
    35   {
    36     if (e != INVALID)
    36     if (e != INVALID)
    37     {
    37     {
    51 }
    51 }
    52 
    52 
    53 template <typename Graph>
    53 template <typename Graph>
    54 void checkEulerIt(const Graph& g)
    54 void checkEulerIt(const Graph& g)
    55 {
    55 {
    56   typename Graph::template EdgeMap<int> visitationNumber(g);
    56   typename Graph::template EdgeMap<int> visitationNumber(g, 0);
    57 
    57 
    58   EulerIt<Graph> e(g);
    58   EulerIt<Graph> e(g);
    59   typename Graph::Node firstNode = g.u(e);
    59   typename Graph::Node firstNode = g.u(e);
    60   typename Graph::Node lastNode;
    60   typename Graph::Node lastNode = g.v(e);
    61 
    61 
    62   for (; e != INVALID; ++e)
    62   for (; e != INVALID; ++e)
    63   {
    63   {
    64     if (e != INVALID)
    64     if (e != INVALID)
    65     {
    65     {