Pathfinding

Pathfinding

The namespace for all UF/Pathfinding utility functions, typically for static methods.

Source:

Methods

(static) aStar(arg0_graph, arg1_start_key, arg2_end_key) → {Array.<string>}

Performs the A* algorithm between a starting point and destination within an object graph.

Source:
Parameters:
Name Type Description
arg0_graph Object
arg1_start_key string
arg2_end_key string
Returns:
Type:
Array.<string>

(static) getLowestFScoreNode(arg0_nodes, arg1_f_score) → {string}

Fetches the node with the lowest F-score.

Source:
Parameters:
Name Type Description
arg0_nodes Array.<string>
arg1_f_score number
Returns:
Type:
string

(static) getReverseNeighbours(arg0_graph, arg1_node) → {Object}

Fetches the reverse neighbours in a path graph.

Source:
Parameters:
Name Type Description
arg0_graph Object
arg1_node string
Returns:
Type:
Object

(static) reconstructPath(arg0_came_from, arg1_current) → {Array.<Object>}

Internal helper function for reconstructing a path.

Source:
Parameters:
Name Type Description
arg0_came_from Object

The starting node.

arg1_current Object

The ending node.

Returns:
Type:
Array.<Object>