26 if (sorted_vec.empty()) {
30 int end_index =
static_cast<int>(sorted_vec.size()) - 1;
31 double internal_s = 0.0;
33 while (end_index - start_index > 1) {
34 middle_index = (start_index + end_index) / 2;
35 internal_s = sorted_vec[middle_index].StartS();
36 if (internal_s > value_s) {
37 end_index = middle_index;
39 start_index = middle_index;
42 double end_s = sorted_vec[start_index].EndS();
43 if (value_s <= end_s) {
51 if (sorted_vec.empty()) {
55 int end_index =
static_cast<int>(sorted_vec.size()) - 1;
56 double internal_s = 0.0;
58 while (end_index - start_index > 1) {
59 middle_index = (start_index + end_index) / 2;
60 internal_s = sorted_vec[middle_index].EndS();
61 if (internal_s > value_s) {
62 end_index = middle_index;
64 start_index = middle_index;
67 double start_s = sorted_vec[end_index].StartS();
68 if (value_s > start_s) {
80 double start_s = sorted_vec[index].StartS();
81 double end_s = sorted_vec[index].EndS();
82 static const double distance_error = 0.02;
83 if (start_s <= value_s + distance_error &&
84 end_s >= value_s - distance_error) {