Fix build function in Preconditioner

release/4.3a0
Sungtae An 2014-12-01 04:58:05 -05:00
parent cf34726a81
commit bc6ce27b28
1 changed files with 3 additions and 5 deletions

View File

@ -141,11 +141,9 @@ void BlockJacobiPreconditioner::build(
}
/* getting the block diagonals over the factors */
BOOST_FOREACH ( const GaussianFactor::shared_ptr &gf, gfg ) {
std::map<Key, Matrix> hessianMap = gf->hessianBlockDiagonal();
BOOST_FOREACH ( const Matrix hessian, hessianMap | boost::adaptors::map_values)
blocks.push_back(hessian);
}
std::map<Key, Matrix> hessianMap =gfg.hessianBlockDiagonal();
BOOST_FOREACH ( const Matrix hessian, hessianMap | boost::adaptors::map_values)
blocks.push_back(hessian);
/* if necessary, allocating the memory for cacheing the factorization results */
if ( nnz > bufferSize_ ) {