update TableFactor to only consider values greater than 1e-11

release/4.3a0
Varun Agrawal 2025-05-14 06:43:43 -04:00
parent c254e4cd79
commit 48879afce0
1 changed files with 3 additions and 1 deletions

View File

@ -108,7 +108,9 @@ static Eigen::SparseVector<double> ComputeSparseTable(
*
*/
auto op = [&](const Assignment<Key>& assignment, double p) {
if (p > 0) {
// Check if greater than 1e-11 because we consider
// smaller than that as numerically 0
if (p > 1e-11) {
// Get all the keys involved in this assignment
KeySet assignmentKeys;
for (auto&& [k, _] : assignment) {