gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Merge
0 2 0
merge default
0 files changed with 1 insertions and 24 deletions:
↑ Collapse diff ↑
Ignore white space 12 line context
... ...
@@ -51,35 +51,12 @@
51 51
    /// \brief Gives back true only if the first value is less than the second.
52 52
    static bool less(const Value& left, const Value& right) {
53 53
      return left < right;
54 54
    }
55 55
  };
56 56

	
57
  /// \brief Widest path operation traits for the Dijkstra algorithm class.
58
  ///
59
  /// This operation traits class defines all computational operations and
60
  /// constants which are used in the Dijkstra algorithm for widest path
61
  /// computation.
62
  ///
63
  /// \see DijkstraDefaultOperationTraits
64
  template <typename Value>
65
  struct DijkstraWidestPathOperationTraits {
66
    /// \brief Gives back the maximum value of the type.
67
    static Value zero() {
68
      return std::numeric_limits<Value>::max();
69
    }
70
    /// \brief Gives back the minimum of the given two elements.
71
    static Value plus(const Value& left, const Value& right) {
72
      return std::min(left, right);
73
    }
74
    /// \brief Gives back true only if the first value is less than the second.
75
    static bool less(const Value& left, const Value& right) {
76
      return left < right;
77
    }
78
  };
79

	
80 57
  ///Default traits class of Dijkstra class.
81 58

	
82 59
  ///Default traits class of Dijkstra class.
83 60
  ///\tparam GR The type of the digraph.
84 61
  ///\tparam LM The type of the length map.
85 62
  template<class GR, class LM>
Ignore white space 12 line context
... ...
@@ -86,13 +86,13 @@
86 86
  {
87 87
    DType
88 88
      ::SetPredMap<concepts::ReadWriteMap<Node,Arc> >
89 89
      ::SetDistMap<concepts::ReadWriteMap<Node,VType> >
90 90
      ::SetProcessedMap<concepts::WriteMap<Node,bool> >
91 91
      ::SetStandardProcessedMap
92
      ::SetOperationTraits<DijkstraWidestPathOperationTraits<VType> >
92
      ::SetOperationTraits<DijkstraDefaultOperationTraits<VType> >
93 93
      ::SetHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> > >
94 94
      ::SetStandardHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> > >
95 95
      ::Create dijkstra_test(G,length);
96 96

	
97 97
    dijkstra_test.run(s);
98 98
    dijkstra_test.run(s,t);
0 comments (0 inline)