diff -r 9588dcef6793 -r 655d8e78454d src/lemon/maps.h --- a/src/lemon/maps.h Wed May 04 13:07:10 2005 +0000 +++ b/src/lemon/maps.h Thu May 05 11:05:25 2005 +0000 @@ -17,7 +17,6 @@ #ifndef LEMON_MAPS_H #define LEMON_MAPS_H -#include ///\file ///\ingroup maps @@ -186,6 +185,12 @@ }; }; + /// @} + + /// \addtogroup map_adaptors + /// @{ + + ///Convert the \c Value of a maps to another type. ///This \ref concept::ReadMap "read only map" @@ -236,82 +241,6 @@ return ConvertMap(m); } - /// \brief Returns the source of the given edge. - /// - /// The SourceMap gives back the source Node of the given edge. - /// \author Balazs Dezso - template - class SourceMap { - public: - typedef typename Graph::Node Value; - typedef typename Graph::Edge Key; - - /// \brief Constructor - /// - /// Constructor - /// \param _graph The graph that the map belongs to. - SourceMap(const Graph& _graph) : graph(_graph) {} - - /// \brief The subscript operator. - /// - /// The subscript operator. - /// \param edge The edge - /// \return The source of the edge - Value operator[](const Key& edge) { - return graph.source(edge); - } - - private: - const Graph& graph; - }; - - /// \brief Returns a \ref SourceMap class - - /// This function just returns an \ref SourceMap class. - /// \relates SourceMap - template - inline SourceMap sourceMap(const Graph& graph) { - return SourceMap(graph); - } - - /// \brief Returns the target of the given edge. - /// - /// The TargetMap gives back the target Node of the given edge. - /// \author Balazs Dezso - template - class TargetMap { - public: - typedef typename Graph::Node Value; - typedef typename Graph::Edge Key; - - /// \brief Constructor - /// - /// Constructor - /// \param _graph The graph that the map belongs to. - TargetMap(const Graph& _graph) : graph(_graph) {} - - /// \brief The subscript operator. - /// - /// The subscript operator. - /// \param edge The edge - /// \return The target of the edge - Value operator[](const Key& key) { - return graph.target(key); - } - - private: - const Graph& graph; - }; - - /// \brief Returns a \ref TargetMap class - - /// This function just returns an \ref TargetMap class. - /// \relates TargetMap - template - inline TargetMap targetMap(const Graph& graph) { - return TargetMap(graph); - } - ///Sum of two maps ///This \ref concept::ReadMap "read only map" returns the sum of the two @@ -732,7 +661,7 @@ return AbsMap(m); } - ///Converts an STL style functor to a a map + ///Converts an STL style functor to a map ///This \ref concept::ReadMap "read only map" returns the value ///of a