Various improvements in NetworkSimplex.
- Faster variant of "Altering Candidate List" pivot rule using make_heap
instead of partial_sort.
- Doc improvements.
- Removing unecessary inline keywords.
3 * This file is a part of LEMON, a generic C++ optimization library
5 * Copyright (C) 2003-2008
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 * (Egervary Research Group on Combinatorial Optimization, EGRES).
9 * Permission to use, modify and distribute this software is granted
10 * provided that this copyright notice appears in all copies. For
11 * precise terms see the accompanying LICENSE file.
13 * This software is provided "AS IS" with no warranty of any kind,
14 * express or implied, and with no claim as to its suitability for any
20 #include<lemon/smart_graph.h>
21 #include<lemon/concepts/graph.h>
22 #include<lemon/concepts/maps.h>
23 #include<lemon/list_graph_base.h>
24 #include<lemon/full_graph.h>
26 #include"test_tools.h"
27 #include"graph_test.h"
31 This test makes consistency checks of list graph structures.
33 G.addNode(), G.addEdge(), G.source(), G.target()
35 \todo Checks for empty graphs and isolated points.
39 using namespace lemon;
41 template<class Graph> void bidirPetersen(Graph &G)
43 typedef typename Graph::Edge Edge;
44 typedef typename Graph::EdgeIt EdgeIt;
46 checkGraphEdgeList(G,15);
50 for(EdgeIt e(G);e!=INVALID;++e) ee.push_back(e);
52 for(typename std::vector<Edge>::iterator p=ee.begin();p!=ee.end();p++)
53 G.addEdge(G.target(*p),G.source(*p));
56 template<class Graph> void checkPetersen(Graph &G)
58 typedef typename Graph::Node Node;
60 typedef typename Graph::EdgeIt EdgeIt;
61 typedef typename Graph::NodeIt NodeIt;
63 checkGraphNodeList(G,10);
64 checkGraphEdgeList(G,30);
66 for(NodeIt n(G);n!=INVALID;++n) {
67 checkGraphInEdgeList(G,n,3);
68 checkGraphOutEdgeList(G,n,3);
73 template void lemon::concepts::checkCompileGraph<concepts::Graph>
77 void lemon::concepts::checkCompileGraph<concepts::Graph>
81 void lemon::concepts::checkCompileGraph<concepts::Graph>
86 void lemon::concepts::checkCompileGraph<SmartGraph>(SmartGraph &);
88 void lemon::concepts::checkCompileGraphFindEdge<SmartGraph>(SmartGraph &);
90 //Compile SymSmartGraph
91 //template void hugo::checkCompileGraph<SymSmartGraph>(SymSmartGraph &);
92 //template void hugo::checkCompileGraphFindEdge<SymSmartGraph>(SymSmartGraph &);
96 void lemon::concepts::checkCompileGraph<ListGraph>(ListGraph &);
98 void lemon::concepts::checkCompileGraph<ListGraph>(ListGraph &);
100 void lemon::concepts::checkCompileGraphFindEdge<ListGraph>(ListGraph &);
103 //Compile SymListGraph
104 //template void hugo::checkCompileGraph<SymListGraph>(SymListGraph &);
105 //template void hugo::checkCompileGraph<SymListGraph>(SymListGraph &);
106 //template void hugo::checkCompileGraphFindEdge<SymListGraph>(SymListGraph &);
109 template void lemon::concepts::checkCompileGraph<FullGraph>(FullGraph &);
111 void lemon::concepts::checkCompileGraphFindEdge<FullGraph>(FullGraph &);
141 ///\todo copy constr tests.
145 // FIXME: These shouldn't be here.
146 using namespace concepts;
147 function_requires< ReadMapConcept< ReadMap<int,int> > >();
148 function_requires< WriteMapConcept< WriteMap<int,int> > >();
149 function_requires< ReadWriteMapConcept< ReadWriteMap<int,int> > >();
150 function_requires< ReferenceMapConcept< ReferenceMap<int,int> > >();
153 std::cout << __FILE__ ": All tests passed.\n";