COIN-OR::LEMON - Graph Library

Changeset 2539:c25f62a6452d in lemon-0.x for benchmark/edge_lookup.cc


Ignore:
Timestamp:
12/11/07 18:37:08 (12 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3416
Message:

DynEdgeLookUp? implementation based on splay trees
In general case it is slower than the static version, but it should not
refreshed on the change of the graph

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/edge_lookup.cc

    r2510 r2539  
    413413 
    414414};
     415
     416class DEL
     417{
     418public:
     419  Graph &_g;
     420  DynEdgeLookUp<Graph> _el;
     421  DEL(Graph &g) :_g(g), _el(g) {}
     422  void operator()()
     423  {
     424    Edge e;
     425   
     426    for(NodeIt v(_g);v!=INVALID;++v)
     427      for(NodeIt u(_g);u!=INVALID;++u)
     428        e=_el(u,v);
     429  }
     430 
     431};
     432
    415433class EL2
    416434{
     
    513531  TimeStamp t1 = runningTimeTest(FE(g),1);
    514532  TimeStamp t2 = runningTimeTest(EL(g),1);
    515   TimeStamp t3 = runningTimeTest(EL2(g),1);
    516   TimeStamp t4 = runningTimeTest(EL3(g),1);
     533  TimeStamp t3 = runningTimeTest(DEL(g),1);
     534  TimeStamp t4 = runningTimeTest(EL2(g),1);
     535  TimeStamp t5 = runningTimeTest(EL3(g),1);
    517536//   TimeStamp t5 = runningTimeTest(EL4(g),1);
    518537//   TimeStamp t6 = runningTimeTest(EL5(g),1);
    519538
     539  std::cout << t1.userTime() << ' '
     540            << t2.userTime() << ' '
     541            << t3.userTime() << ' '
     542            << t4.userTime() << ' '
     543            << t5.userTime() << ' '
     544//          << t5.userTime() << ' '
     545//          << t6.userTime()
     546            << std::endl;
    520547  std::cout << t1.userTime()/N/N << ' '
    521548            << t2.userTime()/N/N << ' '
    522549            << t3.userTime()/N/N << ' '
    523550            << t4.userTime()/N/N << ' '
     551            << t5.userTime()/N/N << ' '
    524552//          << t5.userTime()/N/N << ' '
    525553//          << t6.userTime()/N/N
Note: See TracChangeset for help on using the changeset viewer.