From fd2820ec90ad307b4096704b3e08959042d26fd8 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Wed, 1 Jan 2025 22:28:05 -0500 Subject: [PATCH] fix testHybridNonlinearFactorGraph --- gtsam/hybrid/tests/testHybridNonlinearFactorGraph.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gtsam/hybrid/tests/testHybridNonlinearFactorGraph.cpp b/gtsam/hybrid/tests/testHybridNonlinearFactorGraph.cpp index 6e844dbcb..fd2a99c34 100644 --- a/gtsam/hybrid/tests/testHybridNonlinearFactorGraph.cpp +++ b/gtsam/hybrid/tests/testHybridNonlinearFactorGraph.cpp @@ -512,9 +512,10 @@ TEST(HybridNonlinearFactorGraph, Full_Elimination) { // P(m1) EXPECT(hybridBayesNet->at(4)->frontals() == KeyVector{M(1)}); EXPECT_LONGS_EQUAL(0, hybridBayesNet->at(4)->nrParents()); + DiscreteTableConditional dtc = *hybridBayesNet->at(4)->asDiscrete(); EXPECT( - dynamic_pointer_cast(hybridBayesNet->at(4)->inner()) - ->equals(*discreteBayesNet.at(1))); + DiscreteConditional(dtc.nrFrontals(), dtc.toDecisionTreeFactor()) + .equals(*discreteBayesNet.at(1))); } /****************************************************************************