diff --git a/gtsam/inference/FactorGraphUnordered.h b/gtsam/inference/FactorGraphUnordered.h index b81c1d9ce..b2467e82d 100644 --- a/gtsam/inference/FactorGraphUnordered.h +++ b/gtsam/inference/FactorGraphUnordered.h @@ -155,12 +155,14 @@ namespace gtsam { /** print out graph */ void print(const std::string& s = "FactorGraph", - const KeyFormatter& formatter = DefaultKeyFormatter) const; + const KeyFormatter& formatter = DefaultKeyFormatter) const; + protected: /** Check equality */ bool equals(const This& fg, double tol = 1e-9) const; - /// @} + + public: /// @name Standard Interface /// @{ diff --git a/gtsam/symbolic/SymbolicBayesNetUnordered.cpp b/gtsam/symbolic/SymbolicBayesNetUnordered.cpp index e340f4f71..c43d6425b 100644 --- a/gtsam/symbolic/SymbolicBayesNetUnordered.cpp +++ b/gtsam/symbolic/SymbolicBayesNetUnordered.cpp @@ -22,7 +22,9 @@ namespace gtsam { /* ************************************************************************* */ - void SymbolicBayesNetUnordered::noop() const { + bool SymbolicBayesNetUnordered::equals(const This& bn, double tol = 1e-9) const + { + return Base::equals(bn, tol); } diff --git a/gtsam/symbolic/SymbolicBayesNetUnordered.h b/gtsam/symbolic/SymbolicBayesNetUnordered.h index 7eb137e9c..9fbd4f7ad 100644 --- a/gtsam/symbolic/SymbolicBayesNetUnordered.h +++ b/gtsam/symbolic/SymbolicBayesNetUnordered.h @@ -18,9 +18,9 @@ #pragma once -#include -#include #include +#include +#include namespace gtsam { @@ -47,13 +47,19 @@ namespace gtsam { SymbolicBayesNetUnordered(ITERATOR firstConditional, ITERATOR lastConditional) : Base(firstConditional, lastConditional) {} /// @} + + /// @name Testable + /// @{ + + /** Check equality */ + bool equals(const This& bn, double tol = 1e-9) const; + + /// @} + /// @name Standard Interface /// @{ /// @} - - private: - void noop() const; // Function defined in cpp file so that compiler instantiates the base class }; } // namespace gtsam