public int compare ( SearchNode object1 , SearchNode object2 ) { float h1 = ( ( HeuristicSearchNode ) object1 ) . getH ( ) ; float h2 = ( ( HeuristicSearchNode ) object2 ) . getH ( ) ; return ( h1 > h2 ) ? 1 : ( ( h1 < h2 ) ? - 1 : 0 ) ; }
Compares two heuristic search nodes by their heuristic values .