From e52a358ad24adc7e9f35d1fc5e55e4fcb3c64a40 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Wed, 29 Jan 2025 18:41:12 -0500 Subject: [PATCH] kill scaling in DiscreteFactorGraph --- gtsam/discrete/DiscreteFactorGraph.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/gtsam/discrete/DiscreteFactorGraph.cpp b/gtsam/discrete/DiscreteFactorGraph.cpp index f2bae4b9b..6bf5f8bb1 100644 --- a/gtsam/discrete/DiscreteFactorGraph.cpp +++ b/gtsam/discrete/DiscreteFactorGraph.cpp @@ -224,16 +224,6 @@ namespace gtsam { DiscreteFactor::shared_ptr sum = product->sum(frontalKeys); gttoc(sum); - // Normalize/scale to prevent underflow. - // We divide both `product` and `sum` by `max(sum)` - // since it is faster to compute and when the conditional - // is formed by `product/sum`, the scaling term cancels out. - gttic(scale); - DiscreteFactor::shared_ptr denominator = sum->max(sum->size()); - product = product->operator/(denominator); - sum = sum->operator/(denominator); - gttoc(scale); - // Ordering keys for the conditional so that frontalKeys are really in front Ordering orderedKeys; orderedKeys.insert(orderedKeys.end(), frontalKeys.begin(),