COIN-OR::LEMON - Graph Library

Changeset 585:65fbcf2f978a in lemon-1.2 for test/dfs_test.cc


Ignore:
Timestamp:
04/15/09 03:26:45 (11 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Improve test files for some algorithms (#263)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/dfs_test.cc

    r440 r585  
    6363  Node s, t;
    6464  Arc e;
    65   int l;
     65  int l, i;
    6666  bool b;
    6767  DType::DistMap d(G);
    6868  DType::PredMap p(G);
    6969  Path<Digraph> pp;
     70  concepts::ReadMap<Arc,bool> am;
    7071
    7172  {
    7273    DType dfs_test(G);
     74    const DType& const_dfs_test = dfs_test;
    7375
    7476    dfs_test.run(s);
     
    7678    dfs_test.run();
    7779
    78     l  = dfs_test.dist(t);
    79     e  = dfs_test.predArc(t);
    80     s  = dfs_test.predNode(t);
    81     b  = dfs_test.reached(t);
    82     d  = dfs_test.distMap();
    83     p  = dfs_test.predMap();
    84     pp = dfs_test.path(t);
     80    dfs_test.init();
     81    dfs_test.addSource(s);
     82    e = dfs_test.processNextArc();
     83    e = const_dfs_test.nextArc();
     84    b = const_dfs_test.emptyQueue();
     85    i = const_dfs_test.queueSize();
     86   
     87    dfs_test.start();
     88    dfs_test.start(t);
     89    dfs_test.start(am);
     90
     91    l  = const_dfs_test.dist(t);
     92    e  = const_dfs_test.predArc(t);
     93    s  = const_dfs_test.predNode(t);
     94    b  = const_dfs_test.reached(t);
     95    d  = const_dfs_test.distMap();
     96    p  = const_dfs_test.predMap();
     97    pp = const_dfs_test.path(t);
    8598  }
    8699  {
     
    89102      ::SetDistMap<concepts::ReadWriteMap<Node,int> >
    90103      ::SetReachedMap<concepts::ReadWriteMap<Node,bool> >
     104      ::SetStandardProcessedMap
    91105      ::SetProcessedMap<concepts::WriteMap<Node,bool> >
    92       ::SetStandardProcessedMap
    93106      ::Create dfs_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    dfs_test
     114      .predMap(pred_map)
     115      .distMap(dist_map)
     116      .reachedMap(reached_map)
     117      .processedMap(processed_map);
    94118
    95119    dfs_test.run(s);
    96120    dfs_test.run(s,t);
    97121    dfs_test.run();
     122    dfs_test.init();
     123
     124    dfs_test.addSource(s);
     125    e = dfs_test.processNextArc();
     126    e = dfs_test.nextArc();
     127    b = dfs_test.emptyQueue();
     128    i = dfs_test.queueSize();
     129   
     130    dfs_test.start();
     131    dfs_test.start(t);
     132    dfs_test.start(am);
    98133
    99134    l  = dfs_test.dist(t);
Note: See TracChangeset for help on using the changeset viewer.