kill scaling in DiscreteFactorGraph

release/4.3a0
Varun Agrawal 2025-01-29 18:41:12 -05:00
parent e2adb91d91
commit e52a358ad2
1 changed files with 0 additions and 10 deletions

View File

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