Made FactorGraph equals protected since it should be overridden

release/4.3a0
Richard Roberts 2013-07-05 20:45:56 +00:00
parent 748406d73f
commit ed6a077e9e
3 changed files with 18 additions and 8 deletions

View File

@ -155,12 +155,14 @@ namespace gtsam {
/** print out graph */ /** print out graph */
void print(const std::string& s = "FactorGraph", void print(const std::string& s = "FactorGraph",
const KeyFormatter& formatter = DefaultKeyFormatter) const; const KeyFormatter& formatter = DefaultKeyFormatter) const;
protected:
/** Check equality */ /** Check equality */
bool equals(const This& fg, double tol = 1e-9) const; bool equals(const This& fg, double tol = 1e-9) const;
/// @} /// @}
public:
/// @name Standard Interface /// @name Standard Interface
/// @{ /// @{

View File

@ -22,7 +22,9 @@
namespace gtsam { namespace gtsam {
/* ************************************************************************* */ /* ************************************************************************* */
void SymbolicBayesNetUnordered::noop() const { bool SymbolicBayesNetUnordered::equals(const This& bn, double tol = 1e-9) const
{
return Base::equals(bn, tol);
} }

View File

@ -18,9 +18,9 @@
#pragma once #pragma once
#include <gtsam/base/types.h>
#include <gtsam/inference/BayesNetUnordered.h>
#include <gtsam/symbolic/SymbolicConditionalUnordered.h> #include <gtsam/symbolic/SymbolicConditionalUnordered.h>
#include <gtsam/inference/BayesNetUnordered.h>
#include <gtsam/base/types.h>
namespace gtsam { namespace gtsam {
@ -47,13 +47,19 @@ namespace gtsam {
SymbolicBayesNetUnordered(ITERATOR firstConditional, ITERATOR lastConditional) : Base(firstConditional, lastConditional) {} 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 /// @name Standard Interface
/// @{ /// @{
/// @} /// @}
private:
void noop() const; // Function defined in cpp file so that compiler instantiates the base class
}; };
} // namespace gtsam } // namespace gtsam