Fixed eliminating empty graph

release/4.3a0
Richard Roberts 2013-07-16 20:22:02 +00:00
parent 132cc2ea72
commit 3f73d7801c
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ namespace gtsam {
}
// Find roots
assert(parents.back() == none); // We expect the last-eliminated node to be a root no matter what
assert(parents.empty() || parents.back() == none); // We expect the last-eliminated node to be a root no matter what
for(size_t j = 0; j < n; ++j)
if(parents[j] == none)
roots_.push_back(nodes[j]);