Skip to content

Commit 48879af

Browse files
committed
update TableFactor to only consider values greater than 1e-11
1 parent c254e4c commit 48879af

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gtsam/discrete/TableFactor.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ static Eigen::SparseVector<double> ComputeSparseTable(
108108
*
109109
*/
110110
auto op = [&](const Assignment<Key>& assignment, double p) {
111-
if (p > 0) {
111+
// Check if greater than 1e-11 because we consider
112+
// smaller than that as numerically 0
113+
if (p > 1e-11) {
112114
// Get all the keys involved in this assignment
113115
KeySet assignmentKeys;
114116
for (auto&& [k, _] : assignment) {

0 commit comments

Comments
 (0)