00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef CUGRA_GRAPH_SCC_H
00019 #define CUGRA_GRAPH_SCC_H
00020
00021 #include <cugra/graph.h>
00022 #include <cu/clos.h>
00023
00024 CU_BEGIN_DECLARATIONS
00025
00026
00027
00028 typedef struct cugra_walk_SCC *cugra_walk_SCC_t;
00029 typedef struct cugra_walk_SCC_vt const *cugra_walk_SCC_vt_t;
00030
00031 struct cugra_walk_SCC_vt
00032 {
00033 void *(*enter_component)(cugra_walk_SCC_t self);
00034 void (*pass_vertex)(cugra_walk_SCC_t self, void *, cugra_vertex_t);
00035 void (*leave_component)(cugra_walk_SCC_t self, void *);
00036 void (*connect_components)(cugra_walk_SCC_t self, void *, void *);
00037 };
00038
00039 #define cugra_walk_SCC_def_vt(name) \
00040 struct cugra_walk_SCC_vt name##_vt = { \
00041 .enter_component = name##_enter_component; \
00042 .pass_vertext = name##_pass_vertex; \
00043 .leave_component = name##_leave_component; \
00044 .connect_components = name##_connect_components; \
00045 }
00046
00047 struct cugra_walk_SCC
00048 {
00049 cugra_walk_SCC_vt_t vt;
00050 };
00051
00052
00053
00054
00055 void cugra_walk_SCC(cugra_walk_SCC_t walk_struct,
00056 cugra_graph_t G, cugra_direction_t dir);
00057
00058 #if 0
00059 cugra_graph_t
00060 cugra_SCC_graph_of_lists(cugra_graph_t G, size_t vslot_size,
00061 cu_clop(vslot_copy, void, void *src, void *dst));
00062 #endif
00063
00064
00065 CU_END_DECLARATIONS
00066
00067 #endif