[Lemon-commits] deba: r3406 - in lemon/trunk: lemon test
Lemon SVN
svn at lemon.cs.elte.hu
Fri Nov 30 10:22:39 CET 2007
Author: deba
Date: Fri Nov 30 10:22:38 2007
New Revision: 3406
Modified:
lemon/trunk/lemon/bin_heap.h
lemon/trunk/lemon/fib_heap.h
lemon/trunk/lemon/graph_adaptor.h
lemon/trunk/lemon/min_mean_cycle.h
lemon/trunk/lemon/topology.h
lemon/trunk/test/graph_adaptor_test.cc
Log:
Minor changes
Modified: lemon/trunk/lemon/bin_heap.h
==============================================================================
--- lemon/trunk/lemon/bin_heap.h (original)
+++ lemon/trunk/lemon/bin_heap.h Fri Nov 30 10:22:38 2007
@@ -29,10 +29,10 @@
namespace lemon {
- /// \ingroup auxdat
-
- /// A Binary Heap implementation.
-
+ ///\ingroup auxdat
+ ///
+ ///\brief A Binary Heap implementation.
+ ///
///This class implements the \e binary \e heap data structure. A \e heap
///is a data structure for storing items with specified values called \e
///priorities in such a way that finding the item with minimum priority is
@@ -229,7 +229,7 @@
}
/// \brief Decreases the priority of \c i to \c p.
-
+ ///
/// This method decreases the priority of item \c i to \c p.
/// \pre \c i must be stored in the heap with priority at least \c
/// p relative to \c Compare.
Modified: lemon/trunk/lemon/fib_heap.h
==============================================================================
--- lemon/trunk/lemon/fib_heap.h (original)
+++ lemon/trunk/lemon/fib_heap.h Fri Nov 30 10:22:38 2007
@@ -30,9 +30,9 @@
namespace lemon {
/// \ingroup auxdat
-
- /// Fibonacci Heap.
-
+ ///
+ ///\brief Fibonacci Heap.
+ ///
///This class implements the \e Fibonacci \e heap data structure. A \e heap
///is a data structure for storing items with specified values called \e
///priorities in such a way that finding the item with minimum priority is
Modified: lemon/trunk/lemon/graph_adaptor.h
==============================================================================
--- lemon/trunk/lemon/graph_adaptor.h (original)
+++ lemon/trunk/lemon/graph_adaptor.h Fri Nov 30 10:22:38 2007
@@ -34,7 +34,6 @@
#include <lemon/bits/base_extender.h>
#include <lemon/bits/graph_adaptor_extender.h>
#include <lemon/bits/graph_extender.h>
-
#include <lemon/tolerance.h>
#include <algorithm>
@@ -947,8 +946,8 @@
///ConstMap<Edge, int> const_1_map(1);
///Graph::EdgeMap<int> flow(g, 0);
///
- ///Preflow<SubGA, int, ConstMap<Edge, int>, Graph::EdgeMap<int> >
- /// preflow(ga, s, t, const_1_map, flow);
+ ///Preflow<SubGA, ConstMap<Edge, int>, Graph::EdgeMap<int> >
+ /// preflow(ga, const_1_map, s, t);
///preflow.run();
///\endcode
///Last, the output is:
@@ -958,7 +957,7 @@
///cout << "edges of the maximum number of edge-disjoint shortest s-t paths: "
/// << endl;
///for(EdgeIt e(g); e!=INVALID; ++e)
- /// if (flow[e])
+ /// if (preflow.flow(e))
/// cout << " " << g.id(g.source(e)) << "--"
/// << length[e] << "->" << g.id(g.target(e)) << endl;
///\endcode
@@ -2021,6 +2020,7 @@
}
return INVALID;
}
+
template <typename T>
class NodeMap : public MapBase<Node, T> {
@@ -2030,7 +2030,15 @@
: inNodeMap(_graph), outNodeMap(_graph) {}
NodeMap(const SplitGraphAdaptorBase& _graph, const T& t)
: inNodeMap(_graph, t), outNodeMap(_graph, t) {}
-
+ NodeMap& operator=(const NodeMap& cmap) {
+ return operator=<NodeMap>(cmap);
+ }
+ template <typename CMap>
+ NodeMap& operator=(const CMap& cmap) {
+ Parent::operator=(cmap);
+ return *this;
+ }
+
void set(const Node& key, const T& val) {
if (SplitGraphAdaptorBase::inNode(key)) { inNodeMap.set(key, val); }
else {outNodeMap.set(key, val); }
@@ -2062,6 +2070,14 @@
: edge_map(_graph), node_map(_graph) {}
EdgeMap(const SplitGraphAdaptorBase& _graph, const T& t)
: edge_map(_graph, t), node_map(_graph, t) {}
+ EdgeMap& operator=(const EdgeMap& cmap) {
+ return operator=<EdgeMap>(cmap);
+ }
+ template <typename CMap>
+ EdgeMap& operator=(const CMap& cmap) {
+ Parent::operator=(cmap);
+ return *this;
+ }
void set(const Edge& key, const T& val) {
if (SplitGraphAdaptorBase::origEdge(key)) {
@@ -2470,9 +2486,9 @@
///
/// SGraph::EdgeMap<int> sflow(sgraph);
///
- /// Preflow<SGraph, int, SCapacity>
- /// spreflow(sgraph, SGraph::outNode(source),SGraph::inNode(target),
- /// scapacity, sflow);
+ /// Preflow<SGraph, SCapacity>
+ /// spreflow(sgraph, scapacity,
+ /// SGraph::outNode(source), SGraph::inNode(target));
///
/// spreflow.run();
///
Modified: lemon/trunk/lemon/min_mean_cycle.h
==============================================================================
--- lemon/trunk/lemon/min_mean_cycle.h (original)
+++ lemon/trunk/lemon/min_mean_cycle.h Fri Nov 30 10:22:38 2007
@@ -19,7 +19,7 @@
#ifndef LEMON_MIN_MEAN_CYCLE_H
#define LEMON_MIN_MEAN_CYCLE_H
-/// \ingroup min_cost_flow
+/// \ingroup shortest_path
///
/// \file
/// \brief Karp's algorithm for finding a minimum mean (directed) cycle.
@@ -31,7 +31,7 @@
namespace lemon {
- /// \addtogroup min_cost_flow
+ /// \addtogroup shortest_path
/// @{
/// \brief Implementation of Karp's algorithm for finding a
Modified: lemon/trunk/lemon/topology.h
==============================================================================
--- lemon/trunk/lemon/topology.h (original)
+++ lemon/trunk/lemon/topology.h Fri Nov 30 10:22:38 2007
@@ -715,7 +715,6 @@
///
/// \param graph The graph.
/// \return %True when the graph bi-node-connected.
- /// \todo Make it faster.
template <typename UGraph>
bool biNodeConnected(const UGraph& graph) {
return countBiNodeConnectedComponents(graph) == 1;
@@ -1042,7 +1041,6 @@
///
/// \param graph The undirected graph.
/// \return The number of components.
- /// \todo Make it faster.
template <typename UGraph>
bool biEdgeConnected(const UGraph& graph) {
return countBiEdgeConnectedComponents(graph) == 1;
Modified: lemon/trunk/test/graph_adaptor_test.cc
==============================================================================
--- lemon/trunk/test/graph_adaptor_test.cc (original)
+++ lemon/trunk/test/graph_adaptor_test.cc Fri Nov 30 10:22:38 2007
@@ -66,6 +66,8 @@
checkConcept<Graph, ErasingFirstGraphAdaptor<Graph,
Graph::NodeMap<Graph::Edge> > >();
+ checkConcept<Graph, SplitGraphAdaptor<Graph> >();
+
checkConcept<UGraph, UndirGraphAdaptor<Graph> >();
checkConcept<UGraph, SubUGraphAdaptor<UGraph,
More information about the Lemon-commits
mailing list