Main Page   Class Hierarchy   Compound List   File List   Contact   Download   Symbolic Constraints   Examples  

graph.h

00001 typedef enum 
00002   { FALSE = 0,
00003     TRUE  = 1
00004   } BOOL;
00005 
00006 typedef struct Node
00007   { long         id;
00008     struct Edge  *first_edge;
00009                  /* in list of incident edges */
00010     struct Edge  *scan_ptr;
00011                  /* next edge to be scanned when node 
00012                     will be visited again */
00013     struct Node  *parent;   /* pointer of Gomory-Hu cut tree */
00014     double       mincap;    /* capacity of minimum cut between
00015                                node and parent in GH cut tree */
00016       /* subsequent entries for use by maxflow */
00017     long         dist;
00018     double       excess;
00019     struct Node  *bfs_link;     /* for one way BFS working queue */
00020     struct Node  *stack_link;   /* for stack of active nodes */
00021     BOOL         alive;    
00022     BOOL         unmarked;      /* while BFS in progress */
00023   } node;
00024 
00025 typedef struct Edge
00026   { node         *adjac; /* pointer to adjacent node */
00027     struct Edge  *next;  /* in incidence list of node 
00028                             from which edge is emanating */
00029     struct Edge  *back;  /* pointer to reverse edge */
00030     double       cap;
00031     double       rcap;   /* residual capacity */
00032   } edge;
00033 
00034 typedef struct Graph
00035   { long    n_nodes;
00036     node    *nodes;
00037     long    n_edges;     /* number of edges with non-zero capacity */
00038     long    n_edges0;    /* number of all edges */
00039     edge    *edges;
00040   } graph;
00041 
00042 #define  NILN (node *) 0
00043 #define  NILE (edge *) 0
00044 #define  EPS  1.0E-10
Generated on Mon Mar 28 22:03:48 2011 for SCIL by  doxygen 1.6.3