shortpat.h
来自「eC++编译器源码」· C头文件 代码 · 共 35 行
H
35 行
#pragma ShortPath
#include <Graph.h>
/* find the shortest paths from a vertex in a directed graph */
typedef void *PathIterator ; /* pull paths out of this */
void OpenPathIterator (Graph graph,
Vertex source,
PathIterator &iterator);
/* set up the path iterator to return shortest paths from
the source vertex in the graph */
/* note: the edges of graph must point to weights which
are unsigned int. */
boolean NextPath (PathIterator iterator,
unsigned int &nvert,
unsigned int &length,
Vertex &path[]);
/* this iterator will return an optimal path from the source
vertex. The vertices along the path, including both
source and destination, will be returned in the
path array. The number of vertices in the array will
be returned in nvert. The total length of the path
will be returned in length.
If paths to all reachable vertices have already been
returned, then NextPath will return false */
void ClosePathIterator (PathIterator &iterator);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?