added clone to play well with gnc

release/4.3a0
lcarlone 2021-12-19 10:41:07 -05:00
parent 5e3db76500
commit 39286f6672
1 changed files with 6 additions and 0 deletions

View File

@ -61,6 +61,12 @@ class PoseToPointFactor : public NoiseModelFactor2<POSE, POINT> {
traits<POINT>::Equals(this->measured_, e->measured_, tol); traits<POINT>::Equals(this->measured_, e->measured_, tol);
} }
/// @return a deep copy of this factor
gtsam::NonlinearFactor::shared_ptr clone() const override {
return boost::static_pointer_cast<gtsam::NonlinearFactor>(
gtsam::NonlinearFactor::shared_ptr(new This(*this)));
}
/** implement functions needed to derive from Factor */ /** implement functions needed to derive from Factor */
/** vector of errors /** vector of errors