#ifndef _FLOW_H #define _FLOW_H #include #include "collections.h" #include "blocks.h" #include "graph.h" typedef struct edge* Edge; typedef struct edge_set* EdgeSet; extern Graph flow_graph; void flow_applyToBlocks(void (* func)(Block nodeData)); //void flow_applyToEdges(void (* func)(int from, int to)); void flow_print(char* out); void flow_printNode(int i, FILE* out); void edgeset_print(EdgeSet set, FILE* out); int flow_addBlock(Block data); void flow_addEdge(int from, int to); void flow_draw(FILE* stream); Block flow_block(int b); void flow_close(void); /** Returns a list of EdgeSets. */ ArrayList flow_edgeSets(void); #define flow_children(p) graph_children(flow_graph, p) #define flow_parents(c) graph_parents(flow_graph, c) #define flow_size() graph_size(flow_graph) BitSet edgeset_parents(EdgeSet edges); BitSet edgeset_children(EdgeSet edges); int edgeset_depth(EdgeSet edges); /* XStack edgeset_xstack(EdgeSet edges); void edgeset_setXstack(EdgeSet edges, XStack x); */ void addEdge(int from, int to); #endif