diff --git a/gtsam/inference/BayesTreeUnordered.h b/gtsam/inference/BayesTreeUnordered.h index 83474f501..b0d49f09f 100644 --- a/gtsam/inference/BayesTreeUnordered.h +++ b/gtsam/inference/BayesTreeUnordered.h @@ -93,8 +93,6 @@ namespace gtsam { /** Root cliques */ std::vector roots_; - public: - /// @name Standard Constructors /// @{ @@ -104,32 +102,26 @@ namespace gtsam { /** Copy constructor */ BayesTreeUnordered(const This& other); - protected: - /** Assignment operator */ - This& operator=(const This& other); - - public: - /// @} - /// @name Advanced Constructors - /// @{ - /** Destructor */ virtual ~BayesTreeUnordered() {} /// @} + + /** Assignment operator */ + This& operator=(const This& other); + /// @name Testable /// @{ - protected: /** check equality */ bool equals(const This& other, double tol = 1e-9) const; + public: /** print */ void print(const std::string& s = "", const KeyFormatter& keyFormatter = DefaultKeyFormatter) const; - - public: /// @} + /// @name Standard Interface /// @{ diff --git a/gtsam/symbolic/SymbolicBayesTreeUnordered.cpp b/gtsam/symbolic/SymbolicBayesTreeUnordered.cpp index 5f935a5f5..00bc659b2 100644 --- a/gtsam/symbolic/SymbolicBayesTreeUnordered.cpp +++ b/gtsam/symbolic/SymbolicBayesTreeUnordered.cpp @@ -19,13 +19,16 @@ #include #include +#include +#include #include #include namespace gtsam { - void SymbolicBayesTreeUnordered::noop() const { - + bool SymbolicBayesTreeUnordered::equals(const This& other, double tol /* = 1e-9 */) const + { + return Base::equals(other, tol); } // /* ************************************************************************* */ diff --git a/gtsam/symbolic/SymbolicBayesTreeUnordered.h b/gtsam/symbolic/SymbolicBayesTreeUnordered.h index 5938d6080..84bf43cc2 100644 --- a/gtsam/symbolic/SymbolicBayesTreeUnordered.h +++ b/gtsam/symbolic/SymbolicBayesTreeUnordered.h @@ -20,12 +20,16 @@ #include #include -#include -#include namespace gtsam { + // Forward declarations + class SymbolicFactorGraphUnordered; + class SymbolicBayesNetUnordered; + class SymbolicConditionalUnordered; + /* ************************************************************************* */ + /// A clique in a SymbolicBayesTree class GTSAM_EXPORT SymbolicBayesTreeCliqueUnordered : public BayesTreeCliqueBaseUnordered { @@ -35,10 +39,12 @@ namespace gtsam { typedef boost::shared_ptr shared_ptr; typedef boost::weak_ptr weak_ptr; SymbolicBayesTreeCliqueUnordered() {} - SymbolicBayesTreeCliqueUnordered(const SymbolicConditionalUnordered::shared_ptr& conditional) : Base(conditional) {} + SymbolicBayesTreeCliqueUnordered(const boost::shared_ptr& conditional) : Base(conditional) {} }; /* ************************************************************************* */ + /// A Bayes tree that represents the connectivity between variables but is not associated with any + /// probability functions. class GTSAM_EXPORT SymbolicBayesTreeUnordered : public BayesTreeUnordered { @@ -49,31 +55,8 @@ namespace gtsam { typedef SymbolicBayesTreeUnordered This; typedef boost::shared_ptr shared_ptr; - /** Insert a new conditional */ - //void insert(const sharedConditional& conditional); - /** check equality */ - bool equals(const This& other, double tol = 1e-9) const { return Base::equals(other, tol); } - - /** print */ - void print(const std::string& s = "", - const KeyFormatter& keyFormatter = DefaultKeyFormatter) const { Base::print(s, keyFormatter); } - - - protected: - - /** - * Add a conditional to the front of a clique, i.e. a conditional whose - * parents are already in the clique or its separators. This function does - * not check for this condition, it just updates the data structures. - */ - //void addToCliqueFront(const sharedConditional& conditional, const sharedClique& clique); - - private: - - // Dummy method to export class - void noop() const; - + bool equals(const This& other, double tol = 1e-9) const; }; }