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