[Lemon-commits] Alpar Juttner: Merge
Lemon HG
hg at lemon.cs.elte.hu
Sun Sep 28 11:15:12 CEST 2008
details: http://lemon.cs.elte.hu/hg/lemon/rev/bb40b6db0a58
changeset: 287:bb40b6db0a58
user: Alpar Juttner <alpar [at] cs.elte.hu>
date: Sat Sep 27 14:33:28 2008 +0200
description:
Merge
diffstat:
18 files changed, 343 insertions(+), 386 deletions(-)
lemon/bfs.h | 9
lemon/bits/base_extender.h | 3
lemon/bits/vector_map.h | 3
lemon/concept_check.h | 20 -
lemon/concepts/path.h | 1
lemon/core.h | 634 ++++++++++++++++++++++----------------------
lemon/dfs.h | 9
lemon/dijkstra.h | 12
lemon/error.h | 2
lemon/graph_to_eps.h | 5
lemon/list_graph.h | 4
lemon/maps.h | 4
lemon/random.h | 1
lemon/smart_graph.h | 1
lemon/time_measure.h | 2
lemon/tolerance.h | 2
scripts/chg-len.py | 5
test/graph_copy_test.cc | 12
diffs (truncated from 1740 to 300 lines):
diff -r da414906fe21 -r bb40b6db0a58 lemon/bfs.h
--- a/lemon/bfs.h Fri Sep 26 12:40:11 2008 +0200
+++ b/lemon/bfs.h Sat Sep 27 14:33:28 2008 +0200
@@ -54,7 +54,6 @@
///This function instantiates a \ref PredMap.
///\param g is the digraph, to which we would like to define the
///\ref PredMap.
- ///\todo The digraph alone may be insufficient to initialize
static PredMap *createPredMap(const Digraph &g)
{
return new PredMap(g);
@@ -64,7 +63,6 @@
///The type of the map that indicates which nodes are processed.
///It must meet the \ref concepts::WriteMap "WriteMap" concept.
- ///By default it is a NullMap.
typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
///Instantiates a \ref ProcessedMap.
@@ -196,8 +194,7 @@
int _queue_head,_queue_tail,_queue_next_dist;
int _curr_dist;
- ///Creates the maps if necessary.
- ///\todo Better memory allocation (instead of new).
+ //Creates the maps if necessary.
void create_maps()
{
if(!_pred) {
@@ -848,7 +845,6 @@
///This function instantiates a \ref PredMap.
///\param g is the digraph, to which we would like to define the
///\ref PredMap.
- ///\todo The digraph alone may be insufficient to initialize
static PredMap *createPredMap(const Digraph &g)
{
return new PredMap(g);
@@ -1370,8 +1366,7 @@
std::vector<typename Digraph::Node> _list;
int _list_front, _list_back;
- ///Creates the maps if necessary.
- ///\todo Better memory allocation (instead of new).
+ //Creates the maps if necessary.
void create_maps() {
if(!_reached) {
local_reached = true;
diff -r da414906fe21 -r bb40b6db0a58 lemon/bits/base_extender.h
--- a/lemon/bits/base_extender.h Fri Sep 26 12:40:11 2008 +0200
+++ b/lemon/bits/base_extender.h Sat Sep 27 14:33:28 2008 +0200
@@ -105,9 +105,6 @@
/// Returns whether the given directed arc has the same orientation
/// as the corresponding edge.
- ///
- /// \todo reference to the corresponding point of the undirected digraph
- /// concept. "What does the direction of an edge mean?"
static bool direction(const Arc &a) { return a.forward; }
using Parent::first;
diff -r da414906fe21 -r bb40b6db0a58 lemon/bits/vector_map.h
--- a/lemon/bits/vector_map.h Fri Sep 26 12:40:11 2008 +0200
+++ b/lemon/bits/vector_map.h Sat Sep 27 14:33:28 2008 +0200
@@ -42,10 +42,9 @@
/// automatically updates the map when a key is added to or erased from
/// the map. This map type uses the std::vector to store the values.
///
- /// \tparam _Notifier The AlterationNotifier that will notify this map.
+ /// \tparam _Graph The graph this map is attached to.
/// \tparam _Item The item type of the graph items.
/// \tparam _Value The value type of the map.
- /// \todo Fix the doc: there is _Graph parameter instead of _Notifier.
template <typename _Graph, typename _Item, typename _Value>
class VectorMap
: public ItemSetTraits<_Graph, _Item>::ItemNotifier::ObserverBase {
diff -r da414906fe21 -r bb40b6db0a58 lemon/concept_check.h
--- a/lemon/concept_check.h Fri Sep 26 12:40:11 2008 +0200
+++ b/lemon/concept_check.h Sat Sep 27 14:33:28 2008 +0200
@@ -16,28 +16,12 @@
*
*/
-// This file contains a modified version of the concept checking
-// utility from BOOST.
-// See the appropriate copyright notice below.
-
-// (C) Copyright Jeremy Siek 2000.
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// Revision History:
-// 05 May 2001: Workarounds for HP aCC from Thomas Matelich. (Jeremy Siek)
-// 02 April 2001: Removed limits header altogether. (Jeremy Siek)
-// 01 April 2001: Modified to use new <boost/limits.hpp> header. (JMaddock)
-//
-
-// See http://www.boost.org/libs/concept_check for documentation.
+// The contents of this file was inspired by the concept checking
+// utility of the BOOST library (http://www.boost.org).
///\file
///\brief Basic utilities for concept checking.
///
-///\todo Are we still using BOOST concept checking utility?
-///Is the BOOST copyright notice necessary?
#ifndef LEMON_CONCEPT_CHECK_H
#define LEMON_CONCEPT_CHECK_H
diff -r da414906fe21 -r bb40b6db0a58 lemon/concepts/path.h
--- a/lemon/concepts/path.h Fri Sep 26 12:40:11 2008 +0200
+++ b/lemon/concepts/path.h Sat Sep 27 14:33:28 2008 +0200
@@ -20,7 +20,6 @@
///\file
///\brief Classes for representing paths in digraphs.
///
-///\todo Iterators have obsolete style
#ifndef LEMON_CONCEPT_PATH_H
#define LEMON_CONCEPT_PATH_H
diff -r da414906fe21 -r bb40b6db0a58 lemon/core.h
--- a/lemon/core.h Fri Sep 26 12:40:11 2008 +0200
+++ b/lemon/core.h Sat Sep 27 14:33:28 2008 +0200
@@ -58,10 +58,10 @@
/// \addtogroup gutils
/// @{
- ///Creates convenience typedefs for the digraph types and iterators
+ ///Create convenient typedefs for the digraph types and iterators
- ///This \c \#define creates convenience typedefs for the following types
- ///of \c Digraph: \c Node, \c NodeIt, \c Arc, \c ArcIt, \c InArcIt,
+ ///This \c \#define creates convenient type definitions for the following
+ ///types of \c Digraph: \c Node, \c NodeIt, \c Arc, \c ArcIt, \c InArcIt,
///\c OutArcIt, \c BoolNodeMap, \c IntNodeMap, \c DoubleNodeMap,
///\c BoolArcMap, \c IntArcMap, \c DoubleArcMap.
///
@@ -80,9 +80,9 @@
typedef Digraph::NodeMap<double> DoubleNodeMap; \
typedef Digraph::ArcMap<bool> BoolArcMap; \
typedef Digraph::ArcMap<int> IntArcMap; \
- typedef Digraph::ArcMap<double> DoubleArcMap
+ typedef Digraph::ArcMap<double> DoubleArcMap;
- ///Creates convenience typedefs for the digraph types and iterators
+ ///Create convenient typedefs for the digraph types and iterators
///\see DIGRAPH_TYPEDEFS
///
@@ -100,17 +100,17 @@
typedef typename Digraph::template NodeMap<double> DoubleNodeMap; \
typedef typename Digraph::template ArcMap<bool> BoolArcMap; \
typedef typename Digraph::template ArcMap<int> IntArcMap; \
- typedef typename Digraph::template ArcMap<double> DoubleArcMap
+ typedef typename Digraph::template ArcMap<double> DoubleArcMap;
- ///Creates convenience typedefs for the graph types and iterators
+ ///Create convenient typedefs for the graph types and iterators
- ///This \c \#define creates the same convenience typedefs as defined
+ ///This \c \#define creates the same convenient type definitions as defined
///by \ref DIGRAPH_TYPEDEFS(Graph) and six more, namely it creates
///\c Edge, \c EdgeIt, \c IncEdgeIt, \c BoolEdgeMap, \c IntEdgeMap,
///\c DoubleEdgeMap.
///
///\note If the graph type is a dependent type, ie. the graph type depend
- ///on a template parameter, then use \c TEMPLATE_DIGRAPH_TYPEDEFS()
+ ///on a template parameter, then use \c TEMPLATE_GRAPH_TYPEDEFS()
///macro.
#define GRAPH_TYPEDEFS(Graph) \
DIGRAPH_TYPEDEFS(Graph); \
@@ -119,9 +119,9 @@
typedef Graph::IncEdgeIt IncEdgeIt; \
typedef Graph::EdgeMap<bool> BoolEdgeMap; \
typedef Graph::EdgeMap<int> IntEdgeMap; \
- typedef Graph::EdgeMap<double> DoubleEdgeMap
+ typedef Graph::EdgeMap<double> DoubleEdgeMap;
- ///Creates convenience typedefs for the graph types and iterators
+ ///Create convenient typedefs for the graph types and iterators
///\see GRAPH_TYPEDEFS
///
@@ -134,12 +134,12 @@
typedef typename Graph::IncEdgeIt IncEdgeIt; \
typedef typename Graph::template EdgeMap<bool> BoolEdgeMap; \
typedef typename Graph::template EdgeMap<int> IntEdgeMap; \
- typedef typename Graph::template EdgeMap<double> DoubleEdgeMap
+ typedef typename Graph::template EdgeMap<double> DoubleEdgeMap;
- /// \brief Function to count the items in the graph.
+ /// \brief Function to count the items in a graph.
///
- /// This function counts the items (nodes, arcs etc) in the graph.
- /// The complexity of the function is O(n) because
+ /// This function counts the items (nodes, arcs etc.) in a graph.
+ /// The complexity of the function is linear because
/// it iterates on all of the items.
template <typename Graph, typename Item>
inline int countItems(const Graph& g) {
@@ -176,11 +176,11 @@
/// \brief Function to count the nodes in the graph.
///
/// This function counts the nodes in the graph.
- /// The complexity of the function is O(n) but for some
- /// graph structures it is specialized to run in O(1).
+ /// The complexity of the function is <em>O</em>(<em>n</em>), but for some
+ /// graph structures it is specialized to run in <em>O</em>(1).
///
- /// If the graph contains a \e nodeNum() member function and a
- /// \e NodeNumTag tag then this function calls directly the member
+ /// \note If the graph contains a \c nodeNum() member function and a
+ /// \c NodeNumTag tag then this function calls directly the member
/// function to query the cardinality of the node set.
template <typename Graph>
inline int countNodes(const Graph& g) {
@@ -212,11 +212,11 @@
/// \brief Function to count the arcs in the graph.
///
/// This function counts the arcs in the graph.
- /// The complexity of the function is O(e) but for some
- /// graph structures it is specialized to run in O(1).
+ /// The complexity of the function is <em>O</em>(<em>m</em>), but for some
+ /// graph structures it is specialized to run in <em>O</em>(1).
///
- /// If the graph contains a \e arcNum() member function and a
- /// \e EdgeNumTag tag then this function calls directly the member
+ /// \note If the graph contains a \c arcNum() member function and a
+ /// \c ArcNumTag tag then this function calls directly the member
/// function to query the cardinality of the arc set.
template <typename Graph>
inline int countArcs(const Graph& g) {
@@ -224,6 +224,7 @@
}
// Edge counting:
+
namespace _core_bits {
template <typename Graph, typename Enable = void>
@@ -247,11 +248,11 @@
/// \brief Function to count the edges in the graph.
///
/// This function counts the edges in the graph.
- /// The complexity of the function is O(m) but for some
- /// graph structures it is specialized to run in O(1).
+ /// The complexity of the function is <em>O</em>(<em>m</em>), but for some
+ /// graph structures it is specialized to run in <em>O</em>(1).
///
- /// If the graph contains a \e edgeNum() member function and a
- /// \e EdgeNumTag tag then this function calls directly the member
+ /// \note If the graph contains a \c edgeNum() member function and a
+ /// \c EdgeNumTag tag then this function calls directly the member
/// function to query the cardinality of the edge set.
template <typename Graph>
inline int countEdges(const Graph& g) {
@@ -272,28 +273,28 @@
/// \brief Function to count the number of the out-arcs from node \c n.
///
/// This function counts the number of the out-arcs from node \c n
- /// in the graph.
+ /// in the graph \c g.
template <typename Graph>
- inline int countOutArcs(const Graph& _g, const typename Graph::Node& _n) {
- return countNodeDegree<Graph, typename Graph::OutArcIt>(_g, _n);
+ inline int countOutArcs(const Graph& g, const typename Graph::Node& n) {
+ return countNodeDegree<Graph, typename Graph::OutArcIt>(g, n);
}
/// \brief Function to count the number of the in-arcs to node \c n.
///
/// This function counts the number of the in-arcs to node \c n
- /// in the graph.
+ /// in the graph \c g.
template <typename Graph>
- inline int countInArcs(const Graph& _g, const typename Graph::Node& _n) {
- return countNodeDegree<Graph, typename Graph::InArcIt>(_g, _n);
+ inline int countInArcs(const Graph& g, const typename Graph::Node& n) {
+ return countNodeDegree<Graph, typename Graph::InArcIt>(g, n);
}
/// \brief Function to count the number of the inc-edges to node \c n.
///
/// This function counts the number of the inc-edges to node \c n
- /// in the graph.
+ /// in the undirected graph \c g.
template <typename Graph>
- inline int countIncEdges(const Graph& _g, const typename Graph::Node& _n) {
- return countNodeDegree<Graph, typename Graph::IncEdgeIt>(_g, _n);
+ inline int countIncEdges(const Graph& g, const typename Graph::Node& n) {
+ return countNodeDegree<Graph, typename Graph::IncEdgeIt>(g, n);
}
namespace _core_bits {
@@ -307,12 +308,12 @@
};
template <typename Digraph, typename Item, typename RefMap,
- typename ToMap, typename FromMap>
+ typename FromMap, typename ToMap>
More information about the Lemon-commits
mailing list