Package search
Interface SearchTreePathNode<This extends SearchTreePathNode<This,S>,S>
- Type Parameters:
This
- The implementation type of these nodes. So a class implementing this interface would start something likepublic MyNode implements SearchTreePathNode<MyNode, MyState> { ... }
S
- The type of the search state underlying these nodes.
- All Superinterfaces:
SearchTreeNode<This,S>
- All Known Implementing Classes:
Nodes.SimpleTreePathCostNode
,Nodes.SimpleTreePathNode
public interface SearchTreePathNode<This extends SearchTreePathNode<This,S>,S> extends SearchTreeNode<This,S>
Type of search tree nodes which form a path of nodes, each expanded
from its parent which is next in the path. The essential method of
this interface is
getParent
, pointing to the
node from which this node was expanded. The other additional
methods have default implementations in terms of getParent
.-
Method Summary
Modifier and Type Method Description This
getParent()
Returns the node from which this node was expanded.default String
pathToString()
default ArrayList<S>
statePath()
Returns the sequence of nodes, starting with the initial state's node at index 0, leading to this node.default ArrayList<S>
statePath(ArrayList<S> states)
Write the sequence of nodes starting with the initial state's node and leading to this node into the givenArrayList
.
-
Method Details
-
getParent
This getParent()Returns the node from which this node was expanded.- Returns:
null
if this is the initial node.
-
statePath
Returns the sequence of nodes, starting with the initial state's node at index 0, leading to this node. -
statePath
Write the sequence of nodes starting with the initial state's node and leading to this node into the givenArrayList
. -
pathToString
-