Declaration
public static IEnumerable<TCell> GetPathTo<TCell>(
this Dictionary<TCell, CellWithDistance<TCell>> paths,
TCell destination
)
Summary
Given the output from
Structure<TCell>.FindPath(TCell, TCell), reconstructs a path from the
origin cell to the specified
destination cell.
Generic type parameters
Parameters
this Dictionary<TCell, CellWithDistance<TCell>> | paths |
The output from Structure<TCell>.FindPath(TCell, TCell). |
TCell | destination |
The destination cell to reconstruct the path to. |
Returns
A collection containing every cell along the path, including the origin cell and
destination.
Exceptions
- System.InvalidOperationException
The specified dictionary does not contain the required information to reconstruct the path.