/**
* Faz o processo de triangula��o da rede.
*/
private void triangula() {
Node aux;
ArrayList<Node> auxNos;
auxNos = SetToolkit.clone(nodeList);
removeUtilityNodes(auxNos);
copiaNos = SetToolkit.clone(auxNos);
int sizeDecisao = decisionNodes.size();
for (int i = 0; i < sizeDecisao; i++) {
aux = decisionNodes.get(i);
auxNos.remove(aux);
auxNos.removeAll(aux.getParents());
}
oe = new ArrayList<Node>(copiaNos.size());
while (minimumWeightElimination(auxNos))
;
// int index;
for (int i = decisionNodes.size() - 1; i >= 0; i--) {
aux = decisionNodes.get(i);
oe.add(aux);
int sizeAdjacentes = aux.getAdjacents().size();
for (int j = 0; j < sizeAdjacentes; j++) {
Node v = aux.getAdjacents().get(j);
v.getAdjacents().remove(aux);
}
auxNos = SetToolkit.clone(aux.getParents());
auxNos.removeAll(decisionNodes);
auxNos.removeAll(oe);
for (int j = 0; j < i; j++) {
Node decision = decisionNodes.get(j);
auxNos.removeAll(decision.getParents());
}
while (minimumWeightElimination(auxNos))
;
}