Skip to content

Commit

Permalink
add serialization to HybridGaussianProductFactor
Browse files Browse the repository at this point in the history
  • Loading branch information
varunagrawal committed Oct 9, 2024
1 parent caddc73 commit 205eb18
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions gtsam/hybrid/HybridGaussianProductFactor.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,16 @@ class GTSAM_EXPORT HybridGaussianProductFactor
HybridGaussianProductFactor removeEmpty() const;

///@}

private:
#ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
/** Serialization function */
friend class boost::serialization::access;
template <class Archive>
void serialize(Archive& ar, const unsigned int /*version*/) {
ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
}
#endif
};

// Testable traits
Expand Down
3 changes: 3 additions & 0 deletions gtsam/hybrid/tests/testSerializationHybrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ BOOST_CLASS_EXPORT_GUID(HybridGaussianFactor::FactorValuePairs::Leaf,
BOOST_CLASS_EXPORT_GUID(HybridGaussianFactor::FactorValuePairs::Choice,
"gtsam_HybridGaussianFactor_Factors_Choice");

BOOST_CLASS_EXPORT_GUID(GaussianFactorGraphValuePair,
"gtsam_GaussianFactorGraphValuePair");

BOOST_CLASS_EXPORT_GUID(HybridGaussianConditional,
"gtsam_HybridGaussianConditional");
BOOST_CLASS_EXPORT_GUID(HybridGaussianConditional::Conditionals,
Expand Down

0 comments on commit 205eb18

Please sign in to comment.