Changes in lemon/bits/graph_extender.h [825:a143f19f465b:314:2cc60866a0c9] in lemon
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/bits/graph_extender.h
r825 r314 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-200 95 * Copyright (C) 2003-2008 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 30 30 //\ingroup graphbits 31 31 //\file 32 //\brief Extenders for the graph types32 //\brief Extenders for the digraph types 33 33 namespace lemon { 34 34 35 35 // \ingroup graphbits 36 36 // 37 // \brief Extender for the digraph implementations37 // \brief Extender for the Digraphs 38 38 template <typename Base> 39 39 class DigraphExtender : public Base { 40 public: 41 40 42 typedef Base Parent; 41 42 public:43 44 43 typedef DigraphExtender Digraph; 45 44 … … 57 56 } 58 57 59 static Node fromId(int id, Node){58 Node fromId(int id, Node) const { 60 59 return Parent::nodeFromId(id); 61 60 } 62 61 63 static Arc fromId(int id, Arc){62 Arc fromId(int id, Arc) const { 64 63 return Parent::arcFromId(id); 65 64 } … … 220 219 class NodeMap 221 220 : public MapExtender<DefaultMap<Digraph, Node, _Value> > { 221 public: 222 typedef DigraphExtender Digraph; 222 223 typedef MapExtender<DefaultMap<Digraph, Node, _Value> > Parent; 223 224 224 public:225 225 explicit NodeMap(const Digraph& digraph) 226 226 : Parent(digraph) {} … … 244 244 class ArcMap 245 245 : public MapExtender<DefaultMap<Digraph, Arc, _Value> > { 246 public: 247 typedef DigraphExtender Digraph; 246 248 typedef MapExtender<DefaultMap<Digraph, Arc, _Value> > Parent; 247 249 248 public:249 250 explicit ArcMap(const Digraph& digraph) 250 251 : Parent(digraph) {} … … 330 331 template <typename Base> 331 332 class GraphExtender : public Base { 333 public: 334 332 335 typedef Base Parent; 333 334 public:335 336 336 typedef GraphExtender Graph; 337 337 … … 356 356 } 357 357 358 static Node fromId(int id, Node){358 Node fromId(int id, Node) const { 359 359 return Parent::nodeFromId(id); 360 360 } 361 361 362 static Arc fromId(int id, Arc){362 Arc fromId(int id, Arc) const { 363 363 return Parent::arcFromId(id); 364 364 } 365 365 366 static Edge fromId(int id, Edge){366 Edge fromId(int id, Edge) const { 367 367 return Parent::edgeFromId(id); 368 368 } … … 602 602 class NodeMap 603 603 : public MapExtender<DefaultMap<Graph, Node, _Value> > { 604 public: 605 typedef GraphExtender Graph; 604 606 typedef MapExtender<DefaultMap<Graph, Node, _Value> > Parent; 605 607 606 public: 607 explicit NodeMap(const Graph& graph) 608 NodeMap(const Graph& graph) 608 609 : Parent(graph) {} 609 610 NodeMap(const Graph& graph, const _Value& value) … … 626 627 class ArcMap 627 628 : public MapExtender<DefaultMap<Graph, Arc, _Value> > { 629 public: 630 typedef GraphExtender Graph; 628 631 typedef MapExtender<DefaultMap<Graph, Arc, _Value> > Parent; 629 632 630 public: 631 explicit ArcMap(const Graph& graph) 633 ArcMap(const Graph& graph) 632 634 : Parent(graph) {} 633 635 ArcMap(const Graph& graph, const _Value& value) … … 650 652 class EdgeMap 651 653 : public MapExtender<DefaultMap<Graph, Edge, _Value> > { 654 public: 655 typedef GraphExtender Graph; 652 656 typedef MapExtender<DefaultMap<Graph, Edge, _Value> > Parent; 653 657 654 public: 655 explicit EdgeMap(const Graph& graph) 658 EdgeMap(const Graph& graph) 656 659 : Parent(graph) {} 657 660
Note: See TracChangeset
for help on using the changeset viewer.