Fixed another problem in HessianFactor merge constructor

release/4.3a0
Richard Roberts 2013-08-06 17:09:16 +00:00
parent 3fbc0c739f
commit 0fb15c7ec6
1 changed files with 5 additions and 4 deletions

View File

@ -275,14 +275,15 @@ HessianFactor::HessianFactor(const GaussianFactorGraph& factors,
// Allocate and copy keys
gttic(allocate);
// Allocate with dimensions for each variable plus 1 at the end for the information vector
keys_.resize(scatter->size());
vector<DenseIndex> dims(scatter->size() + 1);
br::copy(*scatter | br::transformed(&_dimFromScatterEntry), dims.begin());
BOOST_FOREACH(const Scatter::value_type& key_slotentry, *scatter) {
keys_[key_slotentry.second.slot] = key_slotentry.first;
dims[key_slotentry.second.slot] = key_slotentry.second.dimension;
}
dims.back() = 1;
info_ = SymmetricBlockMatrix(dims);
info_.full().setZero();
keys_.resize(scatter->size());
BOOST_FOREACH(const Scatter::value_type& key_slotentry, *scatter)
keys_[key_slotentry.second.slot] = key_slotentry.first;
gttoc(allocate);
// Form A' * A