| 355 | } |
| 356 | |
| 357 | bool getTimeBelow(const KeyType &ID, const double TimeIn, double& TimeOut) const |
| 358 | { |
| 359 | if (!this->checkID(ID)) |
| 360 | { |
| 361 | PRINT_ERROR("Key does not exist: ", ID); |
| 362 | return false; |
| 363 | } |
| 364 | |
| 365 | const auto It = _DataStreams.at(ID).lower_bound(TimeIn); |
| 366 | |
| 367 | /** case 1: there is no element below */ |
| 368 | if (It == _DataStreams.at(ID).begin()) |
| 369 | { |
| 370 | return false; |
| 371 | } |
| 372 | |
| 373 | /** case 2: there is a element*/ |
| 374 | TimeOut = std::prev(It)->first; |
| 375 | return true; |
| 376 | } |
| 377 | |
| 378 | bool getTimeBelowOrEqual(const KeyType &ID, const double TimeIn, double& TimeOut) const |
| 379 | { |
no test coverage detected