check if the factor is not zero when choosing the elimination order
This commit is contained in:
parent
cd1e157019
commit
661ce08961
@ -10,6 +10,9 @@ ElimHeuristic ElimGraph::elimHeuristic_ = MIN_NEIGHBORS;
|
||||
ElimGraph::ElimGraph (const vector<Factor*>& factors)
|
||||
{
|
||||
for (unsigned i = 0; i < factors.size(); i++) {
|
||||
if (factors[i] == 0) { // if contained just one var with evidence
|
||||
continue;
|
||||
}
|
||||
const VarIds& vids = factors[i]->arguments();
|
||||
for (unsigned j = 0; j < vids.size() - 1; j++) {
|
||||
EgNode* n1 = getEgNode (vids[j]);
|
||||
|
Reference in New Issue
Block a user