Small formatting/auto changes

release/4.3a0
Frank Dellaert 2019-05-15 22:32:58 -04:00
parent 2527f34e75
commit 3f487c24f7
2 changed files with 5 additions and 5 deletions

View File

@ -65,8 +65,9 @@ Matrix SymmetricBlockMatrix::block(DenseIndex I, DenseIndex J) const {
void SymmetricBlockMatrix::choleskyPartial(DenseIndex nFrontals) { void SymmetricBlockMatrix::choleskyPartial(DenseIndex nFrontals) {
gttic(VerticalBlockMatrix_choleskyPartial); gttic(VerticalBlockMatrix_choleskyPartial);
DenseIndex topleft = variableColOffsets_[blockStart_]; DenseIndex topleft = variableColOffsets_[blockStart_];
if (!gtsam::choleskyPartial(matrix_, offset(nFrontals) - topleft, topleft)) if (!gtsam::choleskyPartial(matrix_, offset(nFrontals) - topleft, topleft)) {
throw CholeskyFailed(); throw CholeskyFailed();
}
} }
/* ************************************************************************* */ /* ************************************************************************* */

View File

@ -49,8 +49,7 @@ namespace gtsam {
// Do dense elimination step // Do dense elimination step
KeyVector keyAsVector(1); keyAsVector[0] = key; KeyVector keyAsVector(1); keyAsVector[0] = key;
std::pair<boost::shared_ptr<ConditionalType>, boost::shared_ptr<FactorType> > eliminationResult = auto eliminationResult = function(gatheredFactors, Ordering(keyAsVector));
function(gatheredFactors, Ordering(keyAsVector));
// Add conditional to BayesNet // Add conditional to BayesNet
output->push_back(eliminationResult.first); output->push_back(eliminationResult.first);
@ -190,13 +189,13 @@ namespace gtsam {
{ {
gttic(EliminationTree_eliminate); gttic(EliminationTree_eliminate);
// Allocate result // Allocate result
boost::shared_ptr<BayesNetType> result = boost::make_shared<BayesNetType>(); auto result = boost::make_shared<BayesNetType>();
// Run tree elimination algorithm // Run tree elimination algorithm
FastVector<sharedFactor> remainingFactors = inference::EliminateTree(result, *this, function); FastVector<sharedFactor> remainingFactors = inference::EliminateTree(result, *this, function);
// Add remaining factors that were not involved with eliminated variables // Add remaining factors that were not involved with eliminated variables
boost::shared_ptr<FactorGraphType> allRemainingFactors = boost::make_shared<FactorGraphType>(); auto allRemainingFactors = boost::make_shared<FactorGraphType>();
allRemainingFactors->push_back(remainingFactors_.begin(), remainingFactors_.end()); allRemainingFactors->push_back(remainingFactors_.begin(), remainingFactors_.end());
allRemainingFactors->push_back(remainingFactors.begin(), remainingFactors.end()); allRemainingFactors->push_back(remainingFactors.begin(), remainingFactors.end());