( (*gr)->nodes ==
NULL)
72 if( (*gr)->edges ==
NULL)
81(*gr)->nedgesnonzero = m/2;
94assert((*gr)->nuses == 0);
117assert(*gr !=
NULL);
121 if( (*gr)->nuses == 0 )
137printf (
"Unable to allocate memory\n");
141 number= (
long*) malloc ((n+1L) *
sizeof(long));
145 if(
number== (
long*) 0 )
147printf (
"Unable to allocate memory\n");
182 for( nptr = &(gr->
nodes[n-1L]); nptr >= gr->
nodes; nptr-- )
196 for( i = 0L; i <= n; i++ )
205level = rear->
dist+ 1L;
207 while( eptr !=
NULL)
209nptr = eptr->
adjac;
212assert(eptr->
cap>
EPS);
216nptr->
dist= (int) level;
243 for( nptr = &(gr->
nodes[n-1L]); nptr >= gr->
nodes; nptr-- )
247nptr->
dist= (int) n;
286 for( nptr = &(gr->
nodes[n-1L]); nptr >= gr->
nodes; nptr-- )
294fprintf(stderr,
"isolated node in input graph\n");
306 for( eptr = &(gr->
edges[m-1L]); eptr >= gr->
edges; eptr-- )
309 for( eptr = &(gr->
edges[m0+m-1L]); eptr >= &(gr->
edges[m0]); eptr-- )
312 for( i = n; i >= 0L; i-- )
325level = q_rear->
dist+ 1L;
328 while( eptr !=
NULL)
333nptr = eptr->
adjac;
335nptr->
dist= (int) level;
343 if( q_rear == q_front )
353 for( nptr = &(gr->
nodes[n-1]); nptr >= gr->
nodes; --nptr )
360s_ptr->
dist= (int) n;
368 while( eptr !=
NULL)
372nptr = eptr->
adjac;
379 if( nptr != t_ptr && nptr->
excess<= cap +
EPS)
400 while( aptr !=
NULL)
404assert(eptr !=
NULL);
406assert(eptr->
cap>
EPS);
409assert(eptr !=
NULL);
411assert(eptr->
cap>
EPS);
413nptr = eptr->
adjac;
414assert(nptr !=
NULL);
418 if( incre <= eptr->rcap )
421eptr->
rcap-= incre;
433assert(eptr->
cap>
EPS);
441incre = eptr->
rcap;
456assert(eptr->
cap>
EPS);
479 for( nptr = &(gr->
nodes[n-1L]); nptr >= gr->
nodes; nptr-- )
486nptr->
dist= (int) n;
493aptr->
dist= (int) n;
504 while( eptr !=
NULL)
509assert(eptr->
cap>
EPS);
517 if( ++dmin <
bound)
521aptr->
dist= (int) dmin;
525assert(eptr !=
NULL);
526assert(eptr->
cap>
EPS);
534aptr->
dist= (int) n;
546 if( n_discharge == n )
557 return(
int) (t_ptr->
excess- 1.0L);
568 while( i != j && j != 0 )
594 for(
inti = 1; i < gr->
nnodes; i++ )
599 for(
intj = 1 ; j < gr->
nnodes; j++ )
615 for(
inti = 1; i < gr->
nnodes; i++ )
653nptrn = &(gr->
nodes[n-1L]);
654 for( nptr = nptrn; nptr >= nptr1; nptr-- )
657for ( sptr = &(gr->
nodes[1L]); sptr <= nptrn; sptr++ )
660maxfl =
maxflow(gr, sptr, tptr);
672 for( nptr = &(gr->
nodes[1L]); nptr <= nptrn; nptr++ )
674 if( nptr != sptr && ! nptr->
alive&& nptr->
parent== tptr )
static void constructSingleCut(GRAPH *gr, SCIP_Bool **cuts)
static void global_relabel(GRAPH *gr, GRAPHNODE *tptr)
void capture_graph(GRAPH *gr)
static SCIP_Bool nodeOnRootPath(GRAPH *gr, int i, int j)
SCIP_Bool create_graph(int n, int m, GRAPH **gr)
static GRAPHNODE ** active
static double maxflow(GRAPH *gr, GRAPHNODE *s_ptr, GRAPHNODE *t_ptr)
static void fini_maxflow(void)
static void constructCutList(GRAPH *gr, SCIP_Bool **cuts, int *ncuts, double minviol)
static SCIP_Bool co_check
SCIP_Bool ghc_tree(GRAPH *gr, SCIP_Bool **cuts, int *ncuts, double minviol)
void release_graph(GRAPH **gr)
static SCIP_Bool init_maxflow(long n)
static void free_graph(GRAPH **gr)
generator for global cuts in undirected graphs
#define BMSfreeMemory(ptr)
#define BMSallocMemoryArray(ptr, num)
#define BMSfreeMemoryArray(ptr)
#define BMSallocMemory(ptr)
C++ wrapper classes for SCIP.
struct GraphEdge * first_edge
struct GraphNode * bfs_link
struct GraphEdge * scan_ptr
struct GraphNode * parent
struct GraphNode * stack_link
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4