add comment on find() [skip ci]
This commit is contained in:
parent
c26e90cac0
commit
fead71da54
@ -263,7 +263,9 @@ struct TurnPenaltySource final
|
|||||||
using TurnPenaltySourceFlatMap = std::vector<TurnPenaltySource>;
|
using TurnPenaltySourceFlatMap = std::vector<TurnPenaltySource>;
|
||||||
using SegmentSpeedSourceFlatMap = std::vector<SegmentSpeedSource>;
|
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>
|
template <typename FlatMap, typename SegmentKey>
|
||||||
auto find(const FlatMap &map, const SegmentKey &key)
|
auto find(const FlatMap &map, const SegmentKey &key)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user