test/dfs_test.cc
changeset 1153 4bb9e72e1a41
parent 1009 c85f53572941
parent 956 141f9c0db4a3
child 1110 02c93d1f00d7
child 1111 c8fce9beb46a
child 1173 d216e1c8b3fa
equal deleted inserted replaced
11:c1349bb7192e 16:4e31857dea84
     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-2009
     5  * Copyright (C) 2003-2010
     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
    84     dfs_test.addSource(s);
    84     dfs_test.addSource(s);
    85     e = dfs_test.processNextArc();
    85     e = dfs_test.processNextArc();
    86     e = const_dfs_test.nextArc();
    86     e = const_dfs_test.nextArc();
    87     b = const_dfs_test.emptyQueue();
    87     b = const_dfs_test.emptyQueue();
    88     i = const_dfs_test.queueSize();
    88     i = const_dfs_test.queueSize();
    89     
    89 
    90     dfs_test.start();
    90     dfs_test.start();
    91     dfs_test.start(t);
    91     dfs_test.start(t);
    92     dfs_test.start(am);
    92     dfs_test.start(am);
    93 
    93 
    94     l  = const_dfs_test.dist(t);
    94     l  = const_dfs_test.dist(t);
   110 
   110 
   111     concepts::ReadWriteMap<Node,Arc> pred_map;
   111     concepts::ReadWriteMap<Node,Arc> pred_map;
   112     concepts::ReadWriteMap<Node,int> dist_map;
   112     concepts::ReadWriteMap<Node,int> dist_map;
   113     concepts::ReadWriteMap<Node,bool> reached_map;
   113     concepts::ReadWriteMap<Node,bool> reached_map;
   114     concepts::WriteMap<Node,bool> processed_map;
   114     concepts::WriteMap<Node,bool> processed_map;
   115     
   115 
   116     dfs_test
   116     dfs_test
   117       .predMap(pred_map)
   117       .predMap(pred_map)
   118       .distMap(dist_map)
   118       .distMap(dist_map)
   119       .reachedMap(reached_map)
   119       .reachedMap(reached_map)
   120       .processedMap(processed_map);
   120       .processedMap(processed_map);
   127     dfs_test.addSource(s);
   127     dfs_test.addSource(s);
   128     e = dfs_test.processNextArc();
   128     e = dfs_test.processNextArc();
   129     e = dfs_test.nextArc();
   129     e = dfs_test.nextArc();
   130     b = dfs_test.emptyQueue();
   130     b = dfs_test.emptyQueue();
   131     i = dfs_test.queueSize();
   131     i = dfs_test.queueSize();
   132     
   132 
   133     dfs_test.start();
   133     dfs_test.start();
   134     dfs_test.start(t);
   134     dfs_test.start(t);
   135     dfs_test.start(am);
   135     dfs_test.start(am);
   136 
   136 
   137     l  = dfs_test.dist(t);
   137     l  = dfs_test.dist(t);