Skip to content

Commit

Permalink
Merge pull request #66 from HazyResearch/catch_dups
Browse files Browse the repository at this point in the history
Find spurious var values at loading time
  • Loading branch information
alldefector authored Jan 16, 2017
2 parents 4f1efeb + 21c3624 commit 43cfb03
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/factor_graph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ void FactorGraph::construct_index_part(size_t v_start, size_t v_end,
v.total_truthiness += item.second.truthiness;
}
for (size_t j = 0; j < v.cardinality; ++j) {
// catch spurious values (e.g., due to duplicate tuples from DD)
assert(value_list[j] != Variable::INVALID_VALUE);
values[value_index_base] =
VariableToFactor(value_list[j], truthiness_list[j], 0, 0);
++value_index_base;
Expand Down

0 comments on commit 43cfb03

Please sign in to comment.