From 8d03e71ff8e21916a03f58456d1c1e65aad8cce4 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Wed, 9 Oct 2024 00:18:36 -0400 Subject: [PATCH] test if serialization is the issue --- .../hybrid/tests/testSerializationHybrid.cpp | 74 +++++++++---------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/gtsam/hybrid/tests/testSerializationHybrid.cpp b/gtsam/hybrid/tests/testSerializationHybrid.cpp index 8258d8615e..d7893a87f9 100644 --- a/gtsam/hybrid/tests/testSerializationHybrid.cpp +++ b/gtsam/hybrid/tests/testSerializationHybrid.cpp @@ -105,43 +105,43 @@ TEST(HybridSerialization, HybridConditional) { EXPECT(equalsBinary(hc)); } -/* ****************************************************************************/ -// Test HybridGaussianConditional serialization. -TEST(HybridSerialization, HybridGaussianConditional) { - const DiscreteKey mode(M(0), 2); - Matrix1 I = Matrix1::Identity(); - const auto conditional0 = std::make_shared( - GaussianConditional::FromMeanAndStddev(Z(0), I, X(0), Vector1(0), 0.5)); - const auto conditional1 = std::make_shared( - GaussianConditional::FromMeanAndStddev(Z(0), I, X(0), Vector1(0), 3)); - const HybridGaussianConditional gm(mode, {conditional0, conditional1}); - - EXPECT(equalsObj(gm)); - EXPECT(equalsXML(gm)); - EXPECT(equalsBinary(gm)); -} - -/* ****************************************************************************/ -// Test HybridBayesNet serialization. -TEST(HybridSerialization, HybridBayesNet) { - Switching s(2); - HybridBayesNet hbn = *(s.linearizedFactorGraph.eliminateSequential()); - - EXPECT(equalsObj(hbn)); - EXPECT(equalsXML(hbn)); - EXPECT(equalsBinary(hbn)); -} - -/* ****************************************************************************/ -// Test HybridBayesTree serialization. -TEST(HybridSerialization, HybridBayesTree) { - Switching s(2); - HybridBayesTree hbt = *(s.linearizedFactorGraph.eliminateMultifrontal()); - - EXPECT(equalsObj(hbt)); - EXPECT(equalsXML(hbt)); - EXPECT(equalsBinary(hbt)); -} +// /* ****************************************************************************/ +// // Test HybridGaussianConditional serialization. +// TEST(HybridSerialization, HybridGaussianConditional) { +// const DiscreteKey mode(M(0), 2); +// Matrix1 I = Matrix1::Identity(); +// const auto conditional0 = std::make_shared( +// GaussianConditional::FromMeanAndStddev(Z(0), I, X(0), Vector1(0), 0.5)); +// const auto conditional1 = std::make_shared( +// GaussianConditional::FromMeanAndStddev(Z(0), I, X(0), Vector1(0), 3)); +// const HybridGaussianConditional gm(mode, {conditional0, conditional1}); + +// EXPECT(equalsObj(gm)); +// EXPECT(equalsXML(gm)); +// EXPECT(equalsBinary(gm)); +// } + +// /* ****************************************************************************/ +// // Test HybridBayesNet serialization. +// TEST(HybridSerialization, HybridBayesNet) { +// Switching s(2); +// HybridBayesNet hbn = *(s.linearizedFactorGraph.eliminateSequential()); + +// EXPECT(equalsObj(hbn)); +// EXPECT(equalsXML(hbn)); +// EXPECT(equalsBinary(hbn)); +// } + +// /* ****************************************************************************/ +// // Test HybridBayesTree serialization. +// TEST(HybridSerialization, HybridBayesTree) { +// Switching s(2); +// HybridBayesTree hbt = *(s.linearizedFactorGraph.eliminateMultifrontal()); + +// EXPECT(equalsObj(hbt)); +// EXPECT(equalsXML(hbt)); +// EXPECT(equalsBinary(hbt)); +// } /* ************************************************************************* */ int main() {