1.1 --- a/src/lemon/maps.h Wed May 04 13:07:10 2005 +0000
1.2 +++ b/src/lemon/maps.h Thu May 05 11:05:25 2005 +0000
1.3 @@ -17,7 +17,6 @@
1.4 #ifndef LEMON_MAPS_H
1.5 #define LEMON_MAPS_H
1.6
1.7 -#include<math.h>
1.8
1.9 ///\file
1.10 ///\ingroup maps
1.11 @@ -186,6 +185,12 @@
1.12 };
1.13 };
1.14
1.15 + /// @}
1.16 +
1.17 + /// \addtogroup map_adaptors
1.18 + /// @{
1.19 +
1.20 +
1.21 ///Convert the \c Value of a maps to another type.
1.22
1.23 ///This \ref concept::ReadMap "read only map"
1.24 @@ -236,82 +241,6 @@
1.25 return ConvertMap<M,T>(m);
1.26 }
1.27
1.28 - /// \brief Returns the source of the given edge.
1.29 - ///
1.30 - /// The SourceMap gives back the source Node of the given edge.
1.31 - /// \author Balazs Dezso
1.32 - template <typename Graph>
1.33 - class SourceMap {
1.34 - public:
1.35 - typedef typename Graph::Node Value;
1.36 - typedef typename Graph::Edge Key;
1.37 -
1.38 - /// \brief Constructor
1.39 - ///
1.40 - /// Constructor
1.41 - /// \param _graph The graph that the map belongs to.
1.42 - SourceMap(const Graph& _graph) : graph(_graph) {}
1.43 -
1.44 - /// \brief The subscript operator.
1.45 - ///
1.46 - /// The subscript operator.
1.47 - /// \param edge The edge
1.48 - /// \return The source of the edge
1.49 - Value operator[](const Key& edge) {
1.50 - return graph.source(edge);
1.51 - }
1.52 -
1.53 - private:
1.54 - const Graph& graph;
1.55 - };
1.56 -
1.57 - /// \brief Returns a \ref SourceMap class
1.58 -
1.59 - /// This function just returns an \ref SourceMap class.
1.60 - /// \relates SourceMap
1.61 - template <typename Graph>
1.62 - inline SourceMap<Graph> sourceMap(const Graph& graph) {
1.63 - return SourceMap<Graph>(graph);
1.64 - }
1.65 -
1.66 - /// \brief Returns the target of the given edge.
1.67 - ///
1.68 - /// The TargetMap gives back the target Node of the given edge.
1.69 - /// \author Balazs Dezso
1.70 - template <typename Graph>
1.71 - class TargetMap {
1.72 - public:
1.73 - typedef typename Graph::Node Value;
1.74 - typedef typename Graph::Edge Key;
1.75 -
1.76 - /// \brief Constructor
1.77 - ///
1.78 - /// Constructor
1.79 - /// \param _graph The graph that the map belongs to.
1.80 - TargetMap(const Graph& _graph) : graph(_graph) {}
1.81 -
1.82 - /// \brief The subscript operator.
1.83 - ///
1.84 - /// The subscript operator.
1.85 - /// \param edge The edge
1.86 - /// \return The target of the edge
1.87 - Value operator[](const Key& key) {
1.88 - return graph.target(key);
1.89 - }
1.90 -
1.91 - private:
1.92 - const Graph& graph;
1.93 - };
1.94 -
1.95 - /// \brief Returns a \ref TargetMap class
1.96 -
1.97 - /// This function just returns an \ref TargetMap class.
1.98 - /// \relates TargetMap
1.99 - template <typename Graph>
1.100 - inline TargetMap<Graph> targetMap(const Graph& graph) {
1.101 - return TargetMap<Graph>(graph);
1.102 - }
1.103 -
1.104 ///Sum of two maps
1.105
1.106 ///This \ref concept::ReadMap "read only map" returns the sum of the two
1.107 @@ -732,7 +661,7 @@
1.108 return AbsMap<M>(m);
1.109 }
1.110
1.111 - ///Converts an STL style functor to a a map
1.112 + ///Converts an STL style functor to a map
1.113
1.114 ///This \ref concept::ReadMap "read only map" returns the value
1.115 ///of a