小于 1 分钟
Home > @hz-9/algorithm > depthFirstSearchShortestPath
depthFirstSearchShortestPath() function
Using Depth-first search algorithm to obtain shortest path information. FIXME: The results are not accurate, not recommended for use.
使用深度优先搜索算法获取最短路径信息。 !!!结果不够准确,不建议使用。
Signature:
depthFirstSearchShortestPath: <T>(graph: Graph<T>, startVertex: T | Vertice<T>) => IGraphShortestPathReturn<T>Parameters
Parameter | Type | Description |
|---|---|---|
graph | Graph<T> | The graph to traverse. |
startVertex | T | Vertice<T> | The starting vertex for the traversal. |
Returns: