1.1 --- a/test/dfs_test.cc Fri Oct 16 10:21:37 2009 +0200
1.2 +++ b/test/dfs_test.cc Thu Nov 05 15:50:01 2009 +0100
1.3 @@ -2,7 +2,7 @@
1.4 *
1.5 * This file is a part of LEMON, a generic C++ optimization library.
1.6 *
1.7 - * Copyright (C) 2003-2008
1.8 + * Copyright (C) 2003-2009
1.9 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
1.10 * (Egervary Research Group on Combinatorial Optimization, EGRES).
1.11 *
1.12 @@ -62,39 +62,74 @@
1.13 Digraph G;
1.14 Node s, t;
1.15 Arc e;
1.16 - int l;
1.17 + int l, i;
1.18 bool b;
1.19 DType::DistMap d(G);
1.20 DType::PredMap p(G);
1.21 Path<Digraph> pp;
1.22 + concepts::ReadMap<Arc,bool> am;
1.23
1.24 {
1.25 DType dfs_test(G);
1.26 + const DType& const_dfs_test = dfs_test;
1.27
1.28 dfs_test.run(s);
1.29 dfs_test.run(s,t);
1.30 dfs_test.run();
1.31
1.32 - l = dfs_test.dist(t);
1.33 - e = dfs_test.predArc(t);
1.34 - s = dfs_test.predNode(t);
1.35 - b = dfs_test.reached(t);
1.36 - d = dfs_test.distMap();
1.37 - p = dfs_test.predMap();
1.38 - pp = dfs_test.path(t);
1.39 + dfs_test.init();
1.40 + dfs_test.addSource(s);
1.41 + e = dfs_test.processNextArc();
1.42 + e = const_dfs_test.nextArc();
1.43 + b = const_dfs_test.emptyQueue();
1.44 + i = const_dfs_test.queueSize();
1.45 +
1.46 + dfs_test.start();
1.47 + dfs_test.start(t);
1.48 + dfs_test.start(am);
1.49 +
1.50 + l = const_dfs_test.dist(t);
1.51 + e = const_dfs_test.predArc(t);
1.52 + s = const_dfs_test.predNode(t);
1.53 + b = const_dfs_test.reached(t);
1.54 + d = const_dfs_test.distMap();
1.55 + p = const_dfs_test.predMap();
1.56 + pp = const_dfs_test.path(t);
1.57 }
1.58 {
1.59 DType
1.60 ::SetPredMap<concepts::ReadWriteMap<Node,Arc> >
1.61 ::SetDistMap<concepts::ReadWriteMap<Node,int> >
1.62 ::SetReachedMap<concepts::ReadWriteMap<Node,bool> >
1.63 + ::SetStandardProcessedMap
1.64 ::SetProcessedMap<concepts::WriteMap<Node,bool> >
1.65 - ::SetStandardProcessedMap
1.66 ::Create dfs_test(G);
1.67
1.68 + concepts::ReadWriteMap<Node,Arc> pred_map;
1.69 + concepts::ReadWriteMap<Node,int> dist_map;
1.70 + concepts::ReadWriteMap<Node,bool> reached_map;
1.71 + concepts::WriteMap<Node,bool> processed_map;
1.72 +
1.73 + dfs_test
1.74 + .predMap(pred_map)
1.75 + .distMap(dist_map)
1.76 + .reachedMap(reached_map)
1.77 + .processedMap(processed_map);
1.78 +
1.79 dfs_test.run(s);
1.80 dfs_test.run(s,t);
1.81 dfs_test.run();
1.82 + dfs_test.init();
1.83 +
1.84 + dfs_test.addSource(s);
1.85 + e = dfs_test.processNextArc();
1.86 + e = dfs_test.nextArc();
1.87 + b = dfs_test.emptyQueue();
1.88 + i = dfs_test.queueSize();
1.89 +
1.90 + dfs_test.start();
1.91 + dfs_test.start(t);
1.92 + dfs_test.start(am);
1.93
1.94 l = dfs_test.dist(t);
1.95 e = dfs_test.predArc(t);