|
|
Go to the documentation of this file. 60 heap[1] = heap[(*count)--]; 64 if ( LT(path[heap[3]].dist, path[heap[2]].dist)) 67 while((c <= (*count)) && GT(path[heap[j]].dist, path[heap[c]].dist)) 77 if ((c + 1) <= (*count)) 78 if ( LT(path[heap[c + 1]].dist, path[heap[c]].dist)) 96 const SCIP_Real* pathdist) 109 heap[1] = heap[(*count)--]; 113 if ( LT(pathdist[heap[3]], pathdist[heap[2]])) 116 while((c <= (*count)) && GT(pathdist[heap[j]], pathdist[heap[c]])) 126 if ((c + 1) <= (*count)) 127 if ( LT(pathdist[heap[c + 1]], pathdist[heap[c]])) 160 path[l]. dist = (mode == MST_MODE) ? cost : (path[k].dist + cost); 166 heap[++(*count)] = l; 173 while( (j > 1) && SCIPisGT(scip, path[heap[c]].dist, path[heap[j]].dist) ) 213 pathdist[l] = (pathdist[k] + cost); 220 heap[++(*count)] = l; 229 while( (j > 1) && SCIPisGT(scip, pathdist[heap[c]], pathdist[heap[j]]) ) 253 heap[++(*count)] = node; 254 state[node] = (*count); 260 while((j > 1) && GT(path[heap[c]].dist, path[heap[j]].dist)) 285 pathdist[node] = 0.0; 287 heap[++(*count)] = node; 288 state[node] = (*count); 294 while( (j > 1) && SCIPisGT(scip, pathdist[heap[c]], pathdist[heap[j]]) ) 334 dist += path[k]. dist; 338 dist += path[k2]. dist; 346 if( SCIPisLT(scip, dist, path[vbk].dist) ) 348 path[vbk]. dist = dist; 362 max = MIN((l + 1), 3); 364 for( r = 0; r <= max; r++ ) 375 t = vbase[k2 + (r * nnodes)]; 377 for( s = 0; s < l; s++ ) 378 if( vbase[vbk + s * nnodes] == t ) 380 if( s < l || vbk == t ) 385 dist += path[k].dist; 387 dist += path[k2 + (r * nnodes)]. dist; 389 if( SCIPisLT(scip, dist, path[pos].dist) ) 391 path[pos]. dist = dist; 416 SCIP_CALL( SCIPallocMemoryArray(scip, &(g-> path_heap), g-> knots + 1) ); 437 SCIPfreeMemoryArray(scip, &(g-> path_heap)); 469 assert(scip != NULL); 472 assert(start < p->knots); 476 assert(path != NULL); 477 assert(cost != NULL); 488 for(i = 0; i < p-> knots; i++) 515 k = nearest(heap, state, &count, path); 530 if( (state[m]) && (p-> mark[m]) ) 533 if( SCIPisGT(scip, path[m].dist, (mode == MST_MODE) ? cost[i] : (path[k].dist + cost[i])) ) 534 correct(scip, heap, state, &count, path, m, k, i, cost[i], mode); 565 assert(heap != NULL); 566 assert(path != NULL); 567 assert(cost != NULL); 568 assert(nlbl != NULL); 569 assert(memlbl != NULL); 571 limit1 = limit - limit / 3; 575 if( g-> grad[tail] == 0 || g-> grad[head] == 0 ) 578 assert(g-> mark[head] && g-> mark[tail]); 581 path[tail]. dist = 0.0; 583 memlbl[(*nlbl)++] = tail; 594 assert(SCIPisGT(scip, path[m].dist, path[tail].dist + cost[e])); 596 memlbl[(*nlbl)++] = m; 597 correct(scip, heap, state, &count, path, m, tail, e, cost[e], FSP_MODE); 599 if( nchecks++ > limit1 ) 604 while( count > 0 && nchecks <= limit ) 607 k = nearest(heap, state, &count, path); 613 if( SCIPisGT(scip, path[k].dist, distlimit) ) 624 if( state[m] && g-> mark[m] && SCIPisGT(scip, path[m].dist, path[k].dist + cost[e]) ) 628 memlbl[(*nlbl)++] = m; 631 if( nchecks++ > limit ) 657 assert(start < g->knots); 660 assert(pathdist != NULL); 661 assert(pathedge != NULL); 662 assert(cost != NULL); 670 for( i = 0; i < g-> knots; i++ ) 688 k = nearestX(heap, state, &count, pathdist); 699 if( state[m] && g-> mark[m] && SCIPisGT(scip, pathdist[m], (pathdist[k] + cost[i])) ) 700 correctX(scip, heap, state, &count, pathdist, pathedge, m, k, i, cost[i]); 714 unsigned int* randseed, 728 assert(randseed != NULL); 729 assert(pathdist != NULL); 730 assert(pathedge != NULL); 733 assert(start < g->knots); 734 assert(cost != NULL); 735 assert(connected != NULL); 743 for( k = 0; k < nnodes; k++ ) 748 connected[k] = FALSE; 760 int hnnodes = nnodes / 2; 761 z = SCIPgetRandomInt(0, nnodes - 1, randseed); 770 k = nearestX(heap, state, &count, pathdist); 776 assert(k == start || !connected[k]); 780 z = SCIPgetRandomInt(0, nnodes - 1, randseed); 784 assert(pathedge[k] != - 1); 786 while( !connected[node = g-> tail[pathedge[node]]] ) 788 assert(pathedge[node] != - 1); 789 connected[node] = TRUE; 790 resetX(scip, pathdist, heap, state, &count, node); 794 if( ++nterms == g-> terms ) 798 z = (k + z) % nnodes; 807 if( cgt || (state[m]) ) 809 if( !connected[m] && g-> mark[m] && SCIPisGT(scip, pathdist[m], (pathdist[k] + cost[e])) ) 810 correctX(scip, heap, state, &count, pathdist, pathedge, m, k, e, cost[e]); 814 if( !connected[m] && g-> mark[m] && SCIPisGE(scip, pathdist[m], (pathdist[k] + cost[e])) ) 815 correctX(scip, heap, state, &count, pathdist, pathedge, m, k, e, cost[e]); 823 void calculate_distances( 835 SCIPdebug(fputc( 'C', stdout)); 836 SCIPdebug(fflush(stdout)); 838 for(i = 0; i < g-> knots; i++) 843 path[i] = malloc(( size_t)g-> knots * sizeof( PATH)); 845 assert(path[i] != NULL); 888 assert(path != NULL); 889 assert(cost != NULL); 892 if( g-> knots == 0 || nneighbterms <= 0 ) 903 while( count > 0 && nneighbterms > 0 ) 906 k = nearest(heap, state, &count, path); 909 reachednodes[(*nreachednodes)++] = k; 910 SCIP_CALL( SCIPallocMemory(scip, &curr) ); 914 curr-> next = adjterms[k]; 918 if( termsmark[k] == TRUE ) 920 termsmark[k] = FALSE; 921 if( --nneighbterms == 0 ) 925 reachednodes[(*nreachednodes)++] = heap[count--]; 940 if( (state[m]) && (g-> mark[m]) && ( GT(path[m].dist, (path[k].dist + cost[i]))) ) 947 assert(nneighbterms == 0); 981 assert(path != NULL); 982 assert(cost != NULL); 984 if( g-> knots == 0 || nneighbterms <= 0 ) 992 while( count > 0 && nneighbterms > 0 ) 994 k = nearest(heap, state, &count, path); 996 reachednodes[(*nreachednodes)++] = k; 997 distarr[k][nodenterms[k]] = path[k]. dist; 998 edgearr[k][nodenterms[k]] = path[k]. edge; 999 basearr[k][nodenterms[k]] = base; 1003 if( termsmark[k] == TRUE ) 1005 termsmark[k] = FALSE; 1006 if( --nneighbterms == 0 ) 1009 reachednodes[(*nreachednodes)++] = heap[count--]; 1022 if( (state[m]) && (g-> mark[m]) && ( GT(path[m].dist, (path[k].dist + cost[i]))) ) 1027 assert(nneighbterms == 0); 1053 assert(scip != NULL); 1057 assert(path != NULL); 1058 assert(cost != NULL); 1059 assert(costrev != NULL); 1068 for( i = 0; i < g-> knots; i++ ) 1097 k = nearest(heap, state, &count, path); 1108 if( (state[m]) && SCIPisGT(scip, path[m].dist, path[k].dist + ((vbase[k] == root)? cost[i] : costrev[i])) ) 1111 correct(scip, heap, state, &count, path, m, k, i, ((vbase[k] == root)? cost[i] : costrev[i]), FSP_MODE); 1112 vbase[m] = vbase[k]; 1139 assert(scip != NULL); 1143 assert(path != NULL); 1144 assert(costrev != NULL); 1145 assert(stvertex != NULL); 1154 for( i = 0; i < nnodes; i++ ) 1185 k = nearest(heap, state, &count, path); 1190 if( SCIPisGT(scip, path[k].dist, 0.0) ) 1203 if( vbase[m] != m && (state[m]) && SCIPisGT(scip, path[m].dist, path[k].dist + costrev[i]) && ! Is_term(g-> term[m]) ) 1205 correct(scip, heap, state, &count, path, m, k, i, costrev[i], FSP_MODE); 1206 vbase[m] = vbase[k]; 1234 assert(path != NULL); 1235 assert(cost != NULL); 1236 assert(heap != NULL); 1237 assert(state != NULL); 1238 assert(costrev != NULL); 1245 for( i = 0; i < nnodes; i++ ) 1258 for( i = 0; i < nnodes; i++ ) 1267 if( ! Is_term(g-> term[j]) && SCIPisGT(scip, path[k].dist, path[i].dist + ((root == vbase[i])? cost[e] : costrev[e])) && 1268 vbase[i] != vbase[j] && g-> mark[j] ) 1270 correct(scip, heap, state, &count, path, k, i, e, ((root == vbase[i])? cost[e] : costrev[e]), FSP_MODE); 1271 vbase[k] = vbase[i]; 1283 k = nearest(heap, state, &count, path); 1288 assert(k - nnodes >= 0); 1298 if( vbase[j] != vbase[k] && SCIPisGT(scip, path[jc].dist, path[k].dist + ((root == vbase[k])? cost[e] : costrev[e])) ) 1300 correct(scip, heap, state, &count, path, jc, k, e, (root == vbase[k])? cost[e] : costrev[e], FSP_MODE); 1301 vbase[jc] = vbase[k]; 1333 assert(path != NULL); 1334 assert(cost != NULL); 1335 assert(heap != NULL); 1336 assert(state != NULL); 1337 assert(costrev != NULL); 1341 dnnodes = 2 * nnodes; 1344 for( i = 0; i < nnodes; i++ ) 1355 for( i = 0; i < nnodes; i++ ) 1369 for( l = 0; l < 2; l++ ) 1371 if( SCIPisGT(scip, path[k].dist, path[v].dist + ((root == vbase[v])? cost[e] : costrev[e])) && 1372 vbase[v] != vbase[j] && vbase[v] != vbase[j + nnodes] ) 1374 correct(scip, heap, state, &count, path, k, v, e, ((root == vbase[v])? cost[e] : costrev[e]), FSP_MODE); 1375 vbase[k] = vbase[v]; 1389 k = nearest(heap, state, &count, path); 1394 assert(k - dnnodes >= 0); 1403 if( vbase[j] != vbase[k] && vbase[j + nnodes] != vbase[k] 1404 && SCIPisGT(scip, path[jc].dist, path[k].dist + ((root == vbase[k])? cost[e] : costrev[e])) ) 1406 correct(scip, heap, state, &count, path, jc, k, e, (root == vbase[k])? cost[e] : costrev[e], FSP_MODE); 1407 vbase[jc] = vbase[k]; 1441 assert(path != NULL); 1442 assert(cost != NULL); 1443 assert(heap != NULL); 1444 assert(state != NULL); 1445 assert(costrev != NULL); 1449 dnnodes = 2 * nnodes; 1450 tnnodes = 3 * nnodes; 1453 for( i = 0; i < nnodes; i++ ) 1464 for( i = 0; i < nnodes; i++ ) 1479 for( l = 0; l < 3; l++ ) 1481 if( SCIPisGT(scip, path[k].dist, path[v].dist + ((root == vbase[v])? cost[e] : costrev[e])) && 1482 vbase[v] != vbase[j] && vbase[v] != vbase[j + nnodes] && vbase[v] != vbase[j + dnnodes] ) 1484 correct(scip, heap, state, &count, path, k, v, e, ((root == vbase[v])? cost[e] : costrev[e]), FSP_MODE); 1485 vbase[k] = vbase[v]; 1499 k = nearest(heap, state, &count, path); 1504 assert(k - tnnodes >= 0); 1513 if( vbase[j] != vbase[k] && vbase[j + nnodes] != vbase[k] && vbase[j + dnnodes] != vbase[k] 1514 && SCIPisGT(scip, path[jc].dist, path[k].dist + ((root == vbase[k])? cost[e] : costrev[e])) ) 1516 correct(scip, heap, state, &count, path, jc, k, e, (root == vbase[k])? cost[e] : costrev[e], FSP_MODE); 1517 vbase[jc] = vbase[k]; 1539 assert(path3 != NULL); 1540 assert(cost != NULL); 1541 assert(costrev != NULL); 1542 assert(heap != NULL); 1543 assert(state != NULL); 1546 for( k = 0; k < g-> knots; k++ ) 1553 get2next(scip, g, cost, costrev, path3, vbase, heap, state); 1556 get3next(scip, g, cost, costrev, path3, vbase, heap, state); 1576 assert(path != NULL); 1577 assert(cost != NULL); 1578 assert(heap != NULL); 1579 assert(state != NULL); 1580 assert(costrev != NULL); 1583 for( k = 0; k < g-> knots; k++ ) 1590 get2next(scip, g, cost, costrev, path, vbase, heap, state); 1593 get3next(scip, g, cost, costrev, path, vbase, heap, state); 1596 get4next(scip, g, cost, costrev, path, vbase, heap, state); 1607 SCIP_Real* boundedges, 1624 assert(path != NULL); 1625 assert(cost != NULL); 1626 assert(heap != NULL); 1627 assert(state != NULL); 1628 assert(boundedges != NULL); 1634 for( k = 0; k < g-> knots; k++ ) 1638 for( k = 0; k < nnodes; k ++ ) 1646 if( !g-> mark[k2] || k2 < k ) 1650 if( vbase[k] != vbase[k2] ) 1652 boundedges[nboundedges++] = e; 1663 for( l = 0; l < 4; l++ ) 1665 for( e = 0; e < nboundedges; e++ ) 1667 bedge = (int) boundedges[e]; 1669 k2 = g-> head[bedge]; 1670 utdist(scip, g, path, cost[bedge], vbase, k, l, k2, shift, nnodes); 1671 utdist(scip, g, path, cost[bedge], vbase, k2, l, k, shift, nnodes); 1696 assert(path != NULL); 1697 assert(cost != NULL); 1698 assert(heap != NULL); 1699 assert(state != NULL); 1702 for( i = 0; i < g-> knots; i++ ) 1731 k = nearest(heap, state, &count, path); 1742 if( (state[m]) && SCIPisGT(scip, path[m].dist, path[k].dist + cost[i]) && g-> mark[m] ) 1745 vbase[m] = vbase[k]; 1759 SCIP_Real* distance, 1782 assert(path != NULL); 1783 assert(cost != NULL); 1784 assert(heap != NULL); 1785 assert(state != NULL); 1786 assert(distance != NULL); 1793 for( i = 0; i < nnodes; i++ ) 1796 if( distnode != NULL ) 1820 for( e = 0; e < g-> edges; e++ ) 1821 minedgepred[e] = FALSE; 1823 for( k = 0; k < nbases; k++ ) 1825 minedgepred[minarc[k]] = TRUE; 1834 k = nearest(heap, state, &count, path); 1839 prededge = path[k]. edge; 1843 pred = g-> tail[prededge]; 1846 assert(vbase[pred] != UNKNOWN); 1847 assert(vbase[pred] == vbase[k]); 1848 assert(g-> head[prededge] == k); 1852 assert(path[pred].edge != UNKNOWN); 1853 minedgepred[prededge] = minedgepred[path[pred]. edge]; 1863 if( state[m] == CONNECT && vbase[m] != vbase[k] && g-> mark[m] ) 1865 if( minedgepred[i] || (prededge != UNKNOWN && minedgepred[prededge] ) ) 1868 if( SCIPisLT(scip, new, distance[vbase[k]]) ) 1870 if( distnode != NULL ) 1871 distnode[vbase[k]] = vbase[m]; 1874 printf( "update dist to %f k: %d m: %d \n", new , k, m); 1876 distance[vbase[k]] = new; 1879 if( minedgepred[ Edge_anti(i)] || (path[m].edge != UNKNOWN && minedgepred[path[m].edge] ) ) 1882 if( SCIPisLT(scip, new, distance[vbase[m]]) ) 1884 if( distnode != NULL ) 1885 distnode[vbase[m]] = vbase[k]; 1888 printf( "update dist to %f k: %d m: %d \n", new , k, m); 1890 distance[vbase[m]] = new; 1897 if( state[m] && g-> mark[m] && 1898 (SCIPisGT(scip, path[m].dist, path[k].dist + cost[i]) || 1899 (prededge != UNKNOWN && minedgepred[prededge] && SCIPisEQ(scip, path[m].dist, path[k].dist + cost[i]))) ) 1902 vbase[m] = vbase[k]; 1938 assert(graph != NULL); 1939 assert(heap != NULL); 1940 assert(state != NULL); 1941 assert(path != NULL); 1942 assert(cost != NULL); 1943 assert(costrev != NULL); 1944 assert(rad != NULL); 1945 assert(vbase != NULL); 1947 nnodes = graph-> knots; 1948 if( nnodes == 0 || graph-> terms == 0 ) 1953 SCIP_CALL( SCIPallocBufferArray(scip, &nodesid, nnodes) ); 1956 for( i = 0; i < nnodes; i++ ) 1972 nodesid[i] = nterms++; 1976 assert(SCIPisGE(scip, graph-> prize[i], 0.0)); 2006 k = nearest(heap, state, &count, path); 2018 if( state[m] == CONNECT && vbm != vbk && graph-> mark[m] ) 2020 assert(graph-> mark[vbm]); 2021 assert(graph-> mark[vbk]); 2024 if( SCIPisGT(scip, rad[vbk], path[k].dist) ) 2025 rad[vbk] = path[k]. dist; 2026 if( SCIPisGT(scip, rad[vbm], path[m].dist) ) 2027 rad[vbm] = path[m]. dist; 2029 if( SCIPisGT(scip, path[m].dist + graph-> prize[vbm], path[k]. dist + graph-> prize[vbk]) ) 2030 ecost = graph-> prize[vbm] - path[k]. dist; 2032 ecost = graph-> prize[vbk] - path[m]. dist; 2033 if( SCIPisLT(scip, ecost, 0.0) ) 2037 if( adjgraph-> head[ne] == nodesid[vbm] ) 2044 assert(adjgraph-> head[ne] == nodesid[vbm]); 2045 assert(adjgraph-> tail[ne] == nodesid[vbk]); 2046 if( SCIPisLT(scip, adjgraph-> cost[ne], ecost) ) 2048 adjgraph-> cost[ne] = ecost; 2054 graph_edge_add(scip, adjgraph, nodesid[vbm], nodesid[vbk], ecost, ecost); 2063 c1 = path[m]. dist + costrev[i]; 2065 c1 = path[m]. dist + cost[i]; 2067 c2 = path[k]. dist + cost[i]; 2069 c2 = path[k]. dist + costrev[i]; 2071 if( SCIPisGT(scip, c1, c2) ) 2078 if( SCIPisGT(scip, path[m].dist, path[k].dist) ) 2079 ecost = path[k]. dist + cost[i]; 2081 ecost = path[m]. dist + cost[i]; 2086 if( SCIPisGT(scip, ecost, graph-> prize[vbm]) && root != vbm ) 2087 ecost = graph-> prize[vbm]; 2088 if( SCIPisGT(scip, ecost, graph-> prize[vbk]) && root != vbk ) 2089 ecost = graph-> prize[vbk]; 2094 if( adjgraph-> head[ne] == nodesid[vbm] ) 2101 assert(adjgraph-> head[ne] == nodesid[vbm]); 2102 assert(adjgraph-> tail[ne] == nodesid[vbk]); 2103 if( SCIPisGT(scip, adjgraph-> cost[ne], ecost) ) 2105 adjgraph-> cost[ne] = ecost; 2111 graph_edge_add(scip, adjgraph, nodesid[vbm], nodesid[vbk], ecost, ecost); 2114 if( SCIPisGT(scip, rad[vbk], path[k].dist + ((vbk == root)? cost[i] : costrev[i])) ) 2115 rad[vbk] = path[k]. dist + ((vbk == root)? cost[i] : costrev[i]); 2117 if( SCIPisGT(scip, rad[vbm], path[m].dist + ((vbm == root)? costrev[i] : cost[i])) ) 2118 rad[vbm] = path[m]. dist + ((vbm == root)? costrev[i] : cost[i]); 2123 if( state[m] && graph-> mark[m] && ! Is_term(graph-> term[m]) && SCIPisGT(scip, path[m].dist, path[k].dist + ((vbk == root)? cost[i] : costrev[i])) ) 2125 correct(scip, heap, state, &count, path, m, k, i, ((vbk == root)? cost[i] : costrev[i]), FSP_MODE); 2131 SCIPfreeBufferArray(scip, &nodesid); 2154 assert(path != NULL); 2155 assert(cost != NULL); 2156 assert(heap != NULL); 2157 assert(state != NULL); 2160 for( i = 0; i < g-> knots; i++ ) 2163 if( SCIPisGT(scip, path[start].dist, path[adjnode].dist) ) 2165 if( vbase[adjnode] == adjnode ) 2168 vbase[start] = start; 2172 vbase[start] = vbase[adjnode]; 2174 path[start]. dist = path[adjnode]. dist; 2175 path[start]. edge = path[adjnode]. edge; 2189 k = nearest(heap, state, &count, path); 2199 if( (state[m] != CONNECT) && SCIPisGE(scip, path[m].dist, path[k].dist + cost[i]) && g-> mark[m] ) 2202 vbase[m] = vbase[k]; 2237 assert(path != NULL); 2238 assert(cost != NULL); 2252 k = nearest(heap, state, count, path); 2257 assert(g-> mark[vbase[k]]); 2264 if( (state[m]) && (SCIPisGT(scip, path[m].dist, path[k].dist + cost[i])) ) 2268 vbase[m] = vbase[k]; 2276 if( state[m] == CONNECT && ((node1 == crucnode) != (node2 == crucnode)) && g-> mark[m] && g-> mark[vbase[m]] 2277 && g-> mark[node1] && g-> mark[node2] && ((e == UNKNOWN) || SCIPisGT(scip, 2313 assert(path != NULL); 2314 assert(cost != NULL); 2325 while( (*count) > 0 ) 2328 k = nearest(heap, state, count, path); 2341 if( state[m] && (SCIPisGT(scip,path[m].dist, path[k].dist + cost[i])) && g-> mark ) 2344 vbase[m] = vbase[k]; 2348 && g-> mark[node1] && g-> mark[node2] && (nodesmark[node1] || nodesmark[node2]) ) 2350 boundedges[(*nboundedges)++] = i; 2366 SCIP_Real dist = 0.0; 2370 for(i = 0; i < g-> knots; i++) 2372 if ((e = p[i].edge) < 0) 2378 (void)printf( "Graph path length: %d Distance=%g\n", len, dist);
void voronoi_repair(SCIP *scip, const GRAPH *g, SCIP_Real *cost, int *count, int *vbase, PATH *path, int *newedge, int crucnode, UF *uf)
void voronoiSteinerTreeExt(SCIP *scip, const GRAPH *g, SCIP_Real *costrev, int *vbase, char *stvertex, PATH *path)
void getnext4terms(SCIP *scip, const GRAPH *g, SCIP_Real *cost, SCIP_Real *costrev, PATH *path, int *vbase, int *heap, int *state)
void getnext4tterms(SCIP *scip, const GRAPH *g, SCIP_Real *cost, SCIP_Real *boundedges, PATH *path, int *vbase, int *heap, int *state)
int SCIPunionfindFind(UF *uf, int element)
void sdpaths(SCIP *scip, const GRAPH *g, PATH *path, SCIP_Real *cost, SCIP_Real distlimit, int *heap, int *state, int *memlbl, int *nlbl, int tail, int head, int limit)
void get4next(SCIP *scip, const GRAPH *g, SCIP_Real *cost, SCIP_Real *costrev, PATH *path, int *vbase, int *heap, int *state)
static int nearestX(int *heap, int *state, int *count, const SCIP_Real *pathdist)
void graph_path_length(const GRAPH *g, const PATH *p)
static void correct(SCIP *scip, int *heap, int *state, int *count, PATH *path, int l, int k, int e, SCIP_Real cost, int mode)
SCIP_RETCODE voronoi_extend2(SCIP *scip, const GRAPH *g, SCIP_Real *cost, PATH *path, SCIP_Real **distarr, int **basearr, int **edgearr, char *termsmark, int *reachednodes, int *nreachednodes, int *nodenterms, int nneighbterms, int base, int countex)
SCIP_RETCODE voronoi_radius(SCIP *scip, const GRAPH *graph, GRAPH *adjgraph, PATH *path, SCIP_Real *rad, SCIP_Real *cost, SCIP_Real *costrev, int *vbase, int *heap, int *state)
struct Vnoi_List_Node * next
void graph_path_exit(SCIP *scip, GRAPH *g)
void voronoi_repair_mult(SCIP *scip, const GRAPH *g, SCIP_Real *cost, int *count, int *vbase, int *boundedges, int *nboundedges, char *nodesmark, UF *uf, PATH *path)
void voronoi(SCIP *scip, const GRAPH *g, SCIP_Real *cost, SCIP_Real *costrev, char *base, int *vbase, PATH *path)
static void resetX(SCIP *scip, SCIP_Real *pathdist, int *heap, int *state, int *count, int node)
#define STP_MAX_NODE_WEIGHT
SCIP_RETCODE voronoi_dist(SCIP *scip, const GRAPH *g, SCIP_Real *cost, SCIP_Real *distance, int *minedgepred, int *vbase, int *minarc, int *heap, int *state, int *distnode, PATH *path)
void voronoi_terms(SCIP *scip, const GRAPH *g, SCIP_Real *cost, PATH *path, int *vbase, int *heap, int *state)
void get2next(SCIP *scip, const GRAPH *g, SCIP_Real *cost, SCIP_Real *costrev, PATH *path, int *vbase, int *heap, int *state)
#define STP_PRIZE_COLLECTING
void get3next(SCIP *scip, const GRAPH *g, SCIP_Real *cost, SCIP_Real *costrev, PATH *path, int *vbase, int *heap, int *state)
includes various files containing graph methods used for Steiner problems
SCIP_RETCODE graph_path_init(SCIP *scip, GRAPH *g)
void graph_path_exec(SCIP *scip, const GRAPH *p, int mode, int start, SCIP_Real *cost, PATH *path)
static void correctX(SCIP *scip, int *heap, int *state, int *count, SCIP_Real *pathdist, int *pathedge, int l, int k, int e, SCIP_Real cost)
SCIP_RETCODE voronoi_extend(SCIP *scip, const GRAPH *g, SCIP_Real *cost, PATH *path, VLIST **adjterms, char *termsmark, int *reachednodes, int *nreachednodes, int *nodenterms, int nneighbterms, int base, int countex)
void getnext3terms(SCIP *scip, const GRAPH *g, SCIP_Real *cost, SCIP_Real *costrev, PATH *path3, int *vbase, int *heap, int *state)
#define STP_ROOTED_PRIZE_COLLECTING
void heap_add(int *heap, int *state, int *count, int node, PATH *path)
void graph_knot_add(GRAPH *, int)
static void utdist(SCIP *scip, const GRAPH *g, PATH *path, SCIP_Real ecost, int *vbase, int k, int l, int k2, int shift, int nnodes)
void graph_path_execX(SCIP *scip, const GRAPH *g, int start, SCIP_Real *cost, SCIP_Real *pathdist, int *pathedge)
void graph_path_st(SCIP *scip, const GRAPH *g, SCIP_Real *cost, SCIP_Real *pathdist, int *pathedge, int start, unsigned int *randseed, char *connected)
static int nearest(int *heap, int *state, int *count, const PATH *path)
void graph_edge_add(SCIP *, GRAPH *, int, int, double, double)
void voronoi_slrepair(SCIP *scip, const GRAPH *g, SCIP_Real *cost, PATH *path, int *vbase, int *heap, int *state, int start, int adjnode)
|