added serialization
parent
f06d1a2e30
commit
0355c14007
|
@ -12,6 +12,8 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
#include <boost/serialization/map.hpp>
|
||||||
|
|
||||||
#include "Vector.h"
|
#include "Vector.h"
|
||||||
#include "Testable.h"
|
#include "Testable.h"
|
||||||
#include "VectorConfig.h"
|
#include "VectorConfig.h"
|
||||||
|
@ -114,6 +116,14 @@ namespace gtsam {
|
||||||
values_.clear();
|
values_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
/** Serialization function */
|
||||||
|
friend class boost::serialization::access;
|
||||||
|
template<class Archive>
|
||||||
|
void serialize(Archive & ar, const unsigned int version) {
|
||||||
|
ar & BOOST_SERIALIZATION_NVP(values_);
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Dimensionality of the tangent space */
|
/** Dimensionality of the tangent space */
|
||||||
|
@ -131,5 +141,6 @@ namespace gtsam {
|
||||||
/** Get a delta config about a linearization point c0 */
|
/** Get a delta config about a linearization point c0 */
|
||||||
template<class J, class T>
|
template<class J, class T>
|
||||||
VectorConfig logmap(const LieConfig<J,T>& c0, const LieConfig<J,T>& cp);
|
VectorConfig logmap(const LieConfig<J,T>& c0, const LieConfig<J,T>& cp);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -480,6 +480,14 @@ namespace gtsam {
|
||||||
bool exists(const J1& j) const { return first_.exists(j); }
|
bool exists(const J1& j) const { return first_.exists(j); }
|
||||||
bool exists(const J2& j) const { return second_.exists(j); }
|
bool exists(const J2& j) const { return second_.exists(j); }
|
||||||
|
|
||||||
|
private:
|
||||||
|
/** Serialization function */
|
||||||
|
friend class boost::serialization::access;
|
||||||
|
template<class Archive>
|
||||||
|
void serialize(Archive & ar, const unsigned int version) {
|
||||||
|
ar & BOOST_SERIALIZATION_NVP(first_);
|
||||||
|
ar & BOOST_SERIALIZATION_NVP(second_);
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue