COIN-OR::LEMON - Graph Library

Changeset 919:6153d9cf78c6 in lemon-0.x for src/test


Ignore:
Timestamp:
09/29/04 16:02:14 (16 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1230
Message:
  • Backport -r1227 and -r1220
  • Temporarily remove (move to attic) tight_edge_filter.h
Location:
src/test
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • src/test/Makefile.am

    r909 r919  
    1010        dijkstra_test \
    1111        graph_test \
    12         sym_graph_test \
    1312        graph_wrapper_test \
    1413        kruskal_test \
     
    3029dijkstra_test_SOURCES = dijkstra_test.cc
    3130graph_test_SOURCES = graph_test.cc
    32 sym_graph_test_SOURCES = sym_graph_test.cc
    3331graph_wrapper_test_SOURCES = graph_wrapper_test.cc
    3432kruskal_test_SOURCES = kruskal_test.cc
  • src/test/graph_test.cc

    r909 r919  
    6464    checkGraphInEdgeList(G,n,3);
    6565    checkGraphOutEdgeList(G,n,3);
     66    ++n;
    6667  } 
    6768}
     
    8283
    8384//Compile SymSmartGraph
    84 //template void hugo::checkCompileGraph<SymSmartGraph>(SymSmartGraph &);
    85 //template void hugo::checkCompileGraphFindEdge<SymSmartGraph>(SymSmartGraph &);
     85template void hugo::checkCompileGraph<SymSmartGraph>(SymSmartGraph &);
     86template void hugo::checkCompileGraphFindEdge<SymSmartGraph>(SymSmartGraph &);
    8687
    8788//Compile ListGraph
     
    9293
    9394//Compile SymListGraph
    94 //template void hugo::checkCompileGraph<SymListGraph>(SymListGraph &);
    95 //template void hugo::checkCompileErasableGraph<SymListGraph>(SymListGraph &);
    96 //template void hugo::checkCompileGraphFindEdge<SymListGraph>(SymListGraph &);
     95template void hugo::checkCompileGraph<SymListGraph>(SymListGraph &);
     96template void hugo::checkCompileErasableGraph<SymListGraph>(SymListGraph &);
     97template void hugo::checkCompileGraphFindEdge<SymListGraph>(SymListGraph &);
    9798
    9899//Compile FullGraph
     
    131132  }
    132133  {
    133     //    SymSmartGraph G;
    134     //    addPetersen(G);
    135     //    checkPetersen(G);
     134    SymSmartGraph G;
     135    addPetersen(G);
     136    checkPetersen(G);
    136137  }
    137138  {
    138     //    SymListGraph G;
    139     //    addPetersen(G);
    140     //    checkPetersen(G);
     139    SymListGraph G;
     140    addPetersen(G);
     141    checkPetersen(G);
    141142  }
    142143
  • src/test/graph_test.h

    r916 r919  
    299299      for(int i=0;i<nn;i++) {
    300300        check(e!=INVALID,"Wrong OutEdge list linking.");
    301         check(n==G.tail(e), "Wrong OutEdge list linking.");
    302301        ++e;
    303302      }
     
    312311      for(int i=0;i<nn;i++) {
    313312        check(e!=INVALID,"Wrong InEdge list linking.");
    314         check(n==G.head(e), "Wrong InEdge list linking.");
    315313        ++e;
    316314      }
  • src/test/test_tools.h

    r909 r919  
    6868
    6969///Adds a Petersen graph to \c G.
    70 ///\return The nodes and edges of the generated graph.
     70///\return The nodes end edges og the generated graph.
    7171
    7272template<typename Graph>
     
    8888}
    8989
    90 ///Structure returned by \ref addSymPetersen().
    9190
    92 ///Structure returned by \ref addSymPetersen().
    93 ///
    94 template<class Graph> struct SymPetStruct
    95 {
    96   ///Vector containing the outer nodes.
    97   std::vector<typename Graph::Node> outer;
    98   ///Vector containing the inner nodes.
    99   std::vector<typename Graph::Node> inner;
    100   ///Vector containing the edges of the inner circle.
    101   std::vector<typename Graph::SymEdge> incir;
    102   ///Vector containing the edges of the outer circle.
    103   std::vector<typename Graph::SymEdge> outcir;
    104   ///Vector containing the chord edges.
    105   std::vector<typename Graph::SymEdge> chords;
    106 };
    107 
    108 ///Adds a Petersen graph to the symmetric \c G.
    109 
    110 ///Adds a Petersen graph to the symmetric \c G.
    111 ///\return The nodes and edges of the generated graph.
    112 
    113 template<typename Graph>
    114 SymPetStruct<Graph> addSymPetersen(Graph &G,int num=5)
    115 {
    116   SymPetStruct<Graph> n;
    117 
    118   for(int i=0;i<num;i++) {
    119     n.outer.push_back(G.addNode());
    120     n.inner.push_back(G.addNode());
    121   }
    122 
    123  for(int i=0;i<num;i++) {
    124    n.chords.push_back(G.addEdge(n.outer[i],n.inner[i]));
    125    n.outcir.push_back(G.addEdge(n.outer[i],n.outer[(i+1)%5]));
    126    n.incir.push_back(G.addEdge(n.inner[i],n.inner[(i+2)%5]));
    127   }
    128  return n;
    129 }
    13091
    13192#endif
Note: See TracChangeset for help on using the changeset viewer.