📄 shortpat.h
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -