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(),