1.1 --- a/lemon/graph_utils.h Tue Jul 12 16:15:37 2005 +0000
1.2 +++ b/lemon/graph_utils.h Tue Jul 12 16:16:19 2005 +0000
1.3 @@ -193,7 +193,7 @@
1.4
1.5 /// \brief Copy a map.
1.6 ///
1.7 - /// Thsi function copies the \c source map to the \c target map. It uses the
1.8 + /// This function copies the \c source map to the \c target map. It uses the
1.9 /// given iterator to iterate on the data structure and it uses the \c ref
1.10 /// mapping to convert the source's keys to the target's keys.
1.11 template <typename Target, typename Source,
2.1 --- a/lemon/kruskal.h Tue Jul 12 16:15:37 2005 +0000
2.2 +++ b/lemon/kruskal.h Tue Jul 12 16:16:19 2005 +0000
2.3 @@ -45,7 +45,7 @@
2.4 /// Kruskal's algorithm to find a minimum cost tree of a graph.
2.5
2.6 /// This function runs Kruskal's algorithm to find a minimum cost tree.
2.7 - /// \param G The graph the algorithm runs on. The algorithm considers the
2.8 + /// \param g The graph the algorithm runs on. The algorithm considers the
2.9 /// graph to be undirected, the direction of the edges are not used.
2.10 ///
2.11 /// \param in This object is used to describe the edge costs. It must
2.12 @@ -76,21 +76,21 @@
2.13
2.14 template <class GR, class IN, class OUT>
2.15 typename IN::value_type::second_type
2.16 - kruskal(GR const& G, IN const& in,
2.17 + kruskal(GR const& g, IN const& in,
2.18 OUT& out)
2.19 {
2.20 typedef typename IN::value_type::second_type EdgeCost;
2.21 typedef typename GR::template NodeMap<int> NodeIntMap;
2.22 typedef typename GR::Node Node;
2.23
2.24 - NodeIntMap comp(G, -1);
2.25 + NodeIntMap comp(g, -1);
2.26 UnionFind<Node,NodeIntMap> uf(comp);
2.27
2.28 EdgeCost tot_cost = 0;
2.29 for (typename IN::const_iterator p = in.begin();
2.30 p!=in.end(); ++p ) {
2.31 - if ( uf.join(G.target((*p).first),
2.32 - G.source((*p).first)) ) {
2.33 + if ( uf.join(g.target((*p).first),
2.34 + g.source((*p).first)) ) {
2.35 out.set((*p).first, true);
2.36 tot_cost += (*p).second;
2.37 }
2.38 @@ -109,7 +109,7 @@
2.39 /// on-the-fly.
2.40 ///
2.41 /// A typical examle is the following call:
2.42 - /// <tt>kruskal(G, some_input, makeSequenceOutput(iterator))</tt>.
2.43 + /// <tt>kruskal(g, some_input, makeSequenceOutput(iterator))</tt>.
2.44 /// Here, the third argument is a temporary object (which wraps around an
2.45 /// iterator with a writable bool map interface), and thus by rules of C++
2.46 /// is a \c const object. To enable call like this exist this class and
2.47 @@ -130,10 +130,10 @@
2.48 template <class GR, class IN, class OUT>
2.49 inline
2.50 typename IN::value_type::second_type
2.51 - kruskal(GR const& G, IN const& edges, OUT const& out_map)
2.52 + kruskal(GR const& g, IN const& edges, OUT const& out_map)
2.53 {
2.54 NonConstMapWr<OUT> map_wr(out_map);
2.55 - return kruskal(G, edges, map_wr);
2.56 + return kruskal(g, edges, map_wr);
2.57 }
2.58
2.59 /* ** ** Input-objects ** ** */
2.60 @@ -175,17 +175,17 @@
2.61
2.62 template<class _GR>
2.63 typename enable_if<typename _GR::UndirTag,void>::type
2.64 - fillWithEdges(const _GR& G, const Map& m,dummy<0> = 0)
2.65 + fillWithEdges(const _GR& g, const Map& m,dummy<0> = 0)
2.66 {
2.67 - for(typename GR::UndirEdgeIt e(G);e!=INVALID;++e)
2.68 + for(typename GR::UndirEdgeIt e(g);e!=INVALID;++e)
2.69 push_back(value_type(typename GR::Edge(e,true), m[e]));
2.70 }
2.71
2.72 template<class _GR>
2.73 typename disable_if<typename _GR::UndirTag,void>::type
2.74 - fillWithEdges(const _GR& G, const Map& m,dummy<1> = 1)
2.75 + fillWithEdges(const _GR& g, const Map& m,dummy<1> = 1)
2.76 {
2.77 - for(typename GR::EdgeIt e(G);e!=INVALID;++e)
2.78 + for(typename GR::EdgeIt e(g);e!=INVALID;++e)
2.79 push_back(value_type(e, m[e]));
2.80 }
2.81
2.82 @@ -196,8 +196,8 @@
2.83 std::sort(this->begin(), this->end(), comparePair());
2.84 }
2.85
2.86 - KruskalMapInput(GR const& G, Map const& m) {
2.87 - fillWithEdges(G,m);
2.88 + KruskalMapInput(GR const& g, Map const& m) {
2.89 + fillWithEdges(g,m);
2.90 sort();
2.91 }
2.92 };
2.93 @@ -211,7 +211,7 @@
2.94 /// In most cases you possibly
2.95 /// want to use the function kruskalEdgeMap() instead.
2.96 ///
2.97 - ///\param G The type of the graph the algorithm runs on.
2.98 + ///\param g The type of the graph the algorithm runs on.
2.99 ///\param m An edge map containing the cost of the edges.
2.100 ///\par
2.101 ///The cost type can be any type satisfying the
2.102 @@ -223,9 +223,9 @@
2.103 ///
2.104 template<class GR, class Map>
2.105 inline
2.106 - KruskalMapInput<GR,Map> makeKruskalMapInput(const GR &G,const Map &m)
2.107 + KruskalMapInput<GR,Map> makeKruskalMapInput(const GR &g,const Map &m)
2.108 {
2.109 - return KruskalMapInput<GR,Map>(G,m);
2.110 + return KruskalMapInput<GR,Map>(g,m);
2.111 }
2.112
2.113
2.114 @@ -291,7 +291,7 @@
2.115 /// Wrapper function to kruskal().
2.116 /// Input is from an edge map, output is a plain bool map.
2.117 ///
2.118 - ///\param G The type of the graph the algorithm runs on.
2.119 + ///\param g The type of the graph the algorithm runs on.
2.120 ///\param in An edge map containing the cost of the edges.
2.121 ///\par
2.122 ///The cost type can be any type satisfying the
2.123 @@ -310,11 +310,11 @@
2.124 template <class GR, class IN, class RET>
2.125 inline
2.126 typename IN::Value
2.127 - kruskalEdgeMap(GR const& G,
2.128 + kruskalEdgeMap(GR const& g,
2.129 IN const& in,
2.130 RET &out) {
2.131 - return kruskal(G,
2.132 - KruskalMapInput<GR,IN>(G,in),
2.133 + return kruskal(g,
2.134 + KruskalMapInput<GR,IN>(g,in),
2.135 out);
2.136 }
2.137
2.138 @@ -324,7 +324,7 @@
2.139 /// Wrapper function to kruskal().
2.140 /// Input is from an edge map, output is an STL Sequence.
2.141 ///
2.142 - ///\param G The type of the graph the algorithm runs on.
2.143 + ///\param g The type of the graph the algorithm runs on.
2.144 ///\param in An edge map containing the cost of the edges.
2.145 ///\par
2.146 ///The cost type can be any type satisfying the
2.147 @@ -335,17 +335,17 @@
2.148 /// \retval out This must be an iteraror of an STL Container with
2.149 /// <tt>GR::Edge</tt> as its <tt>value_type</tt>.
2.150 /// The algorithm copies the elements of the found tree into this sequence.
2.151 - /// For example, if we know that the spanning tree of the graph \c G has
2.152 + /// For example, if we know that the spanning tree of the graph \c g has
2.153 /// say 53 edges then
2.154 /// we can put its edges into a STL vector \c tree with a code like this.
2.155 /// \code
2.156 /// std::vector<Edge> tree(53);
2.157 - /// kruskalEdgeMap_IteratorOut(G,cost,tree.begin());
2.158 + /// kruskalEdgeMap_IteratorOut(g,cost,tree.begin());
2.159 /// \endcode
2.160 /// Or if we don't know in advance the size of the tree, we can write this.
2.161 /// \code
2.162 /// std::vector<Edge> tree;
2.163 - /// kruskalEdgeMap_IteratorOut(G,cost,std::back_inserter(tree));
2.164 + /// kruskalEdgeMap_IteratorOut(g,cost,std::back_inserter(tree));
2.165 /// \endcode
2.166 ///
2.167 /// \return The cost of the found tree.
2.168 @@ -355,12 +355,12 @@
2.169 template <class GR, class IN, class RET>
2.170 inline
2.171 typename IN::Value
2.172 - kruskalEdgeMap_IteratorOut(const GR& G,
2.173 + kruskalEdgeMap_IteratorOut(const GR& g,
2.174 const IN& in,
2.175 RET out)
2.176 {
2.177 KruskalSequenceOutput<RET> _out(out);
2.178 - return kruskal(G, KruskalMapInput<GR,IN>(G, in), _out);
2.179 + return kruskal(g, KruskalMapInput<GR,IN>(g, in), _out);
2.180 }
2.181
2.182 /// @}
3.1 --- a/lemon/maps.h Tue Jul 12 16:15:37 2005 +0000
3.2 +++ b/lemon/maps.h Tue Jul 12 16:16:19 2005 +0000
3.3 @@ -221,13 +221,11 @@
3.4 }
3.5 };
3.6
3.7 - ///Convert the \c Value of a maps to another type.
3.8 + ///Convert the \c Value of a map to another type.
3.9
3.10 ///This \ref concept::ReadMap "read only map"
3.11 ///converts the \c Value of a maps to type \c T.
3.12 - ///Its \c Value is inherited from \c M.
3.13 - ///
3.14 - ///\bug wrong documentation
3.15 + ///Its \c Key is inherited from \c M.
3.16 template<class M, class T>
3.17 class ConvertMap {
3.18 typename SmartConstReference<M>::Type m;
3.19 @@ -304,7 +302,7 @@
3.20 return AddMap<M1,M2>(m1,m2);
3.21 }
3.22
3.23 - ///Shift a maps with a constant.
3.24 + ///Shift a map with a constant.
3.25
3.26 ///This \ref concept::ReadMap "read only map" returns the sum of the
3.27 ///given map and a constant value.
3.28 @@ -314,7 +312,7 @@
3.29 ///\code
3.30 /// ShiftMap<X> sh(x,v);
3.31 ///\endcode
3.32 - ///it is equivalent with
3.33 + ///is equivalent with
3.34 ///\code
3.35 /// ConstMap<X::Key, X::Value> c_tmp(v);
3.36 /// AddMap<X, ConstMap<X::Key, X::Value> > sh(x,v);
3.37 @@ -355,7 +353,7 @@
3.38 ///Difference of two maps
3.39
3.40 ///This \ref concept::ReadMap "read only map" returns the difference
3.41 - ///of the values returned by the two
3.42 + ///of the values of the two
3.43 ///given maps. Its \c Key and \c Value will be inherited from \c M1.
3.44 ///The \c Key and \c Value of \c M2 must be convertible to those of \c M1.
3.45
3.46 @@ -391,7 +389,7 @@
3.47 ///Product of two maps
3.48
3.49 ///This \ref concept::ReadMap "read only map" returns the product of the
3.50 - ///values returned by the two
3.51 + ///values of the two
3.52 ///given
3.53 ///maps. Its \c Key and \c Value will be inherited from \c M1.
3.54 ///The \c Key and \c Value of \c M2 must be convertible to those of \c M1.
3.55 @@ -424,17 +422,17 @@
3.56 return MulMap<M1,M2>(m1,m2);
3.57 }
3.58
3.59 - ///Scale a maps with a constant.
3.60 + ///Scales a maps with a constant.
3.61
3.62 ///This \ref concept::ReadMap "read only map" returns the value of the
3.63 - ///given map multipied with a constant value.
3.64 + ///given map multiplied with a constant value.
3.65 ///Its \c Key and \c Value is inherited from \c M.
3.66 ///
3.67 ///Actually,
3.68 ///\code
3.69 /// ScaleMap<X> sc(x,v);
3.70 ///\endcode
3.71 - ///it is equivalent with
3.72 + ///is equivalent with
3.73 ///\code
3.74 /// ConstMap<X::Key, X::Value> c_tmp(v);
3.75 /// MulMap<X, ConstMap<X::Key, X::Value> > sc(x,v);
3.76 @@ -475,7 +473,7 @@
3.77 ///Quotient of two maps
3.78
3.79 ///This \ref concept::ReadMap "read only map" returns the quotient of the
3.80 - ///values returned by the two
3.81 + ///values of the two
3.82 ///given maps. Its \c Key and \c Value will be inherited from \c M1.
3.83 ///The \c Key and \c Value of \c M2 must be convertible to those of \c M1.
3.84
3.85 @@ -552,14 +550,14 @@
3.86 return ComposeMap<M1,M2>(m1,m2);
3.87 }
3.88
3.89 - ///Combine of two maps using an STL (binary) functor.
3.90 + ///Combines of two maps using an STL (binary) functor.
3.91
3.92 - ///Combine of two maps using an STL (binary) functor.
3.93 + ///Combines of two maps using an STL (binary) functor.
3.94 ///
3.95 ///
3.96 - ///This \ref concept::ReadMap "read only map" takes to maps and a
3.97 + ///This \ref concept::ReadMap "read only map" takes two maps and a
3.98 ///binary functor and returns the composition of
3.99 - ///two
3.100 + ///the two
3.101 ///given maps unsing the functor.
3.102 ///That is to say, if \c m1 and \c m2 is of type \c M1 and \c M2
3.103 ///and \c f is of \c F,
3.104 @@ -789,7 +787,7 @@
3.105 }
3.106
3.107
3.108 - ///Apply all map setting operations to two maps
3.109 + ///Applies all map setting operations to two maps
3.110
3.111 ///This map has two \ref concept::WriteMap "writable map"
3.112 ///parameters and each write request will be passed to both of them.