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]);
|
||||
}
|
||||
|
||||
// Add remaining factor
|
||||
remainingGraph.push_back(remainingFactor);
|
||||
// Add the remaining factor if it is not empty.
|
||||
if(remainingFactor->size() != 0)
|
||||
remainingGraph.push_back(remainingFactor);
|
||||
|
||||
return typename Graph::FactorizationResult(conditional, remainingGraph);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue