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 void
add(N node)
Adds a (usually newly-generated) tree node to the frontier.int
countOpen()
Returns the number of open nodes sitting unexpanded in the frontier.void
debugDisplayFrontier()
Print debugging information about the frontier.boolean
isEmpty()
Checks whether any tree nodes remain in the frontierN
pop()
Removes one tree node from the frontier, and returns it.
-
Constructor Details
-
Method Details
-
add
Description copied from interface:FrontierStructure
Adds a (usually newly-generated) tree node to the frontier.- Parameters:
node
- The new node
-
isEmpty
public boolean isEmpty()Description copied from interface:FrontierStructure
Checks 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:FrontierStructure
Removes one tree node from the frontier, and returns it.- Returns:
- The dequeued tree node
-
countOpen
public int countOpen()Description copied from interface:FrontierStructure
Returns the number of open nodes sitting unexpanded in the frontier.- Returns:
- The number of open nodes
-
debugDisplayFrontier
public void debugDisplayFrontier()Description copied from interface:FrontierStructure
Print debugging information about the frontier. By default, does nothing.- Specified by:
debugDisplayFrontier
in interfaceFrontierStructure<S>
- Overrides:
debugDisplayFrontier
in classFrontiers.DebuggingFrontier<N extends SearchTreeNode<N,S>>
-