| 152 | } |
| 153 | |
| 154 | void FactorGraphStructure::removeFactor(const ceres::ResidualBlockId Factor) |
| 155 | { |
| 156 | /** clear mapping libRSF --> ceres */ |
| 157 | FactorInfo Info = _Factors.at(Factor); |
| 158 | _FactorList.removeElement(Info.Type, Info.Timestamp, Info.Number); |
| 159 | |
| 160 | /** clear mapping ceres --> libRSF */ |
| 161 | _Factors.erase(Factor); |
| 162 | |
| 163 | /** decrement index in factor info to correct the number of the elements above the deleted one*/ |
| 164 | for (int n = Info.Number; n < _FactorList.countElement(Info.Type, Info.Timestamp); n++) |
| 165 | { |
| 166 | _Factors.at(_FactorList.getElement(Info.Type, Info.Timestamp, n)).Number--; |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | void FactorGraphStructure::removeFactor(const FactorID &Factor) |
| 171 | { |
no test coverage detected