diff --git a/cpp/LieConfig.h b/cpp/LieConfig.h index e6cdf6737..d13cd09c9 100644 --- a/cpp/LieConfig.h +++ b/cpp/LieConfig.h @@ -12,6 +12,8 @@ #include #include +#include + #include "Vector.h" #include "Testable.h" #include "VectorConfig.h" @@ -114,6 +116,14 @@ namespace gtsam { values_.clear(); } + private: + /** Serialization function */ + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned int version) { + ar & BOOST_SERIALIZATION_NVP(values_); + } + }; /** Dimensionality of the tangent space */ @@ -131,5 +141,6 @@ namespace gtsam { /** Get a delta config about a linearization point c0 */ template VectorConfig logmap(const LieConfig& c0, const LieConfig& cp); + } diff --git a/cpp/TupleConfig.h b/cpp/TupleConfig.h index ffe236575..478e59029 100644 --- a/cpp/TupleConfig.h +++ b/cpp/TupleConfig.h @@ -480,6 +480,14 @@ namespace gtsam { bool exists(const J1& j) const { return first_.exists(j); } bool exists(const J2& j) const { return second_.exists(j); } + private: + /** Serialization function */ + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned int version) { + ar & BOOST_SERIALIZATION_NVP(first_); + ar & BOOST_SERIALIZATION_NVP(second_); + } };