Changeset 2111:ea1fa1bc3f6d in lemon-0.x
- Timestamp:
- 06/28/06 17:06:24 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2817
- Files:
-
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/graphs.dox
r1638 r2111 2 2 3 3 \page graphs Graphs 4 5 \todo Write a new Graphs page. I think it should be contain the Graph, 6 UGraph and BpUGraph concept. It should be describe the iterators and 7 the basic functions and the differences of the implementations. 4 8 5 9 The primary data structures of LEMON are the graph classes. They all … … 8 12 as incoming and outgoing edges of a given node. 9 13 14 Each graph should meet the \ref lemon::concept::Graph "Graph" concept. 15 This concept does not make it possible to change the graph (i.e. it is 16 not possible to add or delete edges or nodes). Most of the graph 17 algorithms will run on these graphs. 10 18 11 Each graph should meet the12 \ref lemon::concept::StaticGraph "StaticGraph" concept.13 This concept does not14 make it possible to change the graph (i.e. it is not possible to add15 or delete edges or nodes). Most of the graph algorithms will run on16 these graphs.17 18 The graphs meeting the19 \ref lemon::concept::ExtendableGraph "ExtendableGraph"20 concept allow node and21 edge addition. You can also "clear" such a graph (i.e. erase all edges and nodes ).22 19 23 20 In case of graphs meeting the full feature … … 37 34 \li \ref lemon::FullGraph "FullGraph" 38 35 implements a complete graph. It is a 39 \ref lemon::concept:: StaticGraph "StaticGraph", so you cannot36 \ref lemon::concept::Graph "Graph", so you cannot 40 37 change the number of nodes once it is constructed. It is extremely memory 41 38 efficient: it uses constant amount of memory independently from the number of -
lemon/bellman_ford.h
r2074 r2111 165 165 /// BellmanFord, it is only passed to \ref BellmanFordDefaultTraits. 166 166 /// \param _LengthMap This read-only EdgeMap determines the lengths of the 167 /// edges. The default map type is \ref concept:: StaticGraph::EdgeMap167 /// edges. The default map type is \ref concept::Graph::EdgeMap 168 168 /// "Graph::EdgeMap<int>". The value of _LengthMap is not used directly 169 169 /// by BellmanFord, it is only passed to \ref BellmanFordDefaultTraits. -
lemon/concept/bpugraph.h
r1993 r2111 948 948 }; 949 949 950 /// \brief An empty non-static undirected graph class.951 ///952 /// This class provides everything that \ref BpUGraph does.953 /// Additionally it enables building graphs from scratch.954 class ExtendableBpUGraph : public BpUGraph {955 public:956 957 /// \brief Add a new ANode to the graph.958 ///959 /// Add a new ANode to the graph.960 /// \return the new node.961 Node addANode();962 963 /// \brief Add a new ANode to the graph.964 ///965 /// Add a new ANode to the graph.966 /// \return the new node.967 Node addBNode();968 969 /// \brief Add a new undirected edge to the graph.970 ///971 /// Add a new undirected edge to the graph. One of the nodes972 /// should be ANode and the other should be BNode.973 /// \pre The nodes are not in the same nodeset.974 /// \return the new edge.975 UEdge addEdge(const Node& from, const Node& to);976 977 /// \brief Resets the graph.978 ///979 /// This function deletes all undirected edges and nodes of the graph.980 /// It also frees the memory allocated to store them.981 void clear() { }982 983 template <typename Graph>984 struct Constraints {985 void constraints() {}986 };987 988 };989 990 /// \brief An empty erasable undirected graph class.991 ///992 /// This class is an extension of \ref ExtendableBpUGraph. It makes it993 /// possible to erase undirected edges or nodes.994 class ErasableBpUGraph : public ExtendableBpUGraph {995 public:996 997 /// \brief Deletes a node.998 ///999 /// Deletes a node.1000 ///1001 void erase(Node) { }1002 /// \brief Deletes an undirected edge.1003 ///1004 /// Deletes an undirected edge.1005 ///1006 void erase(UEdge) { }1007 1008 template <typename Graph>1009 struct Constraints {1010 void constraints() {}1011 };1012 1013 };1014 950 1015 951 /// @} -
lemon/concept/graph.h
r2090 r2111 39 39 // \brief Modular static graph class. 40 40 // 41 // It should be the same as the \c StaticGraph class.42 class _ StaticGraph41 // It should be the same as the \c Graph class. 42 class _Graph 43 43 : virtual public BaseGraphComponent, 44 44 public IterableGraphComponent, public MappableGraphComponent { … … 57 57 }; 58 58 59 // \brief Modular extendable graph class.60 //61 // It should be the same as the \c ExtendableGraph class.62 class _ExtendableGraph63 : virtual public BaseGraphComponent, public _StaticGraph,64 public ExtendableGraphComponent, public ClearableGraphComponent {65 public:66 typedef BaseGraphComponent::Node Node;67 typedef BaseGraphComponent::Edge Edge;68 69 template <typename _Graph>70 struct Constraints {71 void constraints() {72 checkConcept<_StaticGraph, _Graph >();73 checkConcept<ExtendableGraphComponent, _Graph >();74 checkConcept<ClearableGraphComponent, _Graph >();75 }76 };77 };78 79 // \brief Modular erasable graph class.80 //81 // It should be the same as the \c ErasableGraph class.82 class _ErasableGraph83 : virtual public BaseGraphComponent, public _ExtendableGraph,84 public ErasableGraphComponent {85 public:86 typedef BaseGraphComponent::Node Node;87 typedef BaseGraphComponent::Edge Edge;88 89 template <typename _Graph>90 struct Constraints {91 void constraints() {92 checkConcept<_ExtendableGraph, _Graph >();93 checkConcept<ErasableGraphComponent, _Graph >();94 }95 };96 };97 98 59 /// \addtogroup graph_concepts 99 60 /// @{ 100 61 101 /// An empty staticgraph class.62 /// An empty graph class. 102 63 103 64 /// This class provides all the common features of a graph structure, … … 117 78 /// \todo A pages describing the concept of concept description would 118 79 /// be nice. 119 class StaticGraph 120 { 121 // ///Copy consructor. 122 123 // ///\todo It is not clear, what we expect from a copy constructor. 124 // ///E.g. How to assign the nodes/edges to each other? What about maps? 125 // StaticGraph(const StaticGraph& g) { } 80 class Graph { 126 81 public: 127 82 ///\e … … 131 86 /// Defalult constructor. 132 87 /// 133 StaticGraph() { }88 Graph() { } 134 89 135 90 /// The base type of node iterators, … … 214 169 /// Sets the iterator to the first node of \c g. 215 170 /// 216 NodeIt(const StaticGraph&) { }171 NodeIt(const Graph&) { } 217 172 /// Node -> NodeIt conversion. 218 173 … … 221 176 /// This feature necessitates that each time we 222 177 /// iterate the edge-set, the iteration order is the same. 223 NodeIt(const StaticGraph&, const Node&) { }178 NodeIt(const Graph&, const Node&) { } 224 179 /// Next node. 225 180 … … 308 263 /// This constructor sets the iterator to the first outgoing edge of 309 264 /// the node. 310 OutEdgeIt(const StaticGraph&, const Node&) { }265 OutEdgeIt(const Graph&, const Node&) { } 311 266 /// Edge -> OutEdgeIt conversion 312 267 … … 314 269 /// This feature necessitates that each time we 315 270 /// iterate the edge-set, the iteration order is the same. 316 OutEdgeIt(const StaticGraph&, const Edge&) { }271 OutEdgeIt(const Graph&, const Edge&) { } 317 272 ///Next outgoing edge 318 273 … … 355 310 /// This constructor set the iterator to the first incoming edge of 356 311 /// the node. 357 InEdgeIt(const StaticGraph&, const Node&) { }312 InEdgeIt(const Graph&, const Node&) { } 358 313 /// Edge -> InEdgeIt conversion 359 314 … … 361 316 /// This feature necessitates that each time we 362 317 /// iterate the edge-set, the iteration order is the same. 363 InEdgeIt(const StaticGraph&, const Edge&) { }318 InEdgeIt(const Graph&, const Edge&) { } 364 319 /// Next incoming edge 365 320 … … 398 353 /// This constructor sets the iterator to the first edge of \c g. 399 354 ///@param g the graph 400 EdgeIt(const StaticGraph& g) { ignore_unused_variable_warning(g); }355 EdgeIt(const Graph& g) { ignore_unused_variable_warning(g); } 401 356 /// Edge -> EdgeIt conversion 402 357 … … 404 359 /// This feature necessitates that each time we 405 360 /// iterate the edge-set, the iteration order is the same. 406 EdgeIt(const StaticGraph&, const Edge&) { }361 EdgeIt(const Graph&, const Edge&) { } 407 362 ///Next edge 408 363 … … 421 376 Node source(Edge) const { return INVALID; } 422 377 423 // /// Gives back the first Node in the iterating order.424 425 // /// Gives back the first Node in the iterating order.426 // ///427 378 void first(Node&) const {} 428 429 // /// Gives back the next Node in the iterating order.430 431 // /// Gives back the next Node in the iterating order.432 // ///433 379 void next(Node&) const {} 434 380 435 // /// Gives back the first Edge in the iterating order.436 437 // /// Gives back the first Edge in the iterating order.438 // ///439 381 void first(Edge&) const {} 440 // /// Gives back the next Edge in the iterating order.441 442 // /// Gives back the next Edge in the iterating order.443 // ///444 382 void next(Edge&) const {} 445 383 446 384 447 // /// Gives back the first of the Edges point to the given Node.448 449 // /// Gives back the first of the Edges point to the given Node.450 // ///451 385 void firstIn(Edge&, const Node&) const {} 452 453 // /// Gives back the next of the Edges points to the given Node.454 455 456 // /// Gives back the next of the Edges points to the given Node.457 // ///458 386 void nextIn(Edge&) const {} 459 387 460 // /// Gives back the first of the Edges start from the given Node.461 462 // /// Gives back the first of the Edges start from the given Node.463 // ///464 388 void firstOut(Edge&, const Node&) const {} 465 466 // /// Gives back the next of the Edges start from the given Node.467 468 // /// Gives back the next of the Edges start from the given Node.469 // ///470 389 void nextOut(Edge&) const {} 471 390 … … 512 431 513 432 ///\e 514 NodeMap(const StaticGraph&) { }433 NodeMap(const Graph&) { } 515 434 ///\e 516 NodeMap(const StaticGraph&, T) { }435 NodeMap(const Graph&, T) { } 517 436 518 437 ///Copy constructor … … 536 455 537 456 ///\e 538 EdgeMap(const StaticGraph&) { }457 EdgeMap(const Graph&) { } 539 458 ///\e 540 EdgeMap(const StaticGraph&, T) { }459 EdgeMap(const Graph&, T) { } 541 460 ///Copy constructor 542 461 EdgeMap(const EdgeMap& em) : ReadWriteMap<Edge,T>(em) { } … … 546 465 }; 547 466 548 template <typename _Graph> 549 struct Constraints : public _StaticGraph::Constraints<_Graph> {}; 550 551 }; 552 553 /// An empty non-static graph class. 554 555 /// This class provides everything that \ref StaticGraph does. 556 /// Additionally it enables building graphs from scratch. 557 class ExtendableGraph : public StaticGraph 558 { 559 public: 560 /// Defalult constructor. 561 562 /// Defalult constructor. 563 /// 564 ExtendableGraph() { } 565 ///Add a new node to the graph. 566 567 /// \return the new node. 568 /// 569 Node addNode() { return INVALID; } 570 ///Add a new edge to the graph. 571 572 ///Add a new edge to the graph with source node \c s 573 ///and target node \c t. 574 ///\return the new edge. 575 Edge addEdge(Node, Node) { return INVALID; } 576 577 /// Resets the graph. 578 579 /// This function deletes all edges and nodes of the graph. 580 /// It also frees the memory allocated to store them. 581 /// \todo It might belong to \ref ErasableGraph. 582 void clear() { } 583 584 template <typename _Graph> 585 struct Constraints : public _ExtendableGraph::Constraints<_Graph> {}; 586 587 }; 588 589 /// An empty erasable graph class. 590 591 /// This class is an extension of \ref ExtendableGraph. It makes it 592 /// possible to erase edges or nodes. 593 class ErasableGraph : public ExtendableGraph 594 { 595 public: 596 /// Defalult constructor. 597 598 /// Defalult constructor. 599 /// 600 ErasableGraph() { } 601 /// Deletes a node. 602 603 /// Deletes node \c n node. 604 /// 605 void erase(Node) { } 606 /// Deletes an edge. 607 608 /// Deletes edge \c e edge. 609 /// 610 void erase(Edge) { } 611 612 template <typename _Graph> 613 struct Constraints : public _ErasableGraph::Constraints<_Graph> {}; 467 template <typename RGraph> 468 struct Constraints : public _Graph::Constraints<RGraph> {}; 614 469 615 470 }; -
lemon/concept/graph_component.h
r1999 r2111 459 459 /// core clear functions for the graph structure. 460 460 /// The most of the base graphs should be conform to this concept. 461 class ClearableGraphComponent : virtual public BaseGraphComponent {461 class BaseClearableGraphComponent : virtual public BaseGraphComponent { 462 462 public: 463 463 … … 647 647 /// This class provides beside the core graph features 648 648 /// iterator based iterable interface for the graph structure. 649 /// This concept is part of the StaticGraphConcept.649 /// This concept is part of the GraphConcept. 650 650 class IterableGraphComponent : virtual public BaseGraphComponent { 651 651 … … 818 818 /// This class provides beside the core graph features 819 819 /// map interface for the graph structure. 820 /// This concept is part of the StaticGraphConcept.820 /// This concept is part of the GraphConcept. 821 821 class MappableGraphComponent : virtual public BaseGraphComponent { 822 822 public: … … 931 931 }; 932 932 933 /// \brief An empty extendable extended graph class. 934 /// 935 /// This class provides beside the core graph features 936 /// item addition interface for the graph structure. 937 /// The difference between this class and the 938 /// \c BaseExtendableGraphComponent is that it should 939 /// notify the item alteration observers. 940 class ExtendableGraphComponent : virtual public BaseGraphComponent { 941 public: 942 943 typedef ExtendableGraphComponent Graph; 944 945 typedef BaseGraphComponent::Node Node; 946 typedef BaseGraphComponent::Edge Edge; 947 948 /// \brief Add a node to the graph. 949 /// 950 /// Add a node to the graph and notify the observers. 951 Node addNode() { 952 return INVALID; 933 934 // /// Skeleton class which describes an edge with direction in \ref 935 // /// UGraph "undirected graph". 936 template <typename UGraph> 937 class UGraphEdge : public UGraph::UEdge { 938 typedef typename UGraph::UEdge UEdge; 939 typedef typename UGraph::Node Node; 940 public: 941 942 /// \e 943 UGraphEdge() {} 944 945 /// \e 946 UGraphEdge(const UGraphEdge& e) : UGraph::UEdge(e) {} 947 948 /// \e 949 UGraphEdge(Invalid) {} 950 951 /// \brief Directed edge from undirected edge and a source node. 952 /// 953 /// Constructs a directed edge from undirected edge and a source node. 954 /// 955 /// \note You have to specify the graph for this constructor. 956 UGraphEdge(const UGraph &g, 957 UEdge u_edge, Node n) { 958 ignore_unused_variable_warning(u_edge); 959 ignore_unused_variable_warning(g); 960 ignore_unused_variable_warning(n); 953 961 } 962 963 /// \e 964 UGraphEdge& operator=(UGraphEdge) { return *this; } 965 966 /// \e 967 bool operator==(UGraphEdge) const { return true; } 968 /// \e 969 bool operator!=(UGraphEdge) const { return false; } 970 971 /// \e 972 bool operator<(UGraphEdge) const { return false; } 973 974 template <typename Edge> 975 struct Constraints { 976 void constraints() { 977 const_constraints(); 978 } 979 void const_constraints() const { 980 /// \bug This should be is_base_and_derived ... 981 UEdge ue = e; 982 ue = e; 983 984 Edge e_with_source(graph,ue,n); 985 ignore_unused_variable_warning(e_with_source); 986 } 987 Edge e; 988 UEdge ue; 989 UGraph graph; 990 Node n; 991 }; 992 }; 954 993 955 /// \brief Add an edge to the graph. 956 /// 957 /// Add an edge to the graph and notify the observers. 958 Edge addEdge(const Node&, const Node&) { 959 return INVALID; 960 } 961 962 template <typename _Graph> 963 struct Constraints { 964 void constraints() { 965 checkConcept<BaseGraphComponent, _Graph >(); 966 typename _Graph::Node node_a, node_b; 967 node_a = graph.addNode(); 968 node_b = graph.addNode(); 969 typename _Graph::Edge edge; 970 edge = graph.addEdge(node_a, node_b); 971 } 972 _Graph& graph; 973 }; 974 }; 975 976 /// \brief An empty erasable extended graph class. 977 /// 978 /// This class provides beside the core graph features 979 /// item erase interface for the graph structure. 980 /// The difference between this class and the 981 /// \c BaseErasableGraphComponent is that it should 982 /// notify the item alteration observers. 983 class ErasableGraphComponent : virtual public BaseGraphComponent { 984 public: 985 986 typedef ErasableGraphComponent Graph; 987 988 typedef BaseGraphComponent::Node Node; 989 typedef BaseGraphComponent::Edge Edge; 990 991 /// \brief Erase the Node and notify the node alteration observers. 992 /// 993 /// Erase the Node and notify the node alteration observers. 994 void erase(const Node&) {} 995 996 /// \brief Erase the Edge and notify the edge alteration observers. 997 /// 998 /// Erase the Edge and notify the edge alteration observers. 999 void erase(const Edge&) {} 1000 1001 template <typename _Graph> 1002 struct Constraints { 1003 void constraints() { 1004 checkConcept<BaseGraphComponent, _Graph >(); 1005 typename _Graph::Node node; 1006 graph.erase(node); 1007 typename _Graph::Edge edge; 1008 graph.erase(edge); 1009 } 1010 1011 _Graph& graph; 1012 }; 994 995 struct BaseIterableUGraphConcept { 996 997 template <typename Graph> 998 struct Constraints { 999 1000 typedef typename Graph::UEdge UEdge; 1001 typedef typename Graph::Edge Edge; 1002 typedef typename Graph::Node Node; 1003 1004 void constraints() { 1005 checkConcept<BaseIterableGraphComponent, Graph>(); 1006 checkConcept<GraphItem<>, UEdge>(); 1007 //checkConcept<UGraphEdge<Graph>, Edge>(); 1008 1009 graph.first(ue); 1010 graph.next(ue); 1011 1012 const_constraints(); 1013 } 1014 void const_constraints() { 1015 Node n; 1016 n = graph.target(ue); 1017 n = graph.source(ue); 1018 n = graph.oppositeNode(n0, ue); 1019 1020 bool b; 1021 b = graph.direction(e); 1022 Edge e = graph.direct(UEdge(), true); 1023 e = graph.direct(UEdge(), n); 1024 1025 ignore_unused_variable_warning(b); 1026 } 1027 1028 Graph graph; 1029 Edge e; 1030 Node n0; 1031 UEdge ue; 1032 }; 1033 1034 }; 1035 1036 1037 struct IterableUGraphConcept { 1038 1039 template <typename Graph> 1040 struct Constraints { 1041 void constraints() { 1042 /// \todo we don't need the iterable component to be base iterable 1043 /// Don't we really??? 1044 //checkConcept< BaseIterableUGraphConcept, Graph > (); 1045 1046 checkConcept<IterableGraphComponent, Graph> (); 1047 1048 typedef typename Graph::UEdge UEdge; 1049 typedef typename Graph::UEdgeIt UEdgeIt; 1050 typedef typename Graph::IncEdgeIt IncEdgeIt; 1051 1052 checkConcept<GraphIterator<Graph, UEdge>, UEdgeIt>(); 1053 checkConcept<GraphIncIterator<Graph, UEdge>, IncEdgeIt>(); 1054 } 1055 }; 1056 1057 }; 1058 1059 struct MappableUGraphConcept { 1060 1061 template <typename Graph> 1062 struct Constraints { 1063 1064 struct Dummy { 1065 int value; 1066 Dummy() : value(0) {} 1067 Dummy(int _v) : value(_v) {} 1068 }; 1069 1070 void constraints() { 1071 checkConcept<MappableGraphComponent, Graph>(); 1072 1073 typedef typename Graph::template UEdgeMap<int> IntMap; 1074 checkConcept<GraphMap<Graph, typename Graph::UEdge, int>, 1075 IntMap >(); 1076 1077 typedef typename Graph::template UEdgeMap<bool> BoolMap; 1078 checkConcept<GraphMap<Graph, typename Graph::UEdge, bool>, 1079 BoolMap >(); 1080 1081 typedef typename Graph::template UEdgeMap<Dummy> DummyMap; 1082 checkConcept<GraphMap<Graph, typename Graph::UEdge, Dummy>, 1083 DummyMap >(); 1084 } 1085 }; 1086 1013 1087 }; 1014 1088 -
lemon/concept/ugraph.h
r2021 r2111 19 19 ///\ingroup graph_concepts 20 20 ///\file 21 ///\brief Undirected graphs and components of.21 ///\brief The concept of the undirected graphs. 22 22 23 23 … … 31 31 namespace lemon { 32 32 namespace concept { 33 34 // /// Skeleton class which describes an edge with direction in \ref35 // /// UGraph "undirected graph".36 template <typename UGraph>37 class UGraphEdge : public UGraph::UEdge {38 typedef typename UGraph::UEdge UEdge;39 typedef typename UGraph::Node Node;40 public:41 42 /// \e43 UGraphEdge() {}44 45 /// \e46 UGraphEdge(const UGraphEdge& e) : UGraph::UEdge(e) {}47 48 /// \e49 UGraphEdge(Invalid) {}50 51 /// \brief Directed edge from undirected edge and a source node.52 ///53 /// Constructs a directed edge from undirected edge and a source node.54 ///55 /// \note You have to specify the graph for this constructor.56 UGraphEdge(const UGraph &g,57 UEdge u_edge, Node n) {58 ignore_unused_variable_warning(u_edge);59 ignore_unused_variable_warning(g);60 ignore_unused_variable_warning(n);61 }62 63 /// \e64 UGraphEdge& operator=(UGraphEdge) { return *this; }65 66 /// \e67 bool operator==(UGraphEdge) const { return true; }68 /// \e69 bool operator!=(UGraphEdge) const { return false; }70 71 /// \e72 bool operator<(UGraphEdge) const { return false; }73 74 template <typename Edge>75 struct Constraints {76 void constraints() {77 const_constraints();78 }79 void const_constraints() const {80 /// \bug This should be is_base_and_derived ...81 UEdge ue = e;82 ue = e;83 84 Edge e_with_source(graph,ue,n);85 ignore_unused_variable_warning(e_with_source);86 }87 Edge e;88 UEdge ue;89 UGraph graph;90 Node n;91 };92 };93 94 95 struct BaseIterableUGraphConcept {96 97 template <typename Graph>98 struct Constraints {99 100 typedef typename Graph::UEdge UEdge;101 typedef typename Graph::Edge Edge;102 typedef typename Graph::Node Node;103 104 void constraints() {105 checkConcept<BaseIterableGraphComponent, Graph>();106 checkConcept<GraphItem<>, UEdge>();107 //checkConcept<UGraphEdge<Graph>, Edge>();108 109 graph.first(ue);110 graph.next(ue);111 112 const_constraints();113 }114 void const_constraints() {115 Node n;116 n = graph.target(ue);117 n = graph.source(ue);118 n = graph.oppositeNode(n0, ue);119 120 bool b;121 b = graph.direction(e);122 Edge e = graph.direct(UEdge(), true);123 e = graph.direct(UEdge(), n);124 125 ignore_unused_variable_warning(b);126 }127 128 Graph graph;129 Edge e;130 Node n0;131 UEdge ue;132 };133 134 };135 136 137 struct IterableUGraphConcept {138 139 template <typename Graph>140 struct Constraints {141 void constraints() {142 /// \todo we don't need the iterable component to be base iterable143 /// Don't we really???144 //checkConcept< BaseIterableUGraphConcept, Graph > ();145 146 checkConcept<IterableGraphComponent, Graph> ();147 148 typedef typename Graph::UEdge UEdge;149 typedef typename Graph::UEdgeIt UEdgeIt;150 typedef typename Graph::IncEdgeIt IncEdgeIt;151 152 checkConcept<GraphIterator<Graph, UEdge>, UEdgeIt>();153 checkConcept<GraphIncIterator<Graph, UEdge>, IncEdgeIt>();154 }155 };156 157 };158 159 struct MappableUGraphConcept {160 161 template <typename Graph>162 struct Constraints {163 164 struct Dummy {165 int value;166 Dummy() : value(0) {}167 Dummy(int _v) : value(_v) {}168 };169 170 void constraints() {171 checkConcept<MappableGraphComponent, Graph>();172 173 typedef typename Graph::template UEdgeMap<int> IntMap;174 checkConcept<GraphMap<Graph, typename Graph::UEdge, int>,175 IntMap >();176 177 typedef typename Graph::template UEdgeMap<bool> BoolMap;178 checkConcept<GraphMap<Graph, typename Graph::UEdge, bool>,179 BoolMap >();180 181 typedef typename Graph::template UEdgeMap<Dummy> DummyMap;182 checkConcept<GraphMap<Graph, typename Graph::UEdge, Dummy>,183 DummyMap >();184 }185 };186 187 };188 189 struct ExtendableUGraphConcept {190 191 template <typename Graph>192 struct Constraints {193 void constraints() {194 node_a = graph.addNode();195 uedge = graph.addEdge(node_a, node_b);196 }197 typename Graph::Node node_a, node_b;198 typename Graph::UEdge uedge;199 Graph graph;200 };201 202 };203 204 struct ErasableUGraphConcept {205 206 template <typename Graph>207 struct Constraints {208 void constraints() {209 graph.erase(n);210 graph.erase(e);211 }212 Graph graph;213 typename Graph::Node n;214 typename Graph::UEdge e;215 };216 217 };218 33 219 34 /// \addtogroup graph_concepts … … 232 47 /// 233 48 /// In LEMON undirected graphs also fulfill the concept of directed 234 /// graphs (\ref lemon::concept:: StaticGraph "Graph Concept"). For235 /// explanation of this and more see also the page \ref ugraphs,236 /// a tutorial about undirectedgraphs.49 /// graphs (\ref lemon::concept::Graph "Graph Concept"). For 50 /// explanation of this and more see also the page \ref graphs, 51 /// a tutorial about graphs. 237 52 /// 238 53 /// You can assume that all undirected graph can be handled 239 /// as a staticdirected graph. This way it is fully conform240 /// to the StaticGraph concept.54 /// as a directed graph. This way it is fully conform 55 /// to the Graph concept. 241 56 242 57 class UGraph { … … 800 615 Node target(Edge) const { return INVALID; } 801 616 802 // /// \brief First node of the graph803 // ///804 // /// \note This method is part of so called \ref805 // /// developpers_interface "Developpers' interface", so it shouldn't806 // /// be used in an end-user program.807 617 void first(Node&) const {} 808 // /// \brief Next node of the graph809 // ///810 // /// \note This method is part of so called \ref811 // /// developpers_interface "Developpers' interface", so it shouldn't812 // /// be used in an end-user program.813 618 void next(Node&) const {} 814 619 815 // /// \brief First undirected edge of the graph816 // ///817 // /// \note This method is part of so called \ref818 // /// developpers_interface "Developpers' interface", so it shouldn't819 // /// be used in an end-user program.820 620 void first(UEdge&) const {} 821 // /// \brief Next undirected edge of the graph822 // ///823 // /// \note This method is part of so called \ref824 // /// developpers_interface "Developpers' interface", so it shouldn't825 // /// be used in an end-user program.826 621 void next(UEdge&) const {} 827 622 828 // /// \brief First directed edge of the graph829 // ///830 // /// \note This method is part of so called \ref831 // /// developpers_interface "Developpers' interface", so it shouldn't832 // /// be used in an end-user program.833 623 void first(Edge&) const {} 834 // /// \brief Next directed edge of the graph835 // ///836 // /// \note This method is part of so called \ref837 // /// developpers_interface "Developpers' interface", so it shouldn't838 // /// be used in an end-user program.839 624 void next(Edge&) const {} 840 625 841 // /// \brief First outgoing edge from a given node842 // ///843 // /// \note This method is part of so called \ref844 // /// developpers_interface "Developpers' interface", so it shouldn't845 // /// be used in an end-user program.846 626 void firstOut(Edge&, Node) const {} 847 // /// \brief Next outgoing edge to a node848 // ///849 // /// \note This method is part of so called \ref850 // /// developpers_interface "Developpers' interface", so it shouldn't851 // /// be used in an end-user program.852 627 void nextOut(Edge&) const {} 853 628 854 // /// \brief First incoming edge to a given node855 // ///856 // /// \note This method is part of so called \ref857 // /// developpers_interface "Developpers' interface", so it shouldn't858 // /// be used in an end-user program.859 629 void firstIn(Edge&, Node) const {} 860 // /// \brief Next incoming edge to a node861 // ///862 // /// \note This method is part of so called \ref863 // /// developpers_interface "Developpers' interface", so it shouldn't864 // /// be used in an end-user program.865 630 void nextIn(Edge&) const {} 866 631 867 632 868 633 void firstInc(UEdge &, bool &, const Node &) const {} 869 870 634 void nextInc(UEdge &, bool &) const {} 871 635 … … 923 687 }; 924 688 925 /// \brief An empty non-static undirected graph class.926 ///927 /// This class provides everything that \ref UGraph does.928 /// Additionally it enables building graphs from scratch.929 class ExtendableUGraph : public UGraph {930 public:931 932 /// \brief Add a new node to the graph.933 ///934 /// Add a new node to the graph.935 /// \return the new node.936 Node addNode();937 938 /// \brief Add a new undirected edge to the graph.939 ///940 /// Add a new undirected edge to the graph.941 /// \return the new edge.942 UEdge addEdge(const Node& from, const Node& to);943 944 /// \brief Resets the graph.945 ///946 /// This function deletes all undirected edges and nodes of the graph.947 /// It also frees the memory allocated to store them.948 void clear() { }949 950 template <typename Graph>951 struct Constraints {952 void constraints() {953 checkConcept<BaseIterableUGraphConcept, Graph>();954 checkConcept<IterableUGraphConcept, Graph>();955 checkConcept<MappableUGraphConcept, Graph>();956 957 checkConcept<UGraph, Graph>();958 checkConcept<ExtendableUGraphConcept, Graph>();959 checkConcept<ClearableGraphComponent, Graph>();960 }961 };962 963 };964 965 /// \brief An empty erasable undirected graph class.966 ///967 /// This class is an extension of \ref ExtendableUGraph. It makes it968 /// possible to erase undirected edges or nodes.969 class ErasableUGraph : public ExtendableUGraph {970 public:971 972 /// \brief Deletes a node.973 ///974 /// Deletes a node.975 ///976 void erase(Node) { }977 /// \brief Deletes an undirected edge.978 ///979 /// Deletes an undirected edge.980 ///981 void erase(UEdge) { }982 983 template <typename Graph>984 struct Constraints {985 void constraints() {986 checkConcept<ExtendableUGraph, Graph>();987 checkConcept<ErasableUGraphConcept, Graph>();988 }989 };990 991 };992 993 689 /// @} 994 690 -
lemon/dag_shortest_path.h
r1999 r2111 275 275 /// DagShortestPath, it is only passed to \ref DagShortestPathDefaultTraits. 276 276 /// \param _LengthMap This read-only EdgeMap determines the lengths of the 277 /// edges. The default map type is \ref concept:: StaticGraph::EdgeMap277 /// edges. The default map type is \ref concept::Graph::EdgeMap 278 278 /// "Graph::EdgeMap<int>". The value of _LengthMap is not used directly 279 279 /// by DagShortestPath, it is only passed to \ref DagShortestPathDefaultTraits. -
lemon/dijkstra.h
r2010 r2111 158 158 ///relatively time consuming process to compute the edge length if 159 159 ///it is necessary. The default map type is \ref 160 ///concept:: StaticGraph::EdgeMap "Graph::EdgeMap<int>". The value160 ///concept::Graph::EdgeMap "Graph::EdgeMap<int>". The value 161 161 ///of LM is not used directly by Dijkstra, it is only passed to \ref 162 162 ///DijkstraDefaultTraits. \param TR Traits class to set -
lemon/edge_set.h
r2076 r2111 239 239 /// 240 240 /// \param _Graph The type of the graph which shares its node set with 241 /// this class. Its interface must conform to the \ref concept:: StaticGraph242 /// " StaticGraph" concept.241 /// this class. Its interface must conform to the \ref concept::Graph 242 /// "Graph" concept. 243 243 /// 244 244 /// In the edge extension and removing it conforms to the 245 /// \ref concept:: ErasableGraph "ErasableGraph" concept.245 /// \ref concept::Graph "Graph" concept. 246 246 template <typename _Graph> 247 247 class ListEdgeSet : public EdgeSetExtender<ListEdgeSetBase<_Graph> > { … … 331 331 /// 332 332 /// \param _Graph The type of the graph which shares its node set with 333 /// this class. Its interface must conform to the \ref concept:: StaticGraph334 /// " StaticGraph" concept.333 /// this class. Its interface must conform to the \ref concept::Graph 334 /// "Graph" concept. 335 335 /// 336 336 /// In the edge extension and removing it conforms to the 337 /// \ref concept:: ErasableUGraph "ErasableUGraph" concept.337 /// \ref concept::UGraph "UGraph" concept. 338 338 template <typename _Graph> 339 339 class ListUEdgeSet … … 568 568 /// 569 569 /// \param _Graph The type of the graph which shares its node set with 570 /// this class. Its interface must conform to the \ref concept:: StaticGraph571 /// " StaticGraph" concept.570 /// this class. Its interface must conform to the \ref concept::Graph 571 /// "Graph" concept. 572 572 /// 573 573 /// In the edge extension and removing it conforms to the 574 /// \ref concept:: ExtendableGraph "ExtendableGraph" concept.574 /// \ref concept::Graph "Graph" concept. 575 575 template <typename _Graph> 576 576 class SmartEdgeSet : public EdgeSetExtender<SmartEdgeSetBase<_Graph> > { … … 663 663 /// 664 664 /// \param _Graph The type of the graph which shares its node set with 665 /// this class. Its interface must conform to the \ref concept:: StaticGraph666 /// " StaticGraph" concept.665 /// this class. Its interface must conform to the \ref concept::Graph 666 /// "Graph" concept. 667 667 /// 668 668 /// In the edge extension and removing it conforms to the 669 /// \ref concept:: ExtendableUGraph "ExtendableUGraph" concept.669 /// \ref concept::UGraph "UGraph" concept. 670 670 template <typename _Graph> 671 671 class SmartUEdgeSet -
lemon/floyd_warshall.h
r2042 r2111 172 172 /// relatively time consuming process to compute the edge length if 173 173 /// it is necessary. The default map type is \ref 174 /// concept:: StaticGraph::EdgeMap "Graph::EdgeMap<int>". The value174 /// concept::Graph::EdgeMap "Graph::EdgeMap<int>". The value 175 175 /// of _LengthMap is not used directly by FloydWarshall, it is only passed 176 176 /// to \ref FloydWarshallDefaultTraits. \param _Traits Traits class to set -
lemon/full_graph.h
r2076 r2111 215 215 /// edges or nodes. 216 216 /// Thus it conforms to 217 /// the \ref concept:: StaticGraph "StaticGraph" concept218 /// \sa concept:: StaticGraph.217 /// the \ref concept::Graph "Graph" concept 218 /// \sa concept::Graph. 219 219 /// 220 220 /// \sa FullGraphBase -
lemon/graph_adaptor.h
r2084 r2111 2425 2425 /// 2426 2426 /// This graph adaptor is fully conform to the 2427 /// \ref concept:: StaticGraph "StaticGraph" concept and2427 /// \ref concept::Graph "Graph" concept and 2428 2428 /// contains some additional member functions and types. The 2429 2429 /// documentation of some member functions may be found just in the -
lemon/hypercube_graph.h
r1998 r2111 250 250 /// is 26. 251 251 /// 252 /// The graph type is fully conform to the \ref concept:: StaticGraph252 /// The graph type is fully conform to the \ref concept::Graph 253 253 /// concept but it does not conform to the \ref concept::UGraph. 254 254 /// -
lemon/johnson.h
r2042 r2111 207 207 /// relatively time consuming process to compute the edge length if 208 208 /// it is necessary. The default map type is \ref 209 /// concept:: StaticGraph::EdgeMap "Graph::EdgeMap<int>". The value209 /// concept::Graph::EdgeMap "Graph::EdgeMap<int>". The value 210 210 /// of _LengthMap is not used directly by Johnson, it is only passed 211 211 /// to \ref JohnsonDefaultTraits. \param _Traits Traits class to set -
lemon/kruskal.h
r2084 r2111 45 45 /// 46 46 /// \param g The graph the algorithm runs on. 47 /// It can be either \ref concept:: StaticGraph "directed" or47 /// It can be either \ref concept::Graph "directed" or 48 48 /// \ref concept::UGraph "undirected". 49 49 /// If the graph is directed, the algorithm consider it to be -
lemon/list_graph.h
r2107 r2111 275 275 276 276 protected: 277 void _changeTarget(Edge e, Node n)277 void changeTarget(Edge e, Node n) 278 278 { 279 279 if(edges[e.id].next_in != -1) … … 290 290 nodes[n.id].first_in = e.id; 291 291 } 292 void _changeSource(Edge e, Node n)292 void changeSource(Edge e, Node n) 293 293 { 294 294 if(edges[e.id].next_out != -1) … … 317 317 ///This is a simple and fast erasable graph implementation. 318 318 /// 319 ///It conforms to the 320 ///\ref concept::ErasableGraph "ErasableGraph" concept and 321 ///it also provides several additional useful extra functionalities. 322 ///\sa concept::ErasableGraph. 319 ///It conforms to the \ref concept::Graph "Graph" concept and it 320 ///also provides several additional useful extra functionalities. 321 ///The most of the member functions and nested classes are 322 ///documented only in the concept class. 323 ///\sa concept::Graph. 323 324 324 325 class ListGraph : public ExtendedListGraphBase { … … 326 327 327 328 typedef ExtendedListGraphBase Parent; 329 330 ///Add a new node to the graph. 331 332 /// \return the new node. 333 /// 334 Node addNode() { return Parent::addNode(); } 335 336 ///Add a new edge to the graph. 337 338 ///Add a new edge to the graph with source node \c s 339 ///and target node \c t. 340 ///\return the new edge. 341 Edge addEdge(const Node& s, const Node& t) { 342 return Parent::addEdge(s, t); 343 } 328 344 329 345 /// Changes the target of \c e to \c n … … 335 351 ///valid. However <tt>InEdge</tt>s are invalidated. 336 352 void changeTarget(Edge e, Node n) { 337 _changeTarget(e,n);353 Parent::changeTarget(e,n); 338 354 } 339 355 /// Changes the source of \c e to \c n … … 345 361 ///valid. However <tt>OutEdge</tt>s are invalidated. 346 362 void changeSource(Edge e, Node n) { 347 _changeSource(e,n);363 Parent::changeSource(e,n); 348 364 } 349 365 … … 355 371 void reverseEdge(Edge e) { 356 372 Node t=target(e); 357 _changeTarget(e,source(e));358 _changeSource(e,t);359 } 360 361 /// Using this it is possible to avoid the superfluous memory362 /// allocation.373 changeTarget(e,source(e)); 374 changeSource(e,t); 375 } 376 377 /// \brief Using this it is possible to avoid the superfluous memory 378 /// allocation. 363 379 364 380 ///Using this it is possible to avoid the superfluous memory … … 368 384 void reserveNode(int n) { nodes.reserve(n); }; 369 385 370 /// Using this it is possible to avoid the superfluous memory371 /// allocation.386 /// \brief Using this it is possible to avoid the superfluous memory 387 /// allocation. 372 388 373 389 ///Using this it is possible to avoid the superfluous memory … … 599 615 public: 600 616 typedef ExtendedListUGraphBase Parent; 617 /// \brief Add a new node to the graph. 618 /// 619 /// \return the new node. 620 /// 621 Node addNode() { return Parent::addNode(); } 622 623 /// \brief Add a new edge to the graph. 624 /// 625 /// Add a new edge to the graph with source node \c s 626 /// and target node \c t. 627 /// \return the new undirected edge. 628 UEdge addEdge(const Node& s, const Node& t) { 629 return Parent::addEdge(s, t); 630 } 601 631 /// \brief Changes the target of \c e to \c n 602 632 /// … … 607 637 /// valid. However <tt>InEdge</tt>'s are invalidated. 608 638 void changeTarget(UEdge e, Node n) { 609 _changeTarget(e,n);639 Parent::changeTarget(e,n); 610 640 } 611 641 /// Changes the source of \c e to \c n … … 617 647 ///valid. However <tt>OutEdge</tt>'s are invalidated. 618 648 void changeSource(UEdge e, Node n) { 619 _changeSource(e,n);649 Parent::changeSource(e,n); 620 650 } 621 651 /// \brief Contract two nodes. -
lemon/min_cost_arborescence.h
r2042 r2111 111 111 /// relatively time consuming process to compute the edge cost if 112 112 /// it is necessary. The default map type is \ref 113 /// concept:: StaticGraph::EdgeMap "Graph::EdgeMap<int>". The value113 /// concept::Graph::EdgeMap "Graph::EdgeMap<int>". The value 114 114 /// of _CostMap is not used directly by MinCostArborescence, 115 115 /// it is only passed to \ref MinCostArborescenceDefaultTraits. -
lemon/min_cut.h
r2094 r2111 180 180 /// relatively time consuming process to compute the edge capacity if 181 181 /// it is necessary. The default map type is \ref 182 /// concept:: StaticGraph::EdgeMap "Graph::EdgeMap<int>". The value182 /// concept::Graph::EdgeMap "Graph::EdgeMap<int>". The value 183 183 /// of CapacityMap is not used directly by search algorithm, it is only 184 184 /// passed to \ref MaxCardinalitySearchDefaultTraits. … … 702 702 typedef _Graph Graph; 703 703 704 /// The AuxGraph type which is an ErasableGraph704 /// The AuxGraph type which is an Graph 705 705 typedef ListUGraph AuxGraph; 706 706 -
lemon/smart_graph.h
r2076 r2111 240 240 ///node and edge deletions</b>. 241 241 ///It conforms to 242 ///the \ref concept:: ExtendableGraph "ExtendableGraph" concept.243 ///\sa concept:: ExtendableGraph.242 ///the \ref concept::Graph "Graph" concept. 243 ///\sa concept::Graph. 244 244 /// 245 245 ///\author Alpar Juttner -
lemon/topology.h
r2082 r2111 245 245 template <typename Graph> 246 246 bool stronglyConnected(const Graph& graph) { 247 checkConcept<concept:: StaticGraph, Graph>();247 checkConcept<concept::Graph, Graph>(); 248 248 249 249 typedef typename Graph::Node Node; … … 303 303 template <typename Graph> 304 304 int countStronglyConnectedComponents(const Graph& graph) { 305 checkConcept<concept:: StaticGraph, Graph>();305 checkConcept<concept::Graph, Graph>(); 306 306 307 307 using namespace _topology_bits; … … 372 372 template <typename Graph, typename NodeMap> 373 373 int stronglyConnectedComponents(const Graph& graph, NodeMap& compMap) { 374 checkConcept<concept:: StaticGraph, Graph>();374 checkConcept<concept::Graph, Graph>(); 375 375 typedef typename Graph::Node Node; 376 376 typedef typename Graph::NodeIt NodeIt; … … 435 435 template <typename Graph, typename EdgeMap> 436 436 int stronglyConnectedCutEdges(const Graph& graph, EdgeMap& cutMap) { 437 checkConcept<concept:: StaticGraph, Graph>();437 checkConcept<concept::Graph, Graph>(); 438 438 typedef typename Graph::Node Node; 439 439 typedef typename Graph::Edge Edge; … … 1206 1206 using namespace _topology_bits; 1207 1207 1208 checkConcept<concept:: StaticGraph, Graph>();1208 checkConcept<concept::Graph, Graph>(); 1209 1209 checkConcept<concept::WriteMap<typename Graph::Node, int>, NodeMap>(); 1210 1210 … … 1248 1248 using namespace _topology_bits; 1249 1249 1250 checkConcept<concept:: StaticGraph, Graph>();1250 checkConcept<concept::Graph, Graph>(); 1251 1251 checkConcept<concept::ReadWriteMap<typename Graph::Node, int>, NodeMap>(); 1252 1252 … … 1291 1291 bool dag(const Graph& graph) { 1292 1292 1293 checkConcept<concept:: StaticGraph, Graph>();1293 checkConcept<concept::Graph, Graph>(); 1294 1294 1295 1295 typedef typename Graph::Node Node; -
test/bfs_test.cc
r1956 r2111 30 30 void check_Bfs_Compile() 31 31 { 32 typedef concept:: StaticGraph Graph;32 typedef concept::Graph Graph; 33 33 34 34 typedef Graph::Edge Edge; … … 67 67 { 68 68 typedef int VType; 69 typedef concept:: StaticGraph Graph;69 typedef concept::Graph Graph; 70 70 71 71 typedef Graph::Edge Edge; -
test/dfs_test.cc
r1956 r2111 30 30 void check_Dfs_SmartGraph_Compile() 31 31 { 32 typedef concept:: StaticGraph Graph;32 typedef concept::Graph Graph; 33 33 34 34 typedef Graph::Edge Edge; … … 68 68 { 69 69 typedef int VType; 70 typedef concept:: StaticGraph Graph;70 typedef concept::Graph Graph; 71 71 72 72 typedef Graph::Edge Edge; -
test/dijkstra_test.cc
r1956 r2111 32 32 { 33 33 typedef int VType; 34 typedef concept:: StaticGraph Graph;34 typedef concept::Graph Graph; 35 35 36 36 typedef Graph::Edge Edge; … … 71 71 { 72 72 typedef int VType; 73 typedef concept:: StaticGraph Graph;73 typedef concept::Graph Graph; 74 74 75 75 typedef Graph::Edge Edge; -
test/edge_set_test.cc
r1990 r2111 18 18 using namespace lemon::concept; 19 19 20 typedef SmartGraph Graph;20 typedef SmartGraph RGraph; 21 21 22 22 int main() { 23 23 { // checking edge_sets 24 checkConcept< StaticGraph, ListEdgeSet<Graph> >();25 checkConcept<UGraph, ListUEdgeSet< Graph> >();26 checkConcept< StaticGraph, SmartEdgeSet<Graph> >();27 checkConcept<UGraph, SmartUEdgeSet< Graph> >();24 checkConcept<Graph, ListEdgeSet<RGraph> >(); 25 checkConcept<UGraph, ListUEdgeSet<RGraph> >(); 26 checkConcept<Graph, SmartEdgeSet<RGraph> >(); 27 checkConcept<UGraph, SmartUEdgeSet<RGraph> >(); 28 28 } 29 29 -
test/graph_adaptor_test.cc
r1991 r2111 47 47 { 48 48 { 49 typedef StaticGraph Graph;50 checkConcept< StaticGraph, GraphAdaptor<Graph> >();49 typedef Graph Graph; 50 checkConcept<Graph, GraphAdaptor<Graph> >(); 51 51 52 checkConcept< StaticGraph, RevGraphAdaptor<Graph> >();52 checkConcept<Graph, RevGraphAdaptor<Graph> >(); 53 53 54 checkConcept< StaticGraph, SubGraphAdaptor<Graph,54 checkConcept<Graph, SubGraphAdaptor<Graph, 55 55 Graph::NodeMap<bool> , Graph::EdgeMap<bool> > >(); 56 checkConcept< StaticGraph, NodeSubGraphAdaptor<Graph,56 checkConcept<Graph, NodeSubGraphAdaptor<Graph, 57 57 Graph::NodeMap<bool> > >(); 58 checkConcept< StaticGraph, EdgeSubGraphAdaptor<Graph,58 checkConcept<Graph, EdgeSubGraphAdaptor<Graph, 59 59 Graph::EdgeMap<bool> > >(); 60 60 61 checkConcept< StaticGraph, ResGraphAdaptor<Graph, int,61 checkConcept<Graph, ResGraphAdaptor<Graph, int, 62 62 Graph::EdgeMap<int>, Graph::EdgeMap<int> > >(); 63 63 64 checkConcept< StaticGraph, ErasingFirstGraphAdaptor<Graph,64 checkConcept<Graph, ErasingFirstGraphAdaptor<Graph, 65 65 Graph::NodeMap<Graph::Edge> > >(); 66 66 … … 74 74 UGraph::UEdgeMap<bool> > >(); 75 75 76 checkConcept< StaticGraph, DirUGraphAdaptor<UGraph,76 checkConcept<Graph, DirUGraphAdaptor<UGraph, 77 77 UGraph::UEdgeMap<bool> > >(); 78 78 } -
test/graph_factory_test.cc
r1956 r2111 71 71 72 72 //Compile Graph 73 template void lemon::concept::checkCompile StaticGraph<concept::StaticGraph>74 (concept:: StaticGraph &);73 template void lemon::concept::checkCompileGraph<concept::Graph> 74 (concept::Graph &); 75 75 76 76 template 77 void lemon::concept::checkCompile ExtendableGraph<concept::ExtendableGraph>78 (concept:: ExtendableGraph &);77 void lemon::concept::checkCompileGraph<concept::Graph> 78 (concept::Graph &); 79 79 80 80 template 81 void lemon::concept::checkCompile ErasableGraph<concept::ErasableGraph>82 (concept:: ErasableGraph &);81 void lemon::concept::checkCompileGraph<concept::Graph> 82 (concept::Graph &); 83 83 84 84 //Compile SmartGraph 85 85 template 86 void lemon::concept::checkCompile ExtendableGraph<SmartGraph>(SmartGraph &);86 void lemon::concept::checkCompileGraph<SmartGraph>(SmartGraph &); 87 87 template 88 88 void lemon::concept::checkCompileGraphFindEdge<SmartGraph>(SmartGraph &); … … 94 94 //Compile ListGraph 95 95 template 96 void lemon::concept::checkCompile ExtendableGraph<ListGraph>(ListGraph &);96 void lemon::concept::checkCompileGraph<ListGraph>(ListGraph &); 97 97 template 98 void lemon::concept::checkCompile ErasableGraph<ListGraph>(ListGraph &);98 void lemon::concept::checkCompileGraph<ListGraph>(ListGraph &); 99 99 template 100 100 void lemon::concept::checkCompileGraphFindEdge<ListGraph>(ListGraph &); … … 103 103 //Compile SymListGraph 104 104 //template void hugo::checkCompileGraph<SymListGraph>(SymListGraph &); 105 //template void hugo::checkCompile ErasableGraph<SymListGraph>(SymListGraph &);105 //template void hugo::checkCompileGraph<SymListGraph>(SymListGraph &); 106 106 //template void hugo::checkCompileGraphFindEdge<SymListGraph>(SymListGraph &); 107 107 108 108 //Compile FullGraph 109 template void lemon::concept::checkCompile StaticGraph<FullGraph>(FullGraph &);109 template void lemon::concept::checkCompileGraph<FullGraph>(FullGraph &); 110 110 template 111 111 void lemon::concept::checkCompileGraphFindEdge<FullGraph>(FullGraph &); -
test/graph_test.cc
r1956 r2111 44 44 checkConcept<MaxIDableGraphComponent, MaxIDableGraphComponent >(); 45 45 46 checkConcept<BaseExtendableGraphComponent, BaseExtendableGraphComponent >();47 checkConcept<BaseErasableGraphComponent, BaseErasableGraphComponent >();48 49 46 checkConcept<IterableGraphComponent, IterableGraphComponent >(); 50 47 51 48 checkConcept<MappableGraphComponent, MappableGraphComponent >(); 52 49 53 checkConcept<ExtendableGraphComponent, ExtendableGraphComponent >();54 checkConcept<ErasableGraphComponent, ErasableGraphComponent >();55 checkConcept<ClearableGraphComponent, ClearableGraphComponent >();56 50 } 57 51 { // checking skeleton graphs 58 checkConcept<StaticGraph, StaticGraph >(); 59 checkConcept<ExtendableGraph, ExtendableGraph >(); 60 checkConcept<ErasableGraph, ErasableGraph >(); 52 checkConcept<Graph, Graph >(); 61 53 } 62 54 { // checking list graph 63 checkConcept< ErasableGraph, ListGraph >();55 checkConcept<Graph, ListGraph >(); 64 56 65 57 checkGraph<ListGraph>(); … … 68 60 } 69 61 { // checking smart graph 70 checkConcept< ExtendableGraph, SmartGraph >();62 checkConcept<Graph, SmartGraph >(); 71 63 72 64 checkGraph<SmartGraph>(); … … 75 67 } 76 68 { // checking full graph 77 checkConcept< StaticGraph, FullGraph >();69 checkConcept<Graph, FullGraph >(); 78 70 } 79 71 { // checking full graph 80 checkConcept< StaticGraph, HyperCubeGraph >();72 checkConcept<Graph, HyperCubeGraph >(); 81 73 } 82 74 -
test/kruskal_test.cc
r1956 r2111 33 33 void checkCompileKruskal() 34 34 { 35 concept::WriteMap<concept:: StaticGraph::Edge,bool> w;35 concept::WriteMap<concept::Graph::Edge,bool> w; 36 36 37 kruskal(concept:: StaticGraph(),38 concept::ReadMap<concept:: StaticGraph::Edge,int>(),37 kruskal(concept::Graph(), 38 concept::ReadMap<concept::Graph::Edge,int>(), 39 39 w); 40 40 } -
test/preflow_test.cc
r2108 r2111 32 32 { 33 33 typedef int VType; 34 typedef concept:: StaticGraph Graph;34 typedef concept::Graph Graph; 35 35 36 36 typedef Graph::Node Node; -
test/ugraph_test.cc
r1979 r2111 34 34 void check_concepts() { 35 35 checkConcept<UGraph, ListUGraph>(); 36 checkConcept<ErasableUGraph, ListUGraph>();37 36 38 37 checkConcept<UGraph, SmartUGraph>(); 39 checkConcept<ExtendableUGraph, SmartUGraph>();40 38 41 39 checkConcept<UGraph, FullUGraph>();
Note: See TracChangeset
for help on using the changeset viewer.