test/dfs_test.cc
branch1.2
changeset 931 c1a959df3b2c
parent 900 1861d5dcf312
child 944 02c93d1f00d7
equal deleted inserted replaced
11:21980fba0311 12:2a767638dced
     1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
     1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
     2  *
     2  *
     3  * This file is a part of LEMON, a generic C++ optimization library.
     3  * This file is a part of LEMON, a generic C++ optimization library.
     4  *
     4  *
     5  * Copyright (C) 2003-2010
     5  * Copyright (C) 2003-2011
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     8  *
     8  *
     9  * Permission to use, modify and distribute this software is granted
     9  * Permission to use, modify and distribute this software is granted
    10  * provided that this copyright notice appears in all copies. For
    10  * provided that this copyright notice appears in all copies. For
   217 
   217 
   218   {
   218   {
   219   Dfs<Digraph> dfs(G);
   219   Dfs<Digraph> dfs(G);
   220   check(dfs.run(s1,t1) && dfs.reached(t1),"Node 3 is reachable from Node 6.");
   220   check(dfs.run(s1,t1) && dfs.reached(t1),"Node 3 is reachable from Node 6.");
   221   }
   221   }
   222   
   222 
   223   {
   223   {
   224     NullMap<Node,Arc> myPredMap;
   224     NullMap<Node,Arc> myPredMap;
   225     dfs(G).predMap(myPredMap).run(s);
   225     dfs(G).predMap(myPredMap).run(s);
   226   }
   226   }
   227 }
   227 }