Package search
Class Frontiers.DebuggablePriorityQueue<S,N extends SearchTreeNode<N,S>>
java.lang.Object
search.Frontiers.DebuggingFrontier<N>
search.Frontiers.DebuggablePriorityQueue<S,N>
- All Implemented Interfaces:
FrontierStructure<N>
- Enclosing class:
- Frontiers
public static class Frontiers.DebuggablePriorityQueue<S,N extends SearchTreeNode<N,S>> extends Frontiers.DebuggingFrontier<N>
-
Constructor Summary
Constructors Constructor Description DebuggablePriorityQueue(Comparator<N> prioritizer) -
Method Summary
Modifier and Type Method Description voidadd(N node)Adds a (usually newly-generated) tree node to the frontier.intcountOpen()Returns the number of open nodes sitting unexpanded in the frontier.voiddebugDisplayFrontier()Print debugging information about the frontier.booleanisEmpty()Checks whether any tree nodes remain in the frontierNpop()Removes one tree node from the frontier, and returns it.
-
Constructor Details
-
Method Details
-
add
Description copied from interface:FrontierStructureAdds a (usually newly-generated) tree node to the frontier.- Parameters:
node- The new node
-
isEmpty
public boolean isEmpty()Description copied from interface:FrontierStructureChecks whether any tree nodes remain in the frontier- Returns:
- false when the frontier is empty, which generally indicates that the search has failed.
-
pop
Description copied from interface:FrontierStructureRemoves one tree node from the frontier, and returns it.- Returns:
- The dequeued tree node
-
countOpen
public int countOpen()Description copied from interface:FrontierStructureReturns the number of open nodes sitting unexpanded in the frontier.- Returns:
- The number of open nodes
-
debugDisplayFrontier
public void debugDisplayFrontier()Description copied from interface:FrontierStructurePrint debugging information about the frontier. By default, does nothing.- Specified by:
debugDisplayFrontierin interfaceFrontierStructure<S>- Overrides:
debugDisplayFrontierin classFrontiers.DebuggingFrontier<N extends SearchTreeNode<N,S>>
-