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

Method getTimesBetween

include/DataSet.h:649–679  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

647 }
648
649 bool getTimesBetween(const KeyType &ID, const double StartTime, const double EndTime, std::vector<double> &Times) const
650 {
651 if(this->checkID(ID))
652 {
653 double Start, End;
654 if(this->_FindBordersEqual(ID, StartTime, EndTime, Start, End))
655 {
656 double Current = Start;
657 while (Current <= End)
658 {
659 Times.push_back(Current);
660
661 if(this->getTimeNext(ID, Current, Current) == false)
662 {
663 break; /**< exit if no further timestamp is available */
664 }
665 }
666 }
667 else
668 {
669 PRINT_WARNING("Could not find timestamps between ", StartTime, " and ", EndTime, " for ", ID);
670 return false;
671 }
672 }
673 else
674 {
675 PRINT_ERROR("There is no ID: ", ID);
676 return false;
677 }
678 return true;
679 }
680
681 bool getTimesBelowOrEqual(const KeyType &ID, const double EndTime, std::vector<double> &Times) const
682 {

Callers

nothing calls this directly

Calls 3

checkIDMethod · 0.95
_FindBordersEqualMethod · 0.95
getTimeNextMethod · 0.95

Tested by

no test coverage detected