COIN-OR::LEMON - Graph Library

Changeset 1909:2d806130e700 in lemon-0.x for test/ugraph_test.cc


Ignore:
Timestamp:
01/26/06 16:42:13 (14 years ago)
Author:
Mihaly Barasz
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2484
Message:

Undir -> U transition

File:
1 moved

Legend:

Unmodified
Added
Removed
  • test/ugraph_test.cc

    r1795 r1909  
    22
    33#include <lemon/bits/graph_extender.h>
    4 #include <lemon/concept/undir_graph.h>
     4#include <lemon/concept/ugraph.h>
    55#include <lemon/list_graph.h>
    66#include <lemon/smart_graph.h>
     
    1717
    1818void check_concepts() {
    19   typedef UndirGraphExtender<ListGraphBase> UndirListGraphBase;
    20 
    21   typedef IterableUndirGraphExtender<
    22     AlterableUndirGraphExtender<UndirListGraphBase> > IterableUndirListGraph;
    23 
    24   typedef MappableUndirGraphExtender<IterableUndirListGraph>
    25     MappableUndirListGraph;
    26 
    27   typedef ErasableUndirGraphExtender<
    28     ClearableUndirGraphExtender<
    29     ExtendableUndirGraphExtender<MappableUndirListGraph> > > Graph;
    30 
    31   checkConcept<BaseIterableUndirGraphConcept, Graph>();
    32   checkConcept<IterableUndirGraphConcept, Graph>();
    33   checkConcept<MappableUndirGraphConcept, Graph>();
    34 
    35   checkConcept<UndirGraph, Graph>();
    36   checkConcept<ErasableUndirGraph, Graph>();
    37 
    38   checkConcept<UndirGraph, UndirListGraph>();
    39   checkConcept<ErasableUndirGraph, UndirListGraph>();
    40 
    41   checkConcept<UndirGraph, UndirSmartGraph>();
    42   checkConcept<ExtendableUndirGraph, UndirSmartGraph>();
    43 
    44   checkConcept<UndirGraph, UndirFullGraph>();
    45 
    46   checkConcept<UndirGraph, UndirGraph>();
    47 
    48   checkConcept<UndirGraph, GridGraph>();
     19  typedef UGraphExtender<ListGraphBase> ListUGraphBase;
     20
     21  typedef IterableUGraphExtender<
     22    AlterableUGraphExtender<ListUGraphBase> > IterableListUGraph;
     23
     24  typedef MappableUGraphExtender<IterableListUGraph>
     25    MappableListUGraph;
     26
     27  typedef ErasableUGraphExtender<
     28    ClearableUGraphExtender<
     29    ExtendableUGraphExtender<MappableListUGraph> > > Graph;
     30
     31  checkConcept<BaseIterableUGraphConcept, Graph>();
     32  checkConcept<IterableUGraphConcept, Graph>();
     33  checkConcept<MappableUGraphConcept, Graph>();
     34
     35  checkConcept<UGraph, Graph>();
     36  checkConcept<ErasableUGraph, Graph>();
     37
     38  checkConcept<UGraph, ListUGraph>();
     39  checkConcept<ErasableUGraph, ListUGraph>();
     40
     41  checkConcept<UGraph, SmartUGraph>();
     42  checkConcept<ExtendableUGraph, SmartUGraph>();
     43
     44  checkConcept<UGraph, FullUGraph>();
     45
     46  checkConcept<UGraph, UGraph>();
     47
     48  checkConcept<UGraph, GridGraph>();
    4949}
    5050
     
    6868
    6969  int uee = 0;
    70   for (typename Graph::UndirEdgeIt it(g); it != INVALID; ++it) {
     70  for (typename Graph::UEdgeIt it(g); it != INVALID; ++it) {
    7171    ++uee;
    7272  }
    7373
    74   check(uee == e, "Wrong undir edge number.");
    75   check(countUndirEdges(g) == e, "Wrong undir edge number.");
     74  check(uee == e, "Wrong uedge number.");
     75  check(countUEdges(g) == e, "Wrong uedge number.");
    7676}
    7777
     
    8080
    8181  typedef typename Graph::NodeIt NodeIt;
    82   typedef typename Graph::UndirEdgeIt UEdgeIt;
     82  typedef typename Graph::UEdgeIt UEdgeIt;
    8383  typedef typename Graph::EdgeIt EdgeIt;
    8484
     
    8989  }
    9090
    91   std::cout << "UndirEdge" << std::endl;
     91  std::cout << "UEdge" << std::endl;
    9292  i=0;
    9393  for(UEdgeIt it(g); it!=INVALID; ++it, ++i) {
     
    111111
    112112  typedef typename Graph::Node Node;
    113   typedef typename Graph::UndirEdge UEdge;
     113  typedef typename Graph::UEdge UEdge;
    114114  typedef typename Graph::Edge Edge;
    115115  typedef typename Graph::NodeIt NodeIt;
    116   typedef typename Graph::UndirEdgeIt UEdgeIt;
     116  typedef typename Graph::UEdgeIt UEdgeIt;
    117117  typedef typename Graph::EdgeIt EdgeIt;
    118118
     
    182182  check_concepts();
    183183
    184   check_graph<UndirListGraph>();
    185   check_graph<UndirSmartGraph>();
     184  check_graph<ListUGraph>();
     185  check_graph<SmartUGraph>();
    186186
    187187  {
    188     UndirFullGraph g(5);
     188    FullUGraph g(5);
    189189    check_item_counts(g, 5, 10);
    190190  }
Note: See TracChangeset for help on using the changeset viewer.