eliminateOne returns empty graph if the "new" factor is empty.
parent
79b4b74930
commit
5bb1564a74
|
|
@ -104,8 +104,9 @@ typename Graph::FactorizationResult eliminate(const Graph& factorGraph, const st
|
||||||
remainingGraph.push_back(factorGraph[i]);
|
remainingGraph.push_back(factorGraph[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add remaining factor
|
// Add the remaining factor if it is not empty.
|
||||||
remainingGraph.push_back(remainingFactor);
|
if(remainingFactor->size() != 0)
|
||||||
|
remainingGraph.push_back(remainingFactor);
|
||||||
|
|
||||||
return typename Graph::FactorizationResult(conditional, remainingGraph);
|
return typename Graph::FactorizationResult(conditional, remainingGraph);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue