Minor changes
authordeba
Fri, 30 Nov 2007 09:22:38 +0000
changeset 252993de38566e6c
parent 2528 e6bc5c0032e9
child 2530 f86f7e4eb2ba
Minor changes
lemon/bin_heap.h
lemon/fib_heap.h
lemon/graph_adaptor.h
lemon/min_mean_cycle.h
lemon/topology.h
test/graph_adaptor_test.cc
     1.1 --- a/lemon/bin_heap.h	Wed Nov 28 18:05:49 2007 +0000
     1.2 +++ b/lemon/bin_heap.h	Fri Nov 30 09:22:38 2007 +0000
     1.3 @@ -29,10 +29,10 @@
     1.4  
     1.5  namespace lemon {
     1.6  
     1.7 -  /// \ingroup auxdat
     1.8 -
     1.9 -  /// A Binary Heap implementation.
    1.10 -  
    1.11 +  ///\ingroup auxdat
    1.12 +  ///
    1.13 +  ///\brief A Binary Heap implementation.
    1.14 +  ///
    1.15    ///This class implements the \e binary \e heap data structure. A \e heap
    1.16    ///is a data structure for storing items with specified values called \e
    1.17    ///priorities in such a way that finding the item with minimum priority is
    1.18 @@ -229,7 +229,7 @@
    1.19      }
    1.20  
    1.21      /// \brief Decreases the priority of \c i to \c p.
    1.22 -
    1.23 +    ///
    1.24      /// This method decreases the priority of item \c i to \c p.
    1.25      /// \pre \c i must be stored in the heap with priority at least \c
    1.26      /// p relative to \c Compare.
     2.1 --- a/lemon/fib_heap.h	Wed Nov 28 18:05:49 2007 +0000
     2.2 +++ b/lemon/fib_heap.h	Fri Nov 30 09:22:38 2007 +0000
     2.3 @@ -30,9 +30,9 @@
     2.4  namespace lemon {
     2.5    
     2.6    /// \ingroup auxdat
     2.7 -
     2.8 -  /// Fibonacci Heap.
     2.9 -
    2.10 +  ///
    2.11 +  ///\brief Fibonacci Heap.
    2.12 +  ///
    2.13    ///This class implements the \e Fibonacci \e heap data structure. A \e heap
    2.14    ///is a data structure for storing items with specified values called \e
    2.15    ///priorities in such a way that finding the item with minimum priority is
     3.1 --- a/lemon/graph_adaptor.h	Wed Nov 28 18:05:49 2007 +0000
     3.2 +++ b/lemon/graph_adaptor.h	Fri Nov 30 09:22:38 2007 +0000
     3.3 @@ -34,7 +34,6 @@
     3.4  #include <lemon/bits/base_extender.h>
     3.5  #include <lemon/bits/graph_adaptor_extender.h>
     3.6  #include <lemon/bits/graph_extender.h>
     3.7 -
     3.8  #include <lemon/tolerance.h>
     3.9  
    3.10  #include <algorithm>
    3.11 @@ -947,8 +946,8 @@
    3.12    ///ConstMap<Edge, int> const_1_map(1);
    3.13    ///Graph::EdgeMap<int> flow(g, 0);
    3.14    ///
    3.15 -  ///Preflow<SubGA, int, ConstMap<Edge, int>, Graph::EdgeMap<int> > 
    3.16 -  ///  preflow(ga, s, t, const_1_map, flow);
    3.17 +  ///Preflow<SubGA, ConstMap<Edge, int>, Graph::EdgeMap<int> > 
    3.18 +  ///  preflow(ga, const_1_map, s, t);
    3.19    ///preflow.run();
    3.20    ///\endcode
    3.21    ///Last, the output is:
    3.22 @@ -958,7 +957,7 @@
    3.23    ///cout << "edges of the maximum number of edge-disjoint shortest s-t paths: " 
    3.24    ///     << endl;
    3.25    ///for(EdgeIt e(g); e!=INVALID; ++e) 
    3.26 -  ///  if (flow[e])
    3.27 +  ///  if (preflow.flow(e))
    3.28    ///    cout << " " << g.id(g.source(e)) << "--"
    3.29    ///         << length[e] << "->" << g.id(g.target(e)) << endl;
    3.30    ///\endcode
    3.31 @@ -2021,6 +2020,7 @@
    3.32        }
    3.33        return INVALID;
    3.34      }
    3.35 +
    3.36      
    3.37      template <typename T>
    3.38      class NodeMap : public MapBase<Node, T> {
    3.39 @@ -2030,7 +2030,15 @@
    3.40  	: inNodeMap(_graph), outNodeMap(_graph) {}
    3.41        NodeMap(const SplitGraphAdaptorBase& _graph, const T& t) 
    3.42  	: inNodeMap(_graph, t), outNodeMap(_graph, t) {}
    3.43 -      
    3.44 +      NodeMap& operator=(const NodeMap& cmap) {
    3.45 +        return operator=<NodeMap>(cmap);
    3.46 +      }
    3.47 +      template <typename CMap>
    3.48 +      NodeMap& operator=(const CMap& cmap) {
    3.49 +        Parent::operator=(cmap);
    3.50 +        return *this;
    3.51 +      }
    3.52 +
    3.53        void set(const Node& key, const T& val) {
    3.54  	if (SplitGraphAdaptorBase::inNode(key)) { inNodeMap.set(key, val); }
    3.55  	else {outNodeMap.set(key, val); }
    3.56 @@ -2062,6 +2070,14 @@
    3.57  	: edge_map(_graph), node_map(_graph) {}
    3.58        EdgeMap(const SplitGraphAdaptorBase& _graph, const T& t) 
    3.59  	: edge_map(_graph, t), node_map(_graph, t) {}
    3.60 +      EdgeMap& operator=(const EdgeMap& cmap) {
    3.61 +        return operator=<EdgeMap>(cmap);
    3.62 +      }
    3.63 +      template <typename CMap>
    3.64 +      EdgeMap& operator=(const CMap& cmap) {
    3.65 +        Parent::operator=(cmap);
    3.66 +        return *this;
    3.67 +      }
    3.68        
    3.69        void set(const Edge& key, const T& val) {
    3.70  	if (SplitGraphAdaptorBase::origEdge(key)) { 
    3.71 @@ -2470,9 +2486,9 @@
    3.72    ///
    3.73    /// SGraph::EdgeMap<int> sflow(sgraph);
    3.74    ///
    3.75 -  /// Preflow<SGraph, int, SCapacity> 
    3.76 -  ///   spreflow(sgraph, SGraph::outNode(source),SGraph::inNode(target),  
    3.77 -  ///            scapacity, sflow);
    3.78 +  /// Preflow<SGraph, SCapacity> 
    3.79 +  ///   spreflow(sgraph, scapacity, 
    3.80 +  ///            SGraph::outNode(source), SGraph::inNode(target));
    3.81    ///                                            
    3.82    /// spreflow.run();
    3.83    ///
     4.1 --- a/lemon/min_mean_cycle.h	Wed Nov 28 18:05:49 2007 +0000
     4.2 +++ b/lemon/min_mean_cycle.h	Fri Nov 30 09:22:38 2007 +0000
     4.3 @@ -19,7 +19,7 @@
     4.4  #ifndef LEMON_MIN_MEAN_CYCLE_H
     4.5  #define LEMON_MIN_MEAN_CYCLE_H
     4.6  
     4.7 -/// \ingroup min_cost_flow
     4.8 +/// \ingroup shortest_path
     4.9  ///
    4.10  /// \file
    4.11  /// \brief Karp's algorithm for finding a minimum mean (directed) cycle.
    4.12 @@ -31,7 +31,7 @@
    4.13  
    4.14  namespace lemon {
    4.15  
    4.16 -  /// \addtogroup min_cost_flow
    4.17 +  /// \addtogroup shortest_path
    4.18    /// @{
    4.19  
    4.20    /// \brief Implementation of Karp's algorithm for finding a
     5.1 --- a/lemon/topology.h	Wed Nov 28 18:05:49 2007 +0000
     5.2 +++ b/lemon/topology.h	Fri Nov 30 09:22:38 2007 +0000
     5.3 @@ -715,7 +715,6 @@
     5.4    ///
     5.5    /// \param graph The graph.
     5.6    /// \return %True when the graph bi-node-connected.
     5.7 -  /// \todo Make it faster.
     5.8    template <typename UGraph>
     5.9    bool biNodeConnected(const UGraph& graph) {
    5.10      return countBiNodeConnectedComponents(graph) == 1;
    5.11 @@ -1042,7 +1041,6 @@
    5.12    ///
    5.13    /// \param graph The undirected graph.
    5.14    /// \return The number of components.
    5.15 -  /// \todo Make it faster.
    5.16    template <typename UGraph>
    5.17    bool biEdgeConnected(const UGraph& graph) { 
    5.18      return countBiEdgeConnectedComponents(graph) == 1;
     6.1 --- a/test/graph_adaptor_test.cc	Wed Nov 28 18:05:49 2007 +0000
     6.2 +++ b/test/graph_adaptor_test.cc	Fri Nov 30 09:22:38 2007 +0000
     6.3 @@ -66,6 +66,8 @@
     6.4      checkConcept<Graph, ErasingFirstGraphAdaptor<Graph, 
     6.5        Graph::NodeMap<Graph::Edge> > >(); 
     6.6  
     6.7 +    checkConcept<Graph, SplitGraphAdaptor<Graph> >(); 
     6.8 +
     6.9      checkConcept<UGraph, UndirGraphAdaptor<Graph> >();
    6.10  
    6.11      checkConcept<UGraph, SubUGraphAdaptor<UGraph,