-
Notifications
You must be signed in to change notification settings - Fork 0
/
net_flow.h
47 lines (33 loc) · 1004 Bytes
/
net_flow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
typedef struct _NetFlow NetFlow;
typedef struct _NetFlowPriv NetFlowPriv;
struct _NetFlow {
int n_nodes;
int n_nodes_max;
int *n_succs;
int *n_succs_max;
int **succs;
int *capacity;
GHashTable *node_id; /* maps node objects to node numbers */
char **names; /* maps node numbers to names */
NetFlowPriv *priv;
};
NetFlow *
virgule_net_flow_new (void);
void
virgule_net_flow_free (NetFlow *self);
gint
virgule_net_flow_find_node (NetFlow *self, const char *name);
char *
virgule_net_flow_node_name (NetFlow *self, int node);
void
virgule_net_flow_add_edge (NetFlow *self, const char *src, const char *dst);
int *
virgule_net_flow_assign_tree (NetFlow *self, gint seed, const int *caps, int n_caps);
int
virgule_net_flow_sanity_check_tree (NetFlow *self, int seed, int *pred);
void
virgule_net_flow_max_flow (NetFlow *self, gint seed, const int *caps, int n_caps);
int
virgule_net_flow_sanity_check (NetFlow *self, gint seed);
int *
virgule_net_flow_extract (NetFlow *self);