diff --git a/gtsam.h b/gtsam.h index 0c393a433..dbd3d9fad 100644 --- a/gtsam.h +++ b/gtsam.h @@ -1450,11 +1450,6 @@ size_t symbol(char chr, size_t index); char symbolChr(size_t key); size_t symbolIndex(size_t key); -// Key utilities -gtsam::KeySet keyIntersection(const gtsam::KeySet& keysA, const gtsam::KeySet& keysB); -gtsam::KeySet keyDifference(const gtsam::KeySet& keysA, const gtsam::KeySet& keysB); -bool hasKeyIntersection(const gtsam::KeySet& keysA, const gtsam::KeySet& keysB); - // Default keyformatter void printKeySet(const gtsam::KeySet& keys); void printKeySet(const gtsam::KeySet& keys, string s); diff --git a/gtsam/nonlinear/Key.cpp b/gtsam/nonlinear/Key.cpp index fe9f8c480..c4b21e681 100644 --- a/gtsam/nonlinear/Key.cpp +++ b/gtsam/nonlinear/Key.cpp @@ -60,39 +60,6 @@ void printKeySet(const gtsam::KeySet& keys, const std::string& s, const KeyForma std::cout << std::endl; } } - -/* ************************************************************************* */ -gtsam::KeySet keyIntersection(const gtsam::KeySet& keysA, const gtsam::KeySet& keysB) { - gtsam::KeySet intersection; - if (keysA.empty() || keysB.empty()) - return intersection; - BOOST_FOREACH(const gtsam::Key& key, keysA) - if (keysB.count(key)) - intersection.insert(key); - return intersection; -} - -/* ************************************************************************* */ -bool hasKeyIntersection(const gtsam::KeySet& keysA, const gtsam::KeySet& keysB) { - if (keysA.empty() || keysB.empty()) - return false; - BOOST_FOREACH(const gtsam::Key& key, keysA) - if (keysB.count(key)) - return true; - return false; -} - -/* ************************************************************************* */ -gtsam::KeySet keyDifference(const gtsam::KeySet& keysA, const gtsam::KeySet& keysB) { - if (keysA.empty() || keysB.empty()) - return keysA; - - gtsam::KeySet difference; - BOOST_FOREACH(const gtsam::Key& key, keysA) - if (!keysB.count(key)) - difference.insert(key); - return difference; -} /* ************************************************************************* */ } // \namespace gtsam diff --git a/gtsam/nonlinear/Key.h b/gtsam/nonlinear/Key.h index bcc08d9cd..edeea396f 100644 --- a/gtsam/nonlinear/Key.h +++ b/gtsam/nonlinear/Key.h @@ -60,14 +60,5 @@ namespace gtsam { /// Utility function to print sets of keys with optional prefix GTSAM_EXPORT void printKeySet(const KeySet& keys, const std::string& s = "", const KeyFormatter& keyFormatter = DefaultKeyFormatter); - - /// Computes the intersection between two sets - GTSAM_EXPORT gtsam::KeySet keyIntersection(const gtsam::KeySet& keysA, const gtsam::KeySet& keysB); - - /// Checks if an intersection exists - faster checking size of above - GTSAM_EXPORT bool hasKeyIntersection(const gtsam::KeySet& keysA, const gtsam::KeySet& keysB); - - /// Computes a difference between sets, so result is those that are in A, but not B - GTSAM_EXPORT gtsam::KeySet keyDifference(const gtsam::KeySet& keysA, const gtsam::KeySet& keysB); }