Using vector::assign instead of erase in JacobianFactor::eliminate, caused invalid iterator on some STL implementations

release/4.3a0
Richard Roberts 2012-04-09 13:21:16 +00:00
parent 08b87be4b5
commit 7243a9870b
1 changed files with 1 additions and 1 deletions

View File

@ -474,7 +474,7 @@ namespace gtsam {
tic(4, "remaining factor");
// Take lower-right block of Ab to get the new factor
Ab_.rowEnd() = noiseModel->dim();
keys_.assign(begin() + nrFrontals, end());
keys_.erase(begin(), begin() + nrFrontals);
// Set sigmas with the right model
if (noiseModel->isConstrained())
model_ = noiseModel::Constrained::MixedSigmas(sub(noiseModel->sigmas(), frontalDim, noiseModel->dim()));