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

Method removeFactor

src/FactorGraphStructure.cpp:154–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

removeStateMethod · 0.95

Calls 3

removeElementMethod · 0.80
countElementMethod · 0.80
getElementMethod · 0.80

Tested by

no test coverage detected