Small rename for clarity.

release/4.3a0
dellaert 2014-08-15 17:34:09 +02:00
parent 456c8eb6ed
commit b58d377a97
1 changed files with 4 additions and 3 deletions

View File

@ -635,10 +635,11 @@ EliminateCholesky(const GaussianFactorGraph& factors, const Ordering& keys)
// Do dense elimination // Do dense elimination
GaussianConditional::shared_ptr conditional; GaussianConditional::shared_ptr conditional;
try { try {
VerticalBlockMatrix Ab = jointFactor->info_.choleskyPartial(keys.size()); size_t numberOfKeysToEliminate = keys.size();
conditional = boost::make_shared<GaussianConditional>(jointFactor->keys(), keys.size(), Ab); VerticalBlockMatrix Ab = jointFactor->info_.choleskyPartial(numberOfKeysToEliminate);
conditional = boost::make_shared<GaussianConditional>(jointFactor->keys(), numberOfKeysToEliminate, Ab);
// Erase the eliminated keys in the remaining factor // Erase the eliminated keys in the remaining factor
jointFactor->keys_.erase(jointFactor->begin(), jointFactor->begin() + keys.size()); jointFactor->keys_.erase(jointFactor->begin(), jointFactor->begin() + numberOfKeysToEliminate);
} catch(CholeskyFailed&) { } catch(CholeskyFailed&) {
throw IndeterminantLinearSystemException(keys.front()); throw IndeterminantLinearSystemException(keys.front());
} }