From 97a6c3d94a627eee11aedb46b09a8d2f8c032f36 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Tue, 5 Feb 2013 21:52:48 +0000 Subject: [PATCH] Removed obsolete commented-out debug code --- gtsam/inference/IndexConditional.cpp | 16 ---------------- gtsam/inference/IndexConditional.h | 6 ------ gtsam/nonlinear/ISAM2.h | 6 ------ 3 files changed, 28 deletions(-) diff --git a/gtsam/inference/IndexConditional.cpp b/gtsam/inference/IndexConditional.cpp index 4167e56f2..c911a2e53 100644 --- a/gtsam/inference/IndexConditional.cpp +++ b/gtsam/inference/IndexConditional.cpp @@ -33,14 +33,6 @@ namespace gtsam { void IndexConditional::assertInvariants() const { // Checks for uniqueness of keys Base::assertInvariants(); -#ifndef NDEBUG - // Check that frontal keys are sorted - //FastSet uniquesorted(beginFrontals(), endFrontals()); - //assert(uniquesorted.size() == nrFrontals() && std::equal(uniquesorted.begin(), uniquesorted.end(), beginFrontals())); - //// Check that separator keys are less than parent keys - ////BOOST_FOREACH(Index j, frontals()) { - //// assert(find_if(beginParents(), endParents(), _1 < j) == endParents()); } -#endif } /* ************************************************************************* */ @@ -62,14 +54,6 @@ namespace gtsam { /* ************************************************************************* */ void IndexConditional::permuteWithInverse(const Permutation& inversePermutation) { - // The permutation may not move the separators into the frontals -// #ifndef NDEBUG -// BOOST_FOREACH(const KeyType frontal, this->frontals()) { -// BOOST_FOREACH(const KeyType separator, this->parents()) { -// assert(inversePermutation[frontal] < inversePermutation[separator]); -// } -// } -// #endif BOOST_FOREACH(Index& key, keys()) key = inversePermutation[key]; assertInvariants(); diff --git a/gtsam/inference/IndexConditional.h b/gtsam/inference/IndexConditional.h index 9643b1a84..e3637e8a4 100644 --- a/gtsam/inference/IndexConditional.h +++ b/gtsam/inference/IndexConditional.h @@ -108,12 +108,6 @@ namespace gtsam { /// @name Advanced Interface /// @{ - /** Permute the variables when only separator variables need to be permuted. - * Returns true if any reordered variables appeared in the separator and - * false if not. - */ - //bool permuteSeparatorWithInverse(const Permutation& inversePermutation); - /** Permute the variables when only separator variables need to be permuted. * Returns true if any reordered variables appeared in the separator and * false if not. diff --git a/gtsam/nonlinear/ISAM2.h b/gtsam/nonlinear/ISAM2.h index 5243efd27..c91f5b1f7 100644 --- a/gtsam/nonlinear/ISAM2.h +++ b/gtsam/nonlinear/ISAM2.h @@ -405,12 +405,6 @@ public: Base::permuteWithInverse(inversePermutation); } - //bool permuteSeparatorWithInverse(const Permutation& inversePermutation) { - // bool changed = Base::permuteSeparatorWithInverse(inversePermutation); - // if(changed) if(cachedFactor_) cachedFactor_->permuteWithInverse(inversePermutation); - // return changed; - //} - bool reduceSeparatorWithInverse(const internal::Reduction& inverseReduction) { bool changed = Base::reduceSeparatorWithInverse(inverseReduction); if(changed) if(cachedFactor_) cachedFactor_->reduceWithInverse(inverseReduction);