Beispiel #1
0
 public void makeReducible() {
   PQNode pertinentRoot = findPertinentRoot(myRoot);
   pertinentRoot.computeHValue();
   pertinentRoot.computeAValue();
   if (pertinentRoot.getHValue() < pertinentRoot.getAValue()) {
     pertinentRoot.makeHDeletion();
   } else {
     pertinentRoot.makeADeletion();
   }
 }
Beispiel #2
0
 public void computeHValue() {
   for (PQNode child : ListSequence.fromList(getChildren())) {
     child.computeHValue();
   }
 }