Browse files

add comment on find() [skip ci]

  • Loading branch information...
1 parent c26e90c commit fead71da5456b2756befe81d4b528b1c1f5dd3e1 @karenzshea karenzshea committed with karenzshea Oct 21, 2016
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/contractor/contractor.cpp
4 src/contractor/contractor.cpp
@@ -263,7 +263,9 @@ struct TurnPenaltySource final
using TurnPenaltySourceFlatMap = std::vector<TurnPenaltySource>;
using SegmentSpeedSourceFlatMap = std::vector<SegmentSpeedSource>;
-// Binary Search over a flattened key,val Segment storage
+// Find is a binary Search over a flattened key,val Segment storage
+// It takes the flat map and a Segment/PenaltySource object that has an overloaded
+// `==` operator, to make the std::lower_bound call work generically
template <typename FlatMap, typename SegmentKey>
auto find(const FlatMap &map, const SegmentKey &key)

0 comments on commit fead71d

Please sign in to comment.