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

Method removeStatesOutsideWindow

src/FactorGraph.cpp:518–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

516 }
517
518 void FactorGraph::removeStatesOutsideWindow(const string Name, const double TimeWindow, const double CurrentTime)
519 {
520 const double CutTime = CurrentTime - TimeWindow;
521 double Timestamp;
522 bool TimestampExists;
523
524 /** loop over timestamps */
525 TimestampExists = _StateData.getTimeFirst(Name, Timestamp);
526 if (TimestampExists)
527 {
528 while ((Timestamp <= CutTime) && TimestampExists)
529 {
530 double TimestampTemp = Timestamp;
531 TimestampExists = _StateData.getTimeNext(Name, Timestamp, Timestamp);
532 removeState(Name, TimestampTemp);
533 }
534 }
535 else
536 {
537 PRINT_ERROR("State Type doesn't exist: ", Name);
538 }
539 }
540
541 void FactorGraph::removeAllStatesOutsideWindow(const double TimeWindow, const double CurrentTime)
542 {

Callers

nothing calls this directly

Calls 2

getTimeNextMethod · 0.80
getTimeFirstMethod · 0.45

Tested by

no test coverage detected