| 133 | } |
| 134 | |
| 135 | void FactorGraphStructure::removeState(const StateID &State) |
| 136 | { |
| 137 | /** get raw pointer*/ |
| 138 | double* StatePointer = _Data->getElement(State.ID, State.Timestamp, State.Number).getMeanPointer(); |
| 139 | |
| 140 | /** remove state info */ |
| 141 | _States.erase(StatePointer); |
| 142 | |
| 143 | /** get connected factors */ |
| 144 | std::vector<ceres::ResidualBlockId> Factors; |
| 145 | _Graph->GetResidualBlocksForParameterBlock(StatePointer, &Factors); |
| 146 | |
| 147 | /** remove connected factors */ |
| 148 | for (auto Factor: Factors) |
| 149 | { |
| 150 | this->removeFactor(Factor); |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | void FactorGraphStructure::removeFactor(const ceres::ResidualBlockId Factor) |
| 155 | { |
nothing calls this directly
no test coverage detected