| 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 | { |
nothing calls this directly
no test coverage detected