public interface

Node

es.usc.citius.hipster.model.Node<A, S, N extends es.usc.citius.hipster.model.Node<A, S, N>>
Known Indirect Subclasses

Class Overview

A node encapsulates the information generated by the search algorithms during their execution. As different type of algorithms exist (uninformed, informed, heuristic, anytime, etc.), different type of nodes are required. This interface provide the skeleton for the node definition and the basic methods required by all type of nodes.

Summary

Public Methods
abstract A action()
Action of the node used to reach the state node
abstract List<N> path()
Generates the ordered list of nodes with the path between the beginning state and the current node.
abstract int pathSize()
Returns the length of the path from the start to the current node.
abstract N previousNode()
Returns the previous node to the current.
abstract S state()
State of the current node

Public Methods

public abstract A action ()

Action of the node used to reach the state node

public abstract List<N> path ()

Generates the ordered list of nodes with the path between the beginning state and the current node.

Returns
  • ordered List the nodes of the path

public abstract int pathSize ()

Returns the length of the path from the start to the current node. Note that pathSize() == path().size() but this method provides a fast way to obtain the length of the path without tracking back the nodes of the path.

Returns
  • length of the path from the initial node to this node.

public abstract N previousNode ()

Returns the previous node to the current.

Returns

public abstract S state ()

State of the current node