lejos.robotics.pathfinding
Interface SearchAlgorithm
- All Known Implementing Classes:
- AstarSearchAlgorithm
public interface SearchAlgorithm
An interface for defining generic node search algorithms.
NOTE: Implementations of this interface should override Object.toString() with the name of the algorithm.
e.g. "A*", "Dijkstra", "Best-First", "D* Lite"
- Author:
- BB
- See Also:
Object.toString()
Method Summary |
Path |
findPath(Node startNode,
Node goalNode)
Method accepts a start node and a goal node, and returns a path consisting of a collection of waypoints which
includes the startNode coordinates as the first waypoint, and the goal node coordinates as the final waypoint. |
findPath
Path findPath(Node startNode,
Node goalNode)
- Method accepts a start node and a goal node, and returns a path consisting of a collection of waypoints which
includes the startNode coordinates as the first waypoint, and the goal node coordinates as the final waypoint.
Note: The startNode must be connected with other nodes (neighbors) that eventually connect to the goalNode.
- Parameters:
startNode
- goalNode
-
- Returns:
- A collection of waypoints. Returns null if it fails to find a path.