From 4cfe84e523458344458650b94be7d5c3416817c9 Mon Sep 17 00:00:00 2001 From: Toni Date: Mon, 21 Jan 2019 18:03:38 -0500 Subject: [PATCH] Rename factorToRemove to factorsToRemove --- gtsam_unstable/nonlinear/BatchFixedLagSmoother.cpp | 4 ++-- gtsam_unstable/nonlinear/BatchFixedLagSmoother.h | 6 ++++-- gtsam_unstable/nonlinear/FixedLagSmoother.h | 6 ++++-- gtsam_unstable/nonlinear/IncrementalFixedLagSmoother.cpp | 4 ++-- gtsam_unstable/nonlinear/IncrementalFixedLagSmoother.h | 6 +++--- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/gtsam_unstable/nonlinear/BatchFixedLagSmoother.cpp b/gtsam_unstable/nonlinear/BatchFixedLagSmoother.cpp index 6bf7c970a..ac521d9c3 100644 --- a/gtsam_unstable/nonlinear/BatchFixedLagSmoother.cpp +++ b/gtsam_unstable/nonlinear/BatchFixedLagSmoother.cpp @@ -52,7 +52,7 @@ Matrix BatchFixedLagSmoother::marginalCovariance(Key key) const { /* ************************************************************************* */ FixedLagSmoother::Result BatchFixedLagSmoother::update( const NonlinearFactorGraph& newFactors, const Values& newTheta, - const KeyTimestampMap& timestamps, const FastVector& factorToRemove) { + const KeyTimestampMap& timestamps, const FastVector& factorsToRemove) { // Update all of the internal variables with the new information gttic(augment_system); @@ -70,7 +70,7 @@ FixedLagSmoother::Result BatchFixedLagSmoother::update( gttoc(augment_system); // remove factors in factorToRemove - for(const size_t i : factorToRemove){ + for(const size_t i : factorsToRemove){ if(factors_[i]) factors_[i].reset(); } diff --git a/gtsam_unstable/nonlinear/BatchFixedLagSmoother.h b/gtsam_unstable/nonlinear/BatchFixedLagSmoother.h index 1d882d7aa..2bb99b7e6 100644 --- a/gtsam_unstable/nonlinear/BatchFixedLagSmoother.h +++ b/gtsam_unstable/nonlinear/BatchFixedLagSmoother.h @@ -47,8 +47,10 @@ public: virtual bool equals(const FixedLagSmoother& rhs, double tol = 1e-9) const; /** Add new factors, updating the solution and relinearizing as needed. */ - Result update(const NonlinearFactorGraph& newFactors = NonlinearFactorGraph(), const Values& newTheta = Values(), - const KeyTimestampMap& timestamps = KeyTimestampMap(), const FastVector& factorToRemove = FastVector()); + Result update(const NonlinearFactorGraph& newFactors = NonlinearFactorGraph(), + const Values& newTheta = Values(), + const KeyTimestampMap& timestamps = KeyTimestampMap(), + const FastVector& factorsToRemove = FastVector()); /** Compute an estimate from the incomplete linear delta computed during the last update. * This delta is incomplete because it was not updated below wildfire_threshold. If only diff --git a/gtsam_unstable/nonlinear/FixedLagSmoother.h b/gtsam_unstable/nonlinear/FixedLagSmoother.h index 7b26c7021..1d8321eb3 100644 --- a/gtsam_unstable/nonlinear/FixedLagSmoother.h +++ b/gtsam_unstable/nonlinear/FixedLagSmoother.h @@ -90,8 +90,10 @@ public: } /** Add new factors, updating the solution and relinearizing as needed. */ - virtual Result update(const NonlinearFactorGraph& newFactors = NonlinearFactorGraph(), const Values& newTheta = Values(), - const KeyTimestampMap& timestamps = KeyTimestampMap(), const FastVector& factorToRemove = FastVector()) = 0; + virtual Result update(const NonlinearFactorGraph& newFactors = NonlinearFactorGraph(), + const Values& newTheta = Values(), + const KeyTimestampMap& timestamps = KeyTimestampMap(), + const FastVector& factorsToRemove = FastVector()) = 0; /** Compute an estimate from the incomplete linear delta computed during the last update. * This delta is incomplete because it was not updated below wildfire_threshold. If only diff --git a/gtsam_unstable/nonlinear/IncrementalFixedLagSmoother.cpp b/gtsam_unstable/nonlinear/IncrementalFixedLagSmoother.cpp index b4f09fc62..689a3697c 100644 --- a/gtsam_unstable/nonlinear/IncrementalFixedLagSmoother.cpp +++ b/gtsam_unstable/nonlinear/IncrementalFixedLagSmoother.cpp @@ -65,7 +65,7 @@ bool IncrementalFixedLagSmoother::equals(const FixedLagSmoother& rhs, /* ************************************************************************* */ FixedLagSmoother::Result IncrementalFixedLagSmoother::update( const NonlinearFactorGraph& newFactors, const Values& newTheta, - const KeyTimestampMap& timestamps, const FastVector& factorToRemove) { + const KeyTimestampMap& timestamps, const FastVector& factorsToRemove) { const bool debug = ISDEBUG("IncrementalFixedLagSmoother update"); @@ -126,7 +126,7 @@ FixedLagSmoother::Result IncrementalFixedLagSmoother::update( // Update iSAM2 isamResult_ = isam_.update(newFactors, newTheta, - factorToRemove, constrainedKeys, boost::none, additionalMarkedKeys); + factorsToRemove, constrainedKeys, boost::none, additionalMarkedKeys); if (debug) { PrintSymbolicTree(isam_, diff --git a/gtsam_unstable/nonlinear/IncrementalFixedLagSmoother.h b/gtsam_unstable/nonlinear/IncrementalFixedLagSmoother.h index 27782e705..c1c244a51 100644 --- a/gtsam_unstable/nonlinear/IncrementalFixedLagSmoother.h +++ b/gtsam_unstable/nonlinear/IncrementalFixedLagSmoother.h @@ -61,9 +61,9 @@ public: * @param timestamps an (optional) map from keys to real time stamps */ Result update(const NonlinearFactorGraph& newFactors = NonlinearFactorGraph(), - const Values& newTheta = Values(), // - const KeyTimestampMap& timestamps = KeyTimestampMap(), - const FastVector& factorToRemove = FactorIndices()); + const Values& newTheta = Values(), // + const KeyTimestampMap& timestamps = KeyTimestampMap(), + const FastVector& factorsToRemove = FactorIndices()); /** Compute an estimate from the incomplete linear delta computed during the last update. * This delta is incomplete because it was not updated below wildfire_threshold. If only