src/test/graph_factory_test.cc
changeset 1142 450f794dca81
parent 959 c80ef5912903
child 1164 80bb73097736
equal deleted inserted replaced
1:655833a8c368 2:f1b618fbcaa6
    26 
    26 
    27 /**
    27 /**
    28 \file
    28 \file
    29 This test makes consistency checks of list graph structures.
    29 This test makes consistency checks of list graph structures.
    30 
    30 
    31 G.addNode(), G.addEdge(), G.tail(), G.head()
    31 G.addNode(), G.addEdge(), G.source(), G.target()
    32 
    32 
    33 \todo Checks for empty graphs and isolated points.
    33 \todo Checks for empty graphs and isolated points.
    34 conversion.
    34 conversion.
    35 */
    35 */
    36 
    36 
    46   std::vector<Edge> ee;
    46   std::vector<Edge> ee;
    47   
    47   
    48   for(EdgeIt e(G);e!=INVALID;++e) ee.push_back(e);
    48   for(EdgeIt e(G);e!=INVALID;++e) ee.push_back(e);
    49 
    49 
    50   for(typename std::vector<Edge>::iterator p=ee.begin();p!=ee.end();p++)
    50   for(typename std::vector<Edge>::iterator p=ee.begin();p!=ee.end();p++)
    51     G.addEdge(G.head(*p),G.tail(*p));
    51     G.addEdge(G.target(*p),G.source(*p));
    52 }
    52 }
    53 
    53 
    54 template<class Graph> void checkPetersen(Graph &G)
    54 template<class Graph> void checkPetersen(Graph &G)
    55 {
    55 {
    56   typedef typename Graph::Node Node;
    56   typedef typename Graph::Node Node;