diff --git a/cpp/Conditional.h b/cpp/Conditional.h index 601c30d2c..914809603 100644 --- a/cpp/Conditional.h +++ b/cpp/Conditional.h @@ -29,6 +29,11 @@ protected: public: + /** empty constructor for serialization */ + Conditional() : + key_("__unitialized__") { + } + /** constructor */ Conditional(const std::string& key) : key_(key) { @@ -37,7 +42,6 @@ public: /* destructor */ virtual ~Conditional() { } - ; /** check equality */ bool equals(const Conditional& c, double tol = 1e-9) const { diff --git a/cpp/ConditionalGaussian.h b/cpp/ConditionalGaussian.h index 2e424b36a..fcfd6afe4 100644 --- a/cpp/ConditionalGaussian.h +++ b/cpp/ConditionalGaussian.h @@ -52,7 +52,7 @@ protected: public: /** default constructor needed for serialization */ - ConditionalGaussian(): Conditional("__unitialized__") {} + ConditionalGaussian(){} /** constructor */ ConditionalGaussian(const std::string& key) : diff --git a/cpp/Makefile.am b/cpp/Makefile.am index 5cb963d00..b43295f22 100644 --- a/cpp/Makefile.am +++ b/cpp/Makefile.am @@ -150,7 +150,7 @@ testVSLAMFactor_LDADD = libgtsam.la # The header files will be installed in ~/include/gtsam -headers = gtsam.h Value.h Testable.h Factor.h Conditional.h LinearFactorSet.h +headers = gtsam.h Value.h Testable.h Factor.h Conditional.h SymbolicConditional.h LinearFactorSet.h headers += Point2Prior.h Simulated2DOdometry.h Simulated2DMeasurement.h smallExample.h headers += $(sources:.cpp=.h) # templates: diff --git a/cpp/SymbolicConditional.h b/cpp/SymbolicConditional.h index adf6087d3..331669682 100644 --- a/cpp/SymbolicConditional.h +++ b/cpp/SymbolicConditional.h @@ -32,6 +32,11 @@ namespace gtsam { /** convenience typename for a shared pointer to this class */ typedef boost::shared_ptr shared_ptr; + /** + * Empty Constructor to make serialization possible + */ + SymbolicConditional(){} + /** * No parents */