diff --git a/lemon/bits/graph_extender.h b/lemon/bits/graph_extender.h --- a/lemon/bits/graph_extender.h +++ b/lemon/bits/graph_extender.h @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2009 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -29,17 +29,18 @@ //\ingroup graphbits //\file -//\brief Extenders for the digraph types +//\brief Extenders for the graph types namespace lemon { // \ingroup graphbits // - // \brief Extender for the Digraphs + // \brief Extender for the digraph implementations template class DigraphExtender : public Base { + typedef Base Parent; + public: - typedef Base Parent; typedef DigraphExtender Digraph; // Base extensions @@ -218,10 +219,9 @@ template class NodeMap : public MapExtender > { - public: - typedef DigraphExtender Digraph; typedef MapExtender > Parent; + public: explicit NodeMap(const Digraph& digraph) : Parent(digraph) {} NodeMap(const Digraph& digraph, const _Value& value) @@ -243,10 +243,9 @@ template class ArcMap : public MapExtender > { - public: - typedef DigraphExtender Digraph; typedef MapExtender > Parent; + public: explicit ArcMap(const Digraph& digraph) : Parent(digraph) {} ArcMap(const Digraph& digraph, const _Value& value) @@ -330,9 +329,10 @@ // \brief Extender for the Graphs template class GraphExtender : public Base { + typedef Base Parent; + public: - typedef Base Parent; typedef GraphExtender Graph; typedef True UndirectedTag; @@ -601,10 +601,9 @@ template class NodeMap : public MapExtender > { - public: - typedef GraphExtender Graph; typedef MapExtender > Parent; + public: NodeMap(const Graph& graph) : Parent(graph) {} NodeMap(const Graph& graph, const _Value& value) @@ -626,10 +625,9 @@ template class ArcMap : public MapExtender > { - public: - typedef GraphExtender Graph; typedef MapExtender > Parent; + public: ArcMap(const Graph& graph) : Parent(graph) {} ArcMap(const Graph& graph, const _Value& value) @@ -651,10 +649,9 @@ template class EdgeMap : public MapExtender > { - public: - typedef GraphExtender Graph; typedef MapExtender > Parent; + public: EdgeMap(const Graph& graph) : Parent(graph) {}