MCPcopy Create free account
hub / github.com/TUC-ProAut/libRSF / getTimeBelowOrEqual

Method getTimeBelowOrEqual

include/DataSet.h:378–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376 }
377
378 bool getTimeBelowOrEqual(const KeyType &ID, const double TimeIn, double& TimeOut) const
379 {
380 if (!this->checkID(ID))
381 {
382 PRINT_ERROR("Key does not exist: ", ID);
383 return false;
384 }
385
386 /** catch equal case at first */
387 if (_DataStreams.at(ID).count(TimeIn) > 0)
388 {
389 const auto It = _DataStreams.at(ID).find(TimeIn);
390 TimeOut = It->first;
391 return true; /**< equal */
392 }
393 else
394 {
395 return getTimeBelow(ID, TimeIn, TimeOut); /**< below */
396 }
397 }
398
399 bool getTimeCloseTo(const KeyType &ID, const double Timestamp, double& TimestampClose) const
400 {

Callers 3

getElementsBetweenMethod · 0.95
getTimesBelowOrEqualMethod · 0.95
_FindBordersEqualMethod · 0.95

Calls 3

checkIDMethod · 0.95
countMethod · 0.80
findMethod · 0.80

Tested by

no test coverage detected