COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/bfs_test.cc

    r585 r293  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2008
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    5959
    6060  Digraph G;
    61   Node s, t, n;
     61  Node s, t;
    6262  Arc e;
    63   int l, i;
     63  int l;
    6464  bool b;
    6565  BType::DistMap d(G);
    6666  BType::PredMap p(G);
    6767  Path<Digraph> pp;
    68   concepts::ReadMap<Node,bool> nm;
    6968
    7069  {
    7170    BType bfs_test(G);
    72     const BType& const_bfs_test = bfs_test;
    7371
    7472    bfs_test.run(s);
     
    7674    bfs_test.run();
    7775
    78     bfs_test.init();
    79     bfs_test.addSource(s);
    80     n = bfs_test.processNextNode();
    81     n = bfs_test.processNextNode(t, b);
    82     n = bfs_test.processNextNode(nm, n);
    83     n = const_bfs_test.nextNode();
    84     b = const_bfs_test.emptyQueue();
    85     i = const_bfs_test.queueSize();
    86    
    87     bfs_test.start();
    88     bfs_test.start(t);
    89     bfs_test.start(nm);
    90 
    91     l  = const_bfs_test.dist(t);
    92     e  = const_bfs_test.predArc(t);
    93     s  = const_bfs_test.predNode(t);
    94     b  = const_bfs_test.reached(t);
    95     d  = const_bfs_test.distMap();
    96     p  = const_bfs_test.predMap();
    97     pp = const_bfs_test.path(t);
     76    l  = bfs_test.dist(t);
     77    e  = bfs_test.predArc(t);
     78    s  = bfs_test.predNode(t);
     79    b  = bfs_test.reached(t);
     80    d  = bfs_test.distMap();
     81    p  = bfs_test.predMap();
     82    pp = bfs_test.path(t);
    9883  }
    9984  {
     
    10287      ::SetDistMap<concepts::ReadWriteMap<Node,int> >
    10388      ::SetReachedMap<concepts::ReadWriteMap<Node,bool> >
     89      ::SetProcessedMap<concepts::WriteMap<Node,bool> >
    10490      ::SetStandardProcessedMap
    105       ::SetProcessedMap<concepts::WriteMap<Node,bool> >
    10691      ::Create bfs_test(G);
    107      
    108     concepts::ReadWriteMap<Node,Arc> pred_map;
    109     concepts::ReadWriteMap<Node,int> dist_map;
    110     concepts::ReadWriteMap<Node,bool> reached_map;
    111     concepts::WriteMap<Node,bool> processed_map;
    112    
    113     bfs_test
    114       .predMap(pred_map)
    115       .distMap(dist_map)
    116       .reachedMap(reached_map)
    117       .processedMap(processed_map);
    11892
    11993    bfs_test.run(s);
    12094    bfs_test.run(s,t);
    12195    bfs_test.run();
    122    
    123     bfs_test.init();
    124     bfs_test.addSource(s);
    125     n = bfs_test.processNextNode();
    126     n = bfs_test.processNextNode(t, b);
    127     n = bfs_test.processNextNode(nm, n);
    128     n = bfs_test.nextNode();
    129     b = bfs_test.emptyQueue();
    130     i = bfs_test.queueSize();
    131    
    132     bfs_test.start();
    133     bfs_test.start(t);
    134     bfs_test.start(nm);
    13596
    13697    l  = bfs_test.dist(t);
Note: See TracChangeset for help on using the changeset viewer.