[Lemon-commits] Alpar Juttner: Merge fix #187

Lemon HG hg at lemon.cs.elte.hu
Mon Dec 1 15:32:42 CET 2008


details:   http://lemon.cs.elte.hu/hg/lemon/rev/cb5f50e6c78b
changeset: 420:cb5f50e6c78b
user:      Alpar Juttner <alpar [at] cs.elte.hu>
date:      Mon Dec 01 13:48:26 2008 +0000
description:
	Merge fix #187

diffstat:

2 files changed, 1 insertion(+), 24 deletions(-)
lemon/dijkstra.h      |   23 -----------------------
test/dijkstra_test.cc |    2 +-

diffs (45 lines):

diff -r 7d85a624093e -r cb5f50e6c78b lemon/dijkstra.h
--- a/lemon/dijkstra.h	Tue Nov 11 12:13:07 2008 +0000
+++ b/lemon/dijkstra.h	Mon Dec 01 13:48:26 2008 +0000
@@ -47,29 +47,6 @@
     /// \brief Gives back the sum of the given two elements.
     static Value plus(const Value& left, const Value& right) {
       return left + right;
-    }
-    /// \brief Gives back true only if the first value is less than the second.
-    static bool less(const Value& left, const Value& right) {
-      return left < right;
-    }
-  };
-
-  /// \brief Widest path operation traits for the Dijkstra algorithm class.
-  ///
-  /// This operation traits class defines all computational operations and
-  /// constants which are used in the Dijkstra algorithm for widest path
-  /// computation.
-  ///
-  /// \see DijkstraDefaultOperationTraits
-  template <typename Value>
-  struct DijkstraWidestPathOperationTraits {
-    /// \brief Gives back the maximum value of the type.
-    static Value zero() {
-      return std::numeric_limits<Value>::max();
-    }
-    /// \brief Gives back the minimum of the given two elements.
-    static Value plus(const Value& left, const Value& right) {
-      return std::min(left, right);
     }
     /// \brief Gives back true only if the first value is less than the second.
     static bool less(const Value& left, const Value& right) {
diff -r 7d85a624093e -r cb5f50e6c78b test/dijkstra_test.cc
--- a/test/dijkstra_test.cc	Tue Nov 11 12:13:07 2008 +0000
+++ b/test/dijkstra_test.cc	Mon Dec 01 13:48:26 2008 +0000
@@ -89,7 +89,7 @@
       ::SetDistMap<concepts::ReadWriteMap<Node,VType> >
       ::SetProcessedMap<concepts::WriteMap<Node,bool> >
       ::SetStandardProcessedMap
-      ::SetOperationTraits<DijkstraWidestPathOperationTraits<VType> >
+      ::SetOperationTraits<DijkstraDefaultOperationTraits<VType> >
       ::SetHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> > >
       ::SetStandardHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> > >
       ::Create dijkstra_test(G,length);



More information about the Lemon-commits mailing list