1.1 --- a/lemon/bits/graph_extender.h Fri Nov 13 12:33:33 2009 +0100
1.2 +++ b/lemon/bits/graph_extender.h Thu Dec 10 17:05:35 2009 +0100
1.3 @@ -2,7 +2,7 @@
1.4 *
1.5 * This file is a part of LEMON, a generic C++ optimization library.
1.6 *
1.7 - * Copyright (C) 2003-2008
1.8 + * Copyright (C) 2003-2009
1.9 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
1.10 * (Egervary Research Group on Combinatorial Optimization, EGRES).
1.11 *
1.12 @@ -29,17 +29,18 @@
1.13
1.14 //\ingroup graphbits
1.15 //\file
1.16 -//\brief Extenders for the digraph types
1.17 +//\brief Extenders for the graph types
1.18 namespace lemon {
1.19
1.20 // \ingroup graphbits
1.21 //
1.22 - // \brief Extender for the Digraphs
1.23 + // \brief Extender for the digraph implementations
1.24 template <typename Base>
1.25 class DigraphExtender : public Base {
1.26 + typedef Base Parent;
1.27 +
1.28 public:
1.29
1.30 - typedef Base Parent;
1.31 typedef DigraphExtender Digraph;
1.32
1.33 // Base extensions
1.34 @@ -218,10 +219,9 @@
1.35 template <typename _Value>
1.36 class NodeMap
1.37 : public MapExtender<DefaultMap<Digraph, Node, _Value> > {
1.38 - public:
1.39 - typedef DigraphExtender Digraph;
1.40 typedef MapExtender<DefaultMap<Digraph, Node, _Value> > Parent;
1.41
1.42 + public:
1.43 explicit NodeMap(const Digraph& digraph)
1.44 : Parent(digraph) {}
1.45 NodeMap(const Digraph& digraph, const _Value& value)
1.46 @@ -243,10 +243,9 @@
1.47 template <typename _Value>
1.48 class ArcMap
1.49 : public MapExtender<DefaultMap<Digraph, Arc, _Value> > {
1.50 - public:
1.51 - typedef DigraphExtender Digraph;
1.52 typedef MapExtender<DefaultMap<Digraph, Arc, _Value> > Parent;
1.53
1.54 + public:
1.55 explicit ArcMap(const Digraph& digraph)
1.56 : Parent(digraph) {}
1.57 ArcMap(const Digraph& digraph, const _Value& value)
1.58 @@ -330,9 +329,10 @@
1.59 // \brief Extender for the Graphs
1.60 template <typename Base>
1.61 class GraphExtender : public Base {
1.62 + typedef Base Parent;
1.63 +
1.64 public:
1.65
1.66 - typedef Base Parent;
1.67 typedef GraphExtender Graph;
1.68
1.69 typedef True UndirectedTag;
1.70 @@ -601,10 +601,9 @@
1.71 template <typename _Value>
1.72 class NodeMap
1.73 : public MapExtender<DefaultMap<Graph, Node, _Value> > {
1.74 - public:
1.75 - typedef GraphExtender Graph;
1.76 typedef MapExtender<DefaultMap<Graph, Node, _Value> > Parent;
1.77
1.78 + public:
1.79 NodeMap(const Graph& graph)
1.80 : Parent(graph) {}
1.81 NodeMap(const Graph& graph, const _Value& value)
1.82 @@ -626,10 +625,9 @@
1.83 template <typename _Value>
1.84 class ArcMap
1.85 : public MapExtender<DefaultMap<Graph, Arc, _Value> > {
1.86 - public:
1.87 - typedef GraphExtender Graph;
1.88 typedef MapExtender<DefaultMap<Graph, Arc, _Value> > Parent;
1.89
1.90 + public:
1.91 ArcMap(const Graph& graph)
1.92 : Parent(graph) {}
1.93 ArcMap(const Graph& graph, const _Value& value)
1.94 @@ -651,10 +649,9 @@
1.95 template <typename _Value>
1.96 class EdgeMap
1.97 : public MapExtender<DefaultMap<Graph, Edge, _Value> > {
1.98 - public:
1.99 - typedef GraphExtender Graph;
1.100 typedef MapExtender<DefaultMap<Graph, Edge, _Value> > Parent;
1.101
1.102 + public:
1.103 EdgeMap(const Graph& graph)
1.104 : Parent(graph) {}
1.105