Exclude null factors from remaining factors when building elimination tree

release/4.3a0
Richard Roberts 2013-08-06 18:21:54 +00:00
parent 22aaf47e3d
commit b823354e44
1 changed files with 2 additions and 2 deletions

View File

@ -149,9 +149,9 @@ namespace gtsam {
if(parents[j] == none) if(parents[j] == none)
roots_.push_back(nodes[j]); roots_.push_back(nodes[j]);
// Gather remaining factors // Gather remaining factors (exclude null factors)
for(size_t i = 0; i < m; ++i) for(size_t i = 0; i < m; ++i)
if(!factorUsed[i]) if(!factorUsed[i] && graph[i])
remainingFactors_.push_back(graph[i]); remainingFactors_.push_back(graph[i]);
} }