diff --git a/gtsam/nonlinear/ISAM2.cpp b/gtsam/nonlinear/ISAM2.cpp index 01c6810c4..423a576c1 100644 --- a/gtsam/nonlinear/ISAM2.cpp +++ b/gtsam/nonlinear/ISAM2.cpp @@ -382,6 +382,7 @@ boost::shared_ptr > ISAM2::recalculate(const FastSet& mark gttoc(insert); result.variablesReeliminated = affectedKeysSet->size(); + result.factorsRecalculated = nonlinearFactors_.size(); lastAffectedMarkedCount = markedKeys.size(); lastAffectedVariableCount = affectedKeysSet->size(); @@ -419,6 +420,7 @@ boost::shared_ptr > ISAM2::recalculate(const FastSet& mark } result.variablesReeliminated = affectedAndNewKeys.size(); + result.factorsRecalculated = factors.size(); lastAffectedMarkedCount = markedKeys.size(); lastAffectedVariableCount = affectedKeys.size(); lastAffectedFactorCount = factors.size(); diff --git a/gtsam/nonlinear/ISAM2.h b/gtsam/nonlinear/ISAM2.h index efb755360..71a07e228 100644 --- a/gtsam/nonlinear/ISAM2.h +++ b/gtsam/nonlinear/ISAM2.h @@ -285,6 +285,9 @@ struct GTSAM_EXPORT ISAM2Result { */ size_t variablesReeliminated; + /** The number of factors that were included in reelimination of the Bayes' tree. */ + size_t factorsRecalculated; + /** The number of cliques in the Bayes' Tree */ size_t cliques;