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

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

View File

@ -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);
}

View File

@ -18,9 +18,9 @@
#pragma once
#include <gtsam/base/types.h>
#include <gtsam/inference/BayesNetUnordered.h>
#include <gtsam/symbolic/SymbolicConditionalUnordered.h>
#include <gtsam/inference/BayesNetUnordered.h>
#include <gtsam/base/types.h>
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