AStar Heuristic Concept
This concept defines the interface for the heuristic function of an
A* search, which is responsible for estimating the remaining cost
from some vertex to a goal. The user can create a class that matches
this interface, and then pass objects of the class into
astar_search() to guide the order of
vertex examination of the search. The heuristic instance must
incorporate any necessary information about goal vertices in the graph.
For further discussion of the use of heuristics in an A* search, see
the documentation of astar_search().
Refinement of
Unary Function (must take a single argument — a graph vertex — and return a cost value) and Copy Constructible (copying a heuristic should be a lightweight operation).
Notation
H |
A type that is a model of AStar Heuristic. |
|---|---|
|
An object of type |
|
A type that is a model of Graph. |
|
An object of type |
|
An object of type
|
|
A type that can be used with the |
|
An object of type |
Valid Expressions
| Name | Expression | Return Type | Description |
|---|---|---|---|
Call Heuristic |
|
|
Called for the target of every out edge of a vertex being examined. |