Changeset 342:62f9787c516c in lemon1.0
 Timestamp:
 12/01/08 14:33:42 (14 years ago)
 Branch:
 default
 Children:
 343:cb5f50e6c78b, 347:33e9699c7d3a, 349:b0f74ca2e3ac
 Phase:
 public
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

lemon/dijkstra.h
r317 r342 48 48 static Value plus(const Value& left, const Value& right) { 49 49 return left + right; 50 }51 /// \brief Gives back true only if the first value is less than the second.52 static bool less(const Value& left, const Value& right) {53 return left < right;54 }55 };56 57 /// \brief Widest path operation traits for the Dijkstra algorithm class.58 ///59 /// This operation traits class defines all computational operations and60 /// constants which are used in the Dijkstra algorithm for widest path61 /// computation.62 ///63 /// \see DijkstraDefaultOperationTraits64 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 50 } 74 51 /// \brief Gives back true only if the first value is less than the second. 
test/dijkstra_test.cc
r293 r342 90 90 ::SetProcessedMap<concepts::WriteMap<Node,bool> > 91 91 ::SetStandardProcessedMap 92 ::SetOperationTraits<Dijkstra WidestPathOperationTraits<VType> >92 ::SetOperationTraits<DijkstraDefaultOperationTraits<VType> > 93 93 ::SetHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> > > 94 94 ::SetStandardHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> > >
Note: See TracChangeset
for help on using the changeset viewer.