src/test/graph_test.cc
changeset 933 1b7c88fbb950
parent 919 6153d9cf78c6
child 937 d4e911acef3d
equal deleted inserted replaced
22:c2efc975f4a3 23:7335273e60e2
     1 /* -*- C++ -*-
     1 /* -*- C++ -*-
     2  * src/test/graph_test.cc - Part of HUGOlib, a generic C++ optimization library
     2  * src/test/graph_test.cc - Part of LEMON, a generic C++ optimization library
     3  *
     3  *
     4  * Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     4  * Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     5  * (Egervary Combinatorial Optimization Research Group, EGRES).
     5  * (Egervary Combinatorial Optimization Research Group, EGRES).
     6  *
     6  *
     7  * Permission to use, modify and distribute this software is granted
     7  * Permission to use, modify and distribute this software is granted
    13  * purpose.
    13  * purpose.
    14  *
    14  *
    15  */
    15  */
    16 
    16 
    17 #include<iostream>
    17 #include<iostream>
    18 #include<hugo/smart_graph.h>
    18 #include<lemon/smart_graph.h>
    19 #include<hugo/skeletons/graph.h>
    19 #include<lemon/skeletons/graph.h>
    20 #include<hugo/list_graph.h>
    20 #include<lemon/list_graph.h>
    21 #include<hugo/full_graph.h>
    21 #include<lemon/full_graph.h>
    22 
    22 
    23 #include"test_tools.h"
    23 #include"test_tools.h"
    24 #include"graph_test.h"
    24 #include"graph_test.h"
    25 
    25 
    26 /**
    26 /**
    31 
    31 
    32 \todo Checks for empty graphs and isolated points.
    32 \todo Checks for empty graphs and isolated points.
    33 conversion.
    33 conversion.
    34 */
    34 */
    35 
    35 
    36 using namespace hugo;
    36 using namespace lemon;
    37 
    37 
    38 template<class Graph> void bidirPetersen(Graph &G)
    38 template<class Graph> void bidirPetersen(Graph &G)
    39 {
    39 {
    40   typedef typename Graph::Edge Edge;
    40   typedef typename Graph::Edge Edge;
    41   typedef typename Graph::EdgeIt EdgeIt;
    41   typedef typename Graph::EdgeIt EdgeIt;
    66     ++n;
    66     ++n;
    67   }  
    67   }  
    68 }
    68 }
    69 
    69 
    70 //Compile Graph
    70 //Compile Graph
    71 template void hugo::checkCompileStaticGraph<skeleton::StaticGraph>
    71 template void lemon::checkCompileStaticGraph<skeleton::StaticGraph>
    72 (skeleton::StaticGraph &);
    72 (skeleton::StaticGraph &);
    73 
    73 
    74 template void hugo::checkCompileGraph<skeleton::ExtendableGraph>
    74 template void lemon::checkCompileGraph<skeleton::ExtendableGraph>
    75 (skeleton::ExtendableGraph &);
    75 (skeleton::ExtendableGraph &);
    76 
    76 
    77 template void hugo::checkCompileErasableGraph<skeleton::ErasableGraph>
    77 template void lemon::checkCompileErasableGraph<skeleton::ErasableGraph>
    78 (skeleton::ErasableGraph &);
    78 (skeleton::ErasableGraph &);
    79 
    79 
    80 //Compile SmartGraph
    80 //Compile SmartGraph
    81 template void hugo::checkCompileGraph<SmartGraph>(SmartGraph &);
    81 template void lemon::checkCompileGraph<SmartGraph>(SmartGraph &);
    82 template void hugo::checkCompileGraphFindEdge<SmartGraph>(SmartGraph &);
    82 template void lemon::checkCompileGraphFindEdge<SmartGraph>(SmartGraph &);
    83 
    83 
    84 //Compile SymSmartGraph
    84 //Compile SymSmartGraph
    85 template void hugo::checkCompileGraph<SymSmartGraph>(SymSmartGraph &);
    85 template void lemon::checkCompileGraph<SymSmartGraph>(SymSmartGraph &);
    86 template void hugo::checkCompileGraphFindEdge<SymSmartGraph>(SymSmartGraph &);
    86 template void lemon::checkCompileGraphFindEdge<SymSmartGraph>(SymSmartGraph &);
    87 
    87 
    88 //Compile ListGraph
    88 //Compile ListGraph
    89 template void hugo::checkCompileGraph<ListGraph>(ListGraph &);
    89 template void lemon::checkCompileGraph<ListGraph>(ListGraph &);
    90 template void hugo::checkCompileErasableGraph<ListGraph>(ListGraph &);
    90 template void lemon::checkCompileErasableGraph<ListGraph>(ListGraph &);
    91 template void hugo::checkCompileGraphFindEdge<ListGraph>(ListGraph &);
    91 template void lemon::checkCompileGraphFindEdge<ListGraph>(ListGraph &);
    92 
    92 
    93 
    93 
    94 //Compile SymListGraph
    94 //Compile SymListGraph
    95 template void hugo::checkCompileGraph<SymListGraph>(SymListGraph &);
    95 template void lemon::checkCompileGraph<SymListGraph>(SymListGraph &);
    96 template void hugo::checkCompileErasableGraph<SymListGraph>(SymListGraph &);
    96 template void lemon::checkCompileErasableGraph<SymListGraph>(SymListGraph &);
    97 template void hugo::checkCompileGraphFindEdge<SymListGraph>(SymListGraph &);
    97 template void lemon::checkCompileGraphFindEdge<SymListGraph>(SymListGraph &);
    98 
    98 
    99 //Compile FullGraph
    99 //Compile FullGraph
   100 template void hugo::checkCompileStaticGraph<FullGraph>(FullGraph &);
   100 template void lemon::checkCompileStaticGraph<FullGraph>(FullGraph &);
   101 template void hugo::checkCompileGraphFindEdge<FullGraph>(FullGraph &);
   101 template void lemon::checkCompileGraphFindEdge<FullGraph>(FullGraph &);
   102 
   102 
   103 //Compile EdgeSet <ListGraph>
   103 //Compile EdgeSet <ListGraph>
   104 template void hugo::checkCompileGraph<EdgeSet <ListGraph> >
   104 template void lemon::checkCompileGraph<EdgeSet <ListGraph> >
   105 (EdgeSet <ListGraph> &);
   105 (EdgeSet <ListGraph> &);
   106 template void hugo::checkCompileGraphEraseEdge<EdgeSet <ListGraph> >
   106 template void lemon::checkCompileGraphEraseEdge<EdgeSet <ListGraph> >
   107 (EdgeSet <ListGraph> &);
   107 (EdgeSet <ListGraph> &);
   108 template void hugo::checkCompileGraphFindEdge<EdgeSet <ListGraph> >
   108 template void lemon::checkCompileGraphFindEdge<EdgeSet <ListGraph> >
   109 (EdgeSet <ListGraph> &);
   109 (EdgeSet <ListGraph> &);
   110 
   110 
   111 //Compile EdgeSet <NodeSet>
   111 //Compile EdgeSet <NodeSet>
   112 template void hugo::checkCompileGraph<EdgeSet <NodeSet> >(EdgeSet <NodeSet> &);
   112 template void lemon::checkCompileGraph<EdgeSet <NodeSet> >(EdgeSet <NodeSet> &);
   113 template void hugo::checkCompileGraphEraseEdge<EdgeSet <NodeSet> >
   113 template void lemon::checkCompileGraphEraseEdge<EdgeSet <NodeSet> >
   114 (EdgeSet <NodeSet> &);
   114 (EdgeSet <NodeSet> &);
   115 template void hugo::checkCompileGraphFindEdge<EdgeSet <NodeSet> >
   115 template void lemon::checkCompileGraphFindEdge<EdgeSet <NodeSet> >
   116 (EdgeSet <NodeSet> &);
   116 (EdgeSet <NodeSet> &);
   117 
   117 
   118 
   118 
   119 int main() 
   119 int main() 
   120 {
   120 {