Formatting and make_shared

release/4.3a0
Richard Roberts 2013-07-12 22:27:35 +00:00
parent b7f2ba2845
commit 9c48415128
1 changed files with 3 additions and 1 deletions

View File

@ -67,7 +67,9 @@ namespace gtsam {
// Allocate combined conditional, has same keys as firstConditional // Allocate combined conditional, has same keys as firstConditional
Matrix tempCombined; Matrix tempCombined;
VerticalBlockView<Matrix> tempBlockView(tempCombined, dims.begin(), dims.end(), 0); VerticalBlockView<Matrix> tempBlockView(tempCombined, dims.begin(), dims.end(), 0);
GaussianConditional::shared_ptr combinedConditional(new GaussianConditional((*firstConditional)->begin(), (*firstConditional)->end(), nFrontals, tempBlockView, zero(nRows))); GaussianConditional::shared_ptr combinedConditional =
boost::make_shared<GaussianConditional>(
(*firstConditional)->begin(), (*firstConditional)->end(), nFrontals, tempBlockView, Vector::Zero(nRows));
// Resize to correct number of rows // Resize to correct number of rows
combinedConditional->matrix_.resize(nRows, combinedConditional->matrix_.cols()); combinedConditional->matrix_.resize(nRows, combinedConditional->matrix_.cols());