43 CHECK_GE(speed_limit_points_.size(), 2U);
44 DCHECK_GE(s, speed_limit_points_.front().first);
46 auto compare_s = [](
const std::pair<double, double>& point,
const double s) {
47 return point.first < s;
50 auto it_lower = std::lower_bound(speed_limit_points_.begin(),
51 speed_limit_points_.end(), s, compare_s);
53 if (it_lower == speed_limit_points_.end()) {
54 return (it_lower - 1)->second;
56 return it_lower->second;