diff --git a/test/dfs_test.cc b/test/dfs_test.cc --- a/test/dfs_test.cc +++ b/test/dfs_test.cc @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -62,39 +62,74 @@ Digraph G; Node s, t; Arc e; - int l; + int l, i; bool b; DType::DistMap d(G); DType::PredMap p(G); Path pp; + concepts::ReadMap am; { DType dfs_test(G); + const DType& const_dfs_test = dfs_test; dfs_test.run(s); dfs_test.run(s,t); dfs_test.run(); - l = dfs_test.dist(t); - e = dfs_test.predArc(t); - s = dfs_test.predNode(t); - b = dfs_test.reached(t); - d = dfs_test.distMap(); - p = dfs_test.predMap(); - pp = dfs_test.path(t); + dfs_test.init(); + dfs_test.addSource(s); + e = dfs_test.processNextArc(); + e = const_dfs_test.nextArc(); + b = const_dfs_test.emptyQueue(); + i = const_dfs_test.queueSize(); + + dfs_test.start(); + dfs_test.start(t); + dfs_test.start(am); + + l = const_dfs_test.dist(t); + e = const_dfs_test.predArc(t); + s = const_dfs_test.predNode(t); + b = const_dfs_test.reached(t); + d = const_dfs_test.distMap(); + p = const_dfs_test.predMap(); + pp = const_dfs_test.path(t); } { DType ::SetPredMap > ::SetDistMap > ::SetReachedMap > + ::SetStandardProcessedMap ::SetProcessedMap > - ::SetStandardProcessedMap ::Create dfs_test(G); + concepts::ReadWriteMap pred_map; + concepts::ReadWriteMap dist_map; + concepts::ReadWriteMap reached_map; + concepts::WriteMap processed_map; + + dfs_test + .predMap(pred_map) + .distMap(dist_map) + .reachedMap(reached_map) + .processedMap(processed_map); + dfs_test.run(s); dfs_test.run(s,t); dfs_test.run(); + dfs_test.init(); + + dfs_test.addSource(s); + e = dfs_test.processNextArc(); + e = dfs_test.nextArc(); + b = dfs_test.emptyQueue(); + i = dfs_test.queueSize(); + + dfs_test.start(); + dfs_test.start(t); + dfs_test.start(am); l = dfs_test.dist(t); e = dfs_test.predArc(t);