3 Star 0 Fork 1

Gitee 极速下载/isl

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://repo.or.cz/isl.git
克隆/下载
isl_tarjan.h 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
Sven Verdoolaege 提交于 2015-04-14 15:42 . add isl_tarjan_graph_component
#ifndef ISL_TARJAN_H
#define ISL_TARJAN_H
/* Structure for representing the nodes in the graph being traversed
* using Tarjan's algorithm.
* index represents the order in which nodes are visited.
* min_index is the index of the root of a (sub)component.
* on_stack indicates whether the node is currently on the stack.
*/
struct isl_tarjan_node {
int index;
int min_index;
int on_stack;
};
/* Structure for representing the graph being traversed
* using Tarjan's algorithm.
* len is the number of nodes
* node is an array of nodes
* stack contains the nodes on the path from the root to the current node
* sp is the stack pointer
* index is the index of the last node visited
* order contains the elements of the components separated by -1
* op represents the current position in order
*/
struct isl_tarjan_graph {
int len;
struct isl_tarjan_node *node;
int *stack;
int sp;
int index;
int *order;
int op;
};
struct isl_tarjan_graph *isl_tarjan_graph_init(isl_ctx *ctx, int len,
isl_bool (*follows)(int i, int j, void *user), void *user);
struct isl_tarjan_graph *isl_tarjan_graph_component(isl_ctx *ctx, int len,
int node, isl_bool (*follows)(int i, int j, void *user), void *user);
struct isl_tarjan_graph *isl_tarjan_graph_free(struct isl_tarjan_graph *g);
#endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/mirrors/isl.git
git@gitee.com:mirrors/isl.git
mirrors
isl
isl
master

搜索帮助