From b7bddde82b9a3f679048868fb30255b2f7f7f724 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Sat, 4 Jan 2025 05:29:15 -0500 Subject: [PATCH] fix TableDistribution constructor call --- gtsam/hybrid/HybridGaussianFactorGraph.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gtsam/hybrid/HybridGaussianFactorGraph.cpp b/gtsam/hybrid/HybridGaussianFactorGraph.cpp index 6aad1bba0..594aa5c40 100644 --- a/gtsam/hybrid/HybridGaussianFactorGraph.cpp +++ b/gtsam/hybrid/HybridGaussianFactorGraph.cpp @@ -264,8 +264,7 @@ TableFactor TableProduct(const DiscreteFactorGraph &factors) { TableFactor product; for (auto &&factor : factors) { if (factor) { - if (auto dtc = - std::dynamic_pointer_cast(factor)) { + if (auto dtc = std::dynamic_pointer_cast(factor)) { product = product * dtc->table(); } else if (auto f = std::dynamic_pointer_cast(factor)) { product = product * (*f); @@ -363,8 +362,7 @@ discreteElimination(const HybridGaussianFactorGraph &factors, #if GTSAM_HYBRID_TIMING gttic_(EliminateDiscreteFormDiscreteConditional); #endif - auto conditional = - std::make_shared(frontalKeys.size(), product); + auto conditional = std::make_shared(product); #if GTSAM_HYBRID_TIMING gttoc_(EliminateDiscreteFormDiscreteConditional); #endif