49 #define SQRTOFTWO 1.4142136 66 1.000, 2.414, 3.078, 6.314, 12.706,
67 0.816, 1.604, 1.886, 2.920, 4.303,
68 0.765, 1.423, 1.638, 2.353, 3.182,
69 0.741, 1.344, 1.533, 2.132, 2.776,
70 0.727, 1.301, 1.476, 2.015, 2.571,
71 0.718, 1.273, 1.440, 1.943, 2.447,
72 0.711, 1.254, 1.415, 1.895, 2.365,
73 0.706, 1.240, 1.397, 1.860, 2.306,
74 0.703, 1.230, 1.383, 1.833, 2.262,
75 0.700, 1.221, 1.372, 1.812, 2.228,
76 0.697, 1.214, 1.363, 1.796, 2.201,
77 0.695, 1.209, 1.356, 1.782, 2.179,
78 0.694, 1.204, 1.350, 1.771, 2.160,
79 0.692, 1.200, 1.345, 1.761, 2.145,
80 0.691, 1.197, 1.341, 1.753, 2.131
87 0.674, 1.150, 1.282, 1.645, 1.960
124 if( countx < 1.9 || county < 1.9 )
128 pooledvariance = (countx - 1) * variancex + (county - 1) * variancey;
129 pooledvariance /= (countx + county - 2);
132 pooledvariance =
MAX(pooledvariance, 1e-9);
137 tresult = (meanx - meany) / pooledvariance;
138 tresult *= SQRT(countx * county / (countx + county));
148 #if defined(_WIN32) || defined(_WIN64) 159 sign = (x >= 0) ? 1 : -1;
163 y = 1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*
exp(-x*x);
194 assert(variance >= -1e-9);
195 if( variance < 1e-9 )
198 std =
sqrt(variance);
203 if( value < mean + 1e-9 )
208 assert( std != 0.0 );
211 normvalue = (value - mean)/(std *
SQRTOFTWO);
213 SCIPdebugMessage(
" Normalized value %g = ( %g - %g ) / (%g * 1.4142136)\n", normvalue, value, mean, std);
218 if( normvalue < 1e-9 && normvalue > -1e-9 )
220 else if( normvalue > 0 )
224 erfresult =
SCIPerf(normvalue);
225 return erfresult / 2.0 + 0.5;
231 erfresult =
SCIPerf(-normvalue);
233 return 0.5 - erfresult / 2.0;
246 assert(regression !=
NULL);
256 assert(regression !=
NULL);
258 return regression->
slope;
266 assert(regression !=
NULL);
287 regression->
slope = 0.0;
321 assert(meanptr !=
NULL);
322 assert(sumvarptr !=
NULL);
323 assert(nobservations > 0 || add);
325 addfactor = add ? 1.0 : -1.0;
328 *meanptr = oldmean + addfactor * (value - oldmean)/(
SCIP_Real)nobservations;
329 *sumvarptr += addfactor * (value - oldmean) * (value - (*meanptr));
332 assert(*sumvarptr >= -1e-6);
333 *sumvarptr =
MAX(0.0, *sumvarptr);
343 assert(regression !=
NULL);
361 regression->
sumxy -= (x * y);
376 assert(regression !=
NULL);
382 regression->
sumxy += x * y;
395 regression->
meanx = 0;
397 regression->
sumxy = 0;
398 regression->
meany = 0;
408 assert(regression !=
NULL);
437 assert(initsize >= 0);
438 assert(growfac >= 1.0);
442 size =
MAX(initsize, num);
448 initsize =
MAX(initsize, 4);
453 while( size < num && size > oldsize )
456 size = (int)(growfac * size + initsize);
460 if( size <= oldsize )
464 assert(size >= initsize);
475 #define GMLNODEWIDTH 120.0 476 #define GMLNODEHEIGTH 30.0 477 #define GMLFONTSIZE 13 478 #define GMLNODETYPE "rectangle" 479 #define GMLNODEFILLCOLOR "#ff0000" 480 #define GMLEDGECOLOR "black" 481 #define GMLNODEBORDERCOLOR "#000000" 489 const char* nodetype,
490 const char* fillcolor,
491 const char* bordercolor
494 assert(file !=
NULL);
495 assert(label !=
NULL);
497 fprintf(file,
" node\n");
498 fprintf(file,
" [\n");
499 fprintf(file,
" id %u\n",
id);
500 fprintf(file,
" label \"%s\"\n", label);
501 fprintf(file,
" graphics\n");
502 fprintf(file,
" [\n");
506 if( nodetype !=
NULL )
507 fprintf(file,
" type \"%s\"\n", nodetype);
511 if( fillcolor !=
NULL )
512 fprintf(file,
" fill \"%s\"\n", fillcolor);
516 if( bordercolor !=
NULL )
517 fprintf(file,
" outline \"%s\"\n", bordercolor);
521 fprintf(file,
" ]\n");
522 fprintf(file,
" LabelGraphics\n");
523 fprintf(file,
" [\n");
524 fprintf(file,
" text \"%s\"\n", label);
526 fprintf(file,
" fontName \"Dialog\"\n");
527 fprintf(file,
" anchor \"c\"\n");
528 fprintf(file,
" ]\n");
529 fprintf(file,
" ]\n");
537 const char* nodetype,
538 const char* fillcolor,
539 const char* bordercolor,
543 assert(file !=
NULL);
544 assert(label !=
NULL);
546 fprintf(file,
" node\n");
547 fprintf(file,
" [\n");
548 fprintf(file,
" id %u\n",
id);
549 fprintf(file,
" label \"%s\"\n", label);
550 fprintf(file,
" weight %g\n", weight);
551 fprintf(file,
" graphics\n");
552 fprintf(file,
" [\n");
556 if( nodetype !=
NULL )
557 fprintf(file,
" type \"%s\"\n", nodetype);
561 if( fillcolor !=
NULL )
562 fprintf(file,
" fill \"%s\"\n", fillcolor);
566 if( bordercolor !=
NULL )
567 fprintf(file,
" outline \"%s\"\n", bordercolor);
571 fprintf(file,
" ]\n");
572 fprintf(file,
" LabelGraphics\n");
573 fprintf(file,
" [\n");
574 fprintf(file,
" text \"%s\"\n", label);
576 fprintf(file,
" fontName \"Dialog\"\n");
577 fprintf(file,
" anchor \"c\"\n");
578 fprintf(file,
" ]\n");
579 fprintf(file,
" ]\n");
591 assert(file !=
NULL);
593 fprintf(file,
" edge\n");
594 fprintf(file,
" [\n");
595 fprintf(file,
" source %u\n", source);
596 fprintf(file,
" target %u\n", target);
599 fprintf(file,
" label \"%s\"\n", label);
601 fprintf(file,
" graphics\n");
602 fprintf(file,
" [\n");
605 fprintf(file,
" fill \"%s\"\n", color);
610 fprintf(file,
" ]\n");
614 fprintf(file,
" LabelGraphics\n");
615 fprintf(file,
" [\n");
616 fprintf(file,
" text \"%s\"\n", label);
618 fprintf(file,
" fontName \"Dialog\"\n");
619 fprintf(file,
" anchor \"c\"\n");
620 fprintf(file,
" ]\n");
623 fprintf(file,
" ]\n");
635 assert(file !=
NULL);
637 fprintf(file,
" edge\n");
638 fprintf(file,
" [\n");
639 fprintf(file,
" source %u\n", source);
640 fprintf(file,
" target %u\n", target);
643 fprintf(file,
" label \"%s\"\n", label);
645 fprintf(file,
" graphics\n");
646 fprintf(file,
" [\n");
649 fprintf(file,
" fill \"%s\"\n", color);
653 fprintf(file,
" targetArrow \"standard\"\n");
654 fprintf(file,
" ]\n");
658 fprintf(file,
" LabelGraphics\n");
659 fprintf(file,
" [\n");
660 fprintf(file,
" text \"%s\"\n", label);
662 fprintf(file,
" fontName \"Dialog\"\n");
663 fprintf(file,
" anchor \"c\"\n");
664 fprintf(file,
" ]\n");
667 fprintf(file,
" ]\n");
676 assert(file !=
NULL);
678 fprintf(file,
"graph\n");
679 fprintf(file,
"[\n");
680 fprintf(file,
" hierarchic 1\n");
683 fprintf(file,
" directed 1\n");
691 assert(file !=
NULL);
693 fprintf(file,
"]\n");
715 assert(sparsesol !=
NULL);
716 assert(vars !=
NULL);
725 for( v = nvars - 1; v >= 0; --v )
727 assert(vars[v] !=
NULL);
748 (*sparsesol)->nvars = nvars;
758 assert(sparsesol !=
NULL);
759 assert(*sparsesol !=
NULL);
772 assert(sparsesol !=
NULL);
774 return sparsesol->
vars;
782 assert(sparsesol !=
NULL);
784 return sparsesol->
nvars;
792 assert(sparsesol !=
NULL);
802 assert(sparsesol !=
NULL);
817 assert(sparsesol !=
NULL);
822 assert(lbvalues !=
NULL);
825 for( v = 0; v < nvars; ++v )
826 sol[v] = lbvalues[v];
845 assert(sparsesol !=
NULL);
856 assert(lbvalues !=
NULL);
857 assert(ubvalues !=
NULL);
862 for( v = 0; v < nvars; ++v )
864 lbvalue = lbvalues[v];
865 ubvalue = ubvalues[v];
867 if( lbvalue < ubvalue )
871 if( carryflag ==
FALSE )
873 if( sol[v] < ubvalue )
881 assert(sol[v] == ubvalue);
888 if( sol[v] < ubvalue )
896 assert(sol[v] == ubvalue);
903 return (!carryflag && !singular);
918 assert(queue !=
NULL);
921 if( minsize <= queue->size )
938 assert(queue !=
NULL);
940 initsize =
MAX(1, initsize);
941 sizefac =
MAX(1.0, sizefac);
944 (*queue)->firstfree = 0;
945 (*queue)->firstused = -1;
947 (*queue)->sizefac = sizefac;
948 (*queue)->slots =
NULL;
960 assert(queue !=
NULL);
971 assert(queue !=
NULL);
983 assert(queue !=
NULL);
988 assert(elem !=
NULL);
993 int oldsize = queue->
size;
996 assert(oldsize < queue->size);
998 sizediff = queue->
size - oldsize;
1028 assert(queue !=
NULL);
1052 return (queue->
slots[pos]);
1060 assert(queue !=
NULL);
1078 assert(queue !=
NULL);
1091 assert(queue !=
NULL);
1111 #define PQ_PARENT(q) (((q)+1)/2-1) 1112 #define PQ_LEFTCHILD(p) (2*(p)+1) 1113 #define PQ_RIGHTCHILD(p) (2*(p)+2) 1123 assert(pqueue !=
NULL);
1125 if( minsize <= pqueue->size )
1142 assert(pqueue !=
NULL);
1143 assert(ptrcomp !=
NULL);
1145 initsize =
MAX(1, initsize);
1146 sizefac =
MAX(1.0, sizefac);
1150 (*pqueue)->size = 0;
1151 (*pqueue)->sizefac = sizefac;
1152 (*pqueue)->slots =
NULL;
1153 (*pqueue)->ptrcomp = ptrcomp;
1164 assert(pqueue !=
NULL);
1175 assert(pqueue !=
NULL);
1188 assert(pqueue !=
NULL);
1189 assert(pqueue->
len >= 0);
1190 assert(elem !=
NULL);
1197 while( pos > 0 && (*pqueue->ptrcomp)(elem, pqueue->
slots[
PQ_PARENT(pos)]) < 0 )
1202 pqueue->
slots[pos] = elem;
1218 assert(pqueue !=
NULL);
1219 assert(pqueue->
len >= 0);
1221 if( pqueue->
len == 0 )
1227 root = pqueue->
slots[0];
1228 last = pqueue->
slots[pqueue->
len-1];
1235 if( brotherpos <= pqueue->len && (*pqueue->ptrcomp)(pqueue->
slots[brotherpos], pqueue->
slots[childpos]) < 0 )
1236 childpos = brotherpos;
1237 if( (*pqueue->ptrcomp)(last, pqueue->
slots[childpos]) <= 0 )
1239 pqueue->
slots[pos] = pqueue->
slots[childpos];
1242 assert(pos <= pqueue->len);
1243 pqueue->
slots[pos] = last;
1253 assert(pqueue !=
NULL);
1254 assert(pqueue->
len >= 0);
1256 if( pqueue->
len == 0 )
1259 return pqueue->
slots[0];
1267 assert(pqueue !=
NULL);
1268 assert(pqueue->
len >= 0);
1278 assert(pqueue !=
NULL);
1279 assert(pqueue->
len >= 0);
1281 return pqueue->
slots;
1352 return ( (uint32_t) ((0x9e3779b97f4a7c15ULL * input)>>32) ) | 1u;
1363 assert(pos < primetablesize);
1365 return primetable[pos];
1378 assert(multihashlist !=
NULL);
1379 assert(blkmem !=
NULL);
1380 assert(element !=
NULL);
1384 newlist->
next = *multihashlist;
1385 *multihashlist = newlist;
1400 assert(multihashlist !=
NULL);
1401 assert(blkmem !=
NULL);
1403 list = *multihashlist;
1404 while( list !=
NULL )
1406 nextlist = list->
next;
1411 *multihashlist =
NULL;
1426 uint64_t currentkeyval;
1429 assert(hashkeyeq !=
NULL);
1430 assert(key !=
NULL);
1432 while( multihashlist !=
NULL )
1434 currentkey = hashgetkey(userptr, multihashlist->
element);
1435 currentkeyval = hashkeyval(userptr, currentkey);
1436 if( currentkeyval == keyval && hashkeyeq(userptr, currentkey, key) )
1437 return multihashlist;
1439 multihashlist = multihashlist->
next;
1460 h =
multihashlistFind(multihashlist, hashgetkey, hashkeyeq, hashkeyval, userptr, keyval, key);
1475 key1 = hashgetkey(userptr, h->
element);
1476 key2 = hashgetkey(userptr, h2->
element);
1477 assert(hashkeyval(userptr, key1) == hashkeyval(userptr, key2));
1479 if( hashkeyeq(userptr, key1, key2) )
1481 SCIPerrorMessage(
"WARNING: hashkey with same value exists multiple times (e.g. duplicate constraint/variable names), so the return value is maybe not correct\n");
1510 assert(multihashlist !=
NULL);
1513 h =
multihashlistFind(*multihashlist, hashgetkey, hashkeyeq, hashkeyval, userptr, keyval, key);
1518 *multihashlist = h->
next;
1523 *multihashlist =
NULL;
1538 assert(multihashlist !=
NULL);
1539 assert(blkmem !=
NULL);
1540 assert(element !=
NULL);
1542 while( *multihashlist !=
NULL && (*multihashlist)->element != element )
1543 multihashlist = &(*multihashlist)->
next;
1545 if( *multihashlist !=
NULL )
1547 nextlist = (*multihashlist)->
next;
1549 *multihashlist = nextlist;
1557 #define SCIP_MULTIHASH_MAXSIZE 33554431 1558 #define SCIP_MULTIHASH_RESIZE_PERCENTAGE 65 1559 #define SCIP_MULTIHASH_GROW_FACTOR 1.31 1573 assert(multihash !=
NULL);
1575 assert(multihash->
nlists > 0);
1576 assert(multihash->hashgetkey !=
NULL);
1577 assert(multihash->hashkeyeq !=
NULL);
1578 assert(multihash->hashkeyval !=
NULL);
1582 nnewlists =
MAX(nnewlists, multihash->
nlists);
1586 if( nnewlists > multihash->
nlists )
1591 unsigned int hashval;
1596 for( l = multihash->
nlists - 1; l >= 0; --l )
1598 multihashlist = multihash->
lists[l];
1602 while( multihashlist !=
NULL )
1605 key = multihash->hashgetkey(multihash->
userptr, multihashlist->
element);
1606 keyval = multihash->hashkeyval(multihash->
userptr, key);
1607 hashval = keyval % nnewlists;
1612 if( multihashlist->
next ==
NULL && onlyone )
1615 if( newlists[hashval] ==
NULL )
1616 newlists[hashval] = multihashlist;
1623 while( next !=
NULL )
1629 lastnext->
next = multihashlist;
1641 multihashlist = multihashlist->
next;
1653 multihash->
lists = newlists;
1654 multihash->
nlists = nnewlists;
1657 #ifdef SCIP_MORE_DEBUG 1661 for( l = 0; l < multihash->
nlists; ++l )
1663 multihashlist = multihash->
lists[l];
1664 while( multihashlist !=
NULL )
1667 multihashlist = multihashlist->
next;
1670 assert(sumslotsize == multihash->
nelements);
1692 assert(tablesize >= 0);
1693 assert(multihash !=
NULL);
1694 assert(hashgetkey !=
NULL);
1695 assert(hashkeyeq !=
NULL);
1696 assert(hashkeyval !=
NULL);
1700 (*multihash)->blkmem = blkmem;
1701 (*multihash)->nlists = tablesize;
1702 (*multihash)->hashgetkey = hashgetkey;
1703 (*multihash)->hashkeyeq = hashkeyeq;
1704 (*multihash)->hashkeyval = hashkeyval;
1705 (*multihash)->userptr = userptr;
1706 (*multihash)->nelements = 0;
1721 assert(multihash !=
NULL);
1722 assert(*multihash !=
NULL);
1724 table = (*multihash);
1726 lists = table->
lists;
1729 for( i = table->
nlists - 1; i >= 0; --i )
1750 unsigned int hashval;
1752 assert(multihash !=
NULL);
1754 assert(multihash->
nlists > 0);
1755 assert(multihash->hashgetkey !=
NULL);
1756 assert(multihash->hashkeyeq !=
NULL);
1757 assert(multihash->hashkeyval !=
NULL);
1758 assert(element !=
NULL);
1767 key = multihash->hashgetkey(multihash->
userptr, element);
1768 keyval = multihash->hashkeyval(multihash->
userptr, key);
1769 hashval = keyval % multihash->
nlists;
1789 assert(multihash !=
NULL);
1790 assert(multihash->hashgetkey !=
NULL);
1809 unsigned int hashval;
1811 assert(multihash !=
NULL);
1813 assert(multihash->
nlists > 0);
1814 assert(multihash->hashgetkey !=
NULL);
1815 assert(multihash->hashkeyeq !=
NULL);
1816 assert(multihash->hashkeyval !=
NULL);
1817 assert(key !=
NULL);
1820 keyval = multihash->hashkeyval(multihash->
userptr, key);
1821 hashval = keyval % multihash->
nlists;
1824 multihash->hashkeyval, multihash->
userptr, keyval, key);
1842 assert(multihash !=
NULL);
1844 assert(multihash->
nlists > 0);
1845 assert(multihash->hashgetkey !=
NULL);
1846 assert(multihash->hashkeyeq !=
NULL);
1847 assert(multihash->hashkeyval !=
NULL);
1848 assert(multihashlist !=
NULL);
1849 assert(key !=
NULL);
1851 keyval = multihash->hashkeyval(multihash->
userptr, key);
1853 if( *multihashlist ==
NULL )
1855 unsigned int hashval;
1858 hashval = keyval % multihash->
nlists;
1860 *multihashlist = multihash->
lists[hashval];
1864 multihash->hashkeyval, multihash->
userptr, keyval, key);
1875 unsigned int hashval;
1877 assert(multihash !=
NULL);
1879 assert(multihash->
nlists > 0);
1880 assert(multihash->hashgetkey !=
NULL);
1881 assert(multihash->hashkeyeq !=
NULL);
1882 assert(multihash->hashkeyval !=
NULL);
1883 assert(element !=
NULL);
1886 key = multihash->hashgetkey(multihash->
userptr, element);
1887 keyval = multihash->hashkeyval(multihash->
userptr, key);
1888 hashval = keyval % multihash->
nlists;
1891 multihash->hashkeyval, multihash->
userptr, keyval, key) !=
NULL);
1902 unsigned int hashval;
1904 assert(multihash !=
NULL);
1906 assert(multihash->
nlists > 0);
1907 assert(multihash->hashgetkey !=
NULL);
1908 assert(multihash->hashkeyeq !=
NULL);
1909 assert(multihash->hashkeyval !=
NULL);
1910 assert(element !=
NULL);
1913 key = multihash->hashgetkey(multihash->
userptr, element);
1914 keyval = multihash->hashkeyval(multihash->
userptr, key);
1915 hashval = keyval % multihash->
nlists;
1937 assert(multihash !=
NULL);
1939 blkmem = multihash->
blkmem;
1940 lists = multihash->
lists;
1943 for( i = multihash->
nlists - 1; i >= 0; --i )
1954 assert(multihash !=
NULL);
1964 assert(multihash !=
NULL);
1982 assert(multihash !=
NULL);
1987 for( i = 0; i < multihash->
nlists; ++i )
1989 multihashlist = multihash->
lists[i];
1990 if( multihashlist !=
NULL )
1994 while( multihashlist !=
NULL )
1997 multihashlist = multihashlist->
next;
1999 maxslotsize =
MAX(maxslotsize, slotsize);
2000 sumslotsize += slotsize;
2003 assert(sumslotsize == multihash->
nelements);
2005 SCIPmessagePrintInfo(messagehdlr,
"%" SCIP_LONGINT_FORMAT
" multihash entries, used %d/%d slots (%.1f%%)",
2024 unsigned int nslots;
2029 assert(tablesize >= 0);
2030 assert(hashtable !=
NULL);
2031 assert(hashgetkey !=
NULL);
2032 assert(hashkeyeq !=
NULL);
2033 assert(hashkeyval !=
NULL);
2034 assert(blkmem !=
NULL);
2043 (*hashtable)->shift = 32;
2044 (*hashtable)->shift -= (int)ceil(
log(
MAX(32.0, tablesize / 0.9)) /
log(2.0));
2047 nslots = 1u << (32 - (*hashtable)->shift);
2050 (*hashtable)->mask = nslots - 1;
2053 (*hashtable)->blkmem = blkmem;
2054 (*hashtable)->hashgetkey = hashgetkey;
2055 (*hashtable)->hashkeyeq = hashkeyeq;
2056 (*hashtable)->hashkeyval = hashkeyval;
2057 (*hashtable)->userptr = userptr;
2058 (*hashtable)->nelements = 0;
2071 assert(hashtable !=
NULL);
2072 assert(*hashtable !=
NULL);
2074 nslots = (*hashtable)->
mask + 1;
2077 uint32_t maxprobelen = 0;
2078 uint64_t probelensum = 0;
2081 assert(table !=
NULL);
2083 for( i = 0; i < nslots; ++i )
2085 if( table->
hashes[i] != 0 )
2087 uint32_t probelen = ((i + table->
mask + 1 - (table->
hashes[i]>>(table->
shift))) & table->
mask) + 1;
2088 probelensum += probelen;
2089 maxprobelen =
MAX(probelen, maxprobelen);
2094 (
unsigned int)table->
nelements, (
unsigned int)table->
nelements, (
unsigned int)nslots,
2124 #define ELEM_DISTANCE(pos) (((pos) + hashtable->mask + 1 - (hashtable->hashes[(pos)]>>(hashtable->shift))) & hashtable->mask) 2136 uint32_t elemdistance;
2139 assert(hashtable !=
NULL);
2142 assert(hashtable->
mask > 0);
2143 assert(hashtable->hashgetkey !=
NULL);
2144 assert(hashtable->hashkeyeq !=
NULL);
2145 assert(hashtable->hashkeyval !=
NULL);
2146 assert(element !=
NULL);
2148 pos = hashval>>(hashtable->
shift);
2155 if( hashtable->
hashes[pos] == 0 )
2157 hashtable->
slots[pos] = element;
2158 hashtable->
hashes[pos] = hashval;
2163 if( hashtable->
hashes[pos] == hashval && hashtable->hashkeyeq(hashtable->
userptr,
2164 hashtable->hashgetkey(hashtable->
userptr, hashtable->
slots[pos]), key) )
2168 hashtable->
slots[pos] = element;
2169 hashtable->
hashes[pos] = hashval;
2180 if( distance < elemdistance )
2185 elemdistance = distance;
2188 hashval = hashtable->
hashes[pos];
2189 hashtable->
hashes[pos] = tmp;
2193 pos = (pos + 1) & hashtable->
mask;
2204 assert(hashtable !=
NULL);
2205 assert(hashtable->
shift < 32);
2208 if( ((((uint64_t)hashtable->
nelements)<<10)>>(32-hashtable->
shift) > 921) )
2217 nslots = hashtable->
mask + 1;
2218 newnslots = 2*nslots;
2219 hashtable->
mask = newnslots-1;
2231 for( i = 0; i < nslots; ++i )
2236 if( hashes[i] != 0 )
2262 assert(hashtable !=
NULL);
2265 assert(hashtable->
mask > 0);
2266 assert(hashtable->hashgetkey !=
NULL);
2267 assert(hashtable->hashkeyeq !=
NULL);
2268 assert(hashtable->hashkeyval !=
NULL);
2269 assert(element !=
NULL);
2274 key = hashtable->hashgetkey(hashtable->
userptr, element);
2275 keyval = hashtable->hashkeyval(hashtable->
userptr, key);
2294 assert(hashtable !=
NULL);
2297 assert(hashtable->
mask > 0);
2298 assert(hashtable->hashgetkey !=
NULL);
2299 assert(hashtable->hashkeyeq !=
NULL);
2300 assert(hashtable->hashkeyval !=
NULL);
2301 assert(element !=
NULL);
2306 key = hashtable->hashgetkey(hashtable->
userptr, element);
2307 keyval = hashtable->hashkeyval(hashtable->
userptr, key);
2322 uint32_t elemdistance;
2324 assert(hashtable !=
NULL);
2327 assert(hashtable->
mask > 0);
2328 assert(hashtable->hashgetkey !=
NULL);
2329 assert(hashtable->hashkeyeq !=
NULL);
2330 assert(hashtable->hashkeyval !=
NULL);
2331 assert(key !=
NULL);
2334 keyval = hashtable->hashkeyval(hashtable->
userptr, key);
2337 pos = hashval>>(hashtable->
shift);
2345 if( hashtable->
hashes[pos] == 0 )
2351 if( elemdistance > distance )
2355 if( hashtable->
hashes[pos] == hashval && hashtable->hashkeyeq(hashtable->
userptr,
2356 hashtable->hashgetkey(hashtable->
userptr, hashtable->
slots[pos]), key) )
2357 return hashtable->
slots[pos];
2359 pos = (pos + 1) & hashtable->
mask;
2370 assert(hashtable !=
NULL);
2373 assert(hashtable->
mask > 0);
2374 assert(hashtable->hashgetkey !=
NULL);
2375 assert(hashtable->hashkeyeq !=
NULL);
2376 assert(hashtable->hashkeyval !=
NULL);
2377 assert(element !=
NULL);
2391 uint32_t elemdistance;
2395 assert(hashtable !=
NULL);
2398 assert(hashtable->
mask > 0);
2399 assert(hashtable->hashgetkey !=
NULL);
2400 assert(hashtable->hashkeyeq !=
NULL);
2401 assert(hashtable->hashkeyval !=
NULL);
2402 assert(element !=
NULL);
2405 key = hashtable->hashgetkey(hashtable->
userptr, element);
2406 keyval = hashtable->hashkeyval(hashtable->
userptr, key);
2410 pos = hashval>>(hashtable->
shift);
2414 if( hashtable->
hashes[pos] == 0 )
2420 if( elemdistance > distance )
2423 if( hashtable->
hashes[pos] == hashval && hashtable->hashkeyeq(hashtable->
userptr,
2424 hashtable->hashgetkey(hashtable->
userptr, hashtable->
slots[pos]), key) )
2430 pos = (pos + 1) & hashtable->
mask;
2435 hashtable->
hashes[pos] = 0;
2439 uint32_t nextpos = (pos + 1) & hashtable->
mask;
2442 if( hashtable->
hashes[nextpos] == 0 )
2446 if( (hashtable->
hashes[nextpos]>>(hashtable->
shift)) == nextpos )
2450 hashtable->
slots[pos] = hashtable->
slots[nextpos];
2452 hashtable->
hashes[nextpos] = 0;
2465 assert(hashtable !=
NULL);
2477 assert(hashtable !=
NULL);
2487 assert(hashtable !=
NULL);
2498 uint32_t maxprobelen = 0;
2499 uint64_t probelensum = 0;
2503 assert(hashtable !=
NULL);
2505 nslots = hashtable->
mask + 1;
2508 for( i = 0; i < nslots; ++i )
2510 if( hashtable->
hashes[i] != 0 )
2513 probelensum += probelen;
2514 maxprobelen =
MAX(probelen, maxprobelen);
2533 const char* string1 = (
const char*)key1;
2534 const char* string2 = (
const char*)key2;
2536 return (strcmp(string1, string2) == 0);
2545 str = (
const char*)key;
2547 while( *str !=
'\0' )
2550 hash += (
unsigned int)(*str);
2568 return (key1 == key2);
2575 return (uint64_t) key;
2585 #undef ELEM_DISTANCE 2587 #define ELEM_DISTANCE(pos) (((pos) + hashmap->mask + 1 - (hashmap->hashes[(pos)]>>(hashmap->shift))) & hashmap->mask) 2600 uint32_t elemdistance;
2603 assert(hashmap !=
NULL);
2606 assert(hashmap->
mask > 0);
2607 assert(hashval != 0);
2609 pos = hashval>>(hashmap->
shift);
2616 if( hashmap->
hashes[pos] == 0 )
2620 hashmap->
hashes[pos] = hashval;
2631 hashmap->
hashes[pos] = hashval;
2642 if( distance < elemdistance )
2648 elemdistance = distance;
2650 hashval = hashmap->
hashes[pos];
2651 hashmap->
hashes[pos] = tmphash;
2659 pos = (pos + 1) & hashmap->
mask;
2675 uint32_t elemdistance;
2677 assert(hashmap !=
NULL);
2680 assert(hashmap->
mask > 0);
2684 assert(hashval != 0);
2686 *pos = hashval>>(hashmap->
shift);
2694 if( hashmap->
hashes[*pos] == 0 )
2699 if( elemdistance > distance )
2706 *pos = (*pos + 1) & hashmap->
mask;
2717 assert(hashmap !=
NULL);
2718 assert(hashmap->
shift < 32);
2721 if( ((((uint64_t)hashmap->
nelements)<<10)>>(32-hashmap->
shift) > 921) )
2730 nslots = hashmap->
mask + 1;
2732 newnslots = 2*nslots;
2733 hashmap->
mask = newnslots-1;
2744 for( i = 0; i < nslots; ++i )
2749 if( hashes[i] != 0 )
2772 assert(hashmap !=
NULL);
2773 assert(mapsize >= 0);
2774 assert(blkmem !=
NULL);
2783 (*hashmap)->shift = 32;
2784 (*hashmap)->shift -= (int)ceil(
log(
MAX(32, mapsize / 0.9)) /
log(2.0));
2785 nslots = 1u << (32 - (*hashmap)->shift);
2786 (*hashmap)->mask = nslots - 1;
2787 (*hashmap)->blkmem = blkmem;
2788 (*hashmap)->nelements = 0;
2803 assert(hashmap !=
NULL);
2804 assert(*hashmap !=
NULL);
2806 nslots = (*hashmap)->mask + 1;
2809 uint32_t maxprobelen = 0;
2810 uint64_t probelensum = 0;
2813 assert(hashmap !=
NULL);
2815 for( i = 0; i < nslots; ++i )
2817 if( (*hashmap)->hashes[i] != 0 )
2819 uint32_t probelen = ((i + (*hashmap)->mask + 1 - ((*hashmap)->hashes[i]>>((*hashmap)->shift))) & (*hashmap)->mask) + 1;
2820 probelensum += probelen;
2821 maxprobelen =
MAX(probelen, maxprobelen);
2826 (
unsigned int)(*hashmap)->nelements, (
unsigned int)(*hashmap)->nelements, (
unsigned int)nslots,
2828 if( (*hashmap)->nelements > 0 )
2830 (
SCIP_Real)(probelensum)/(
SCIP_Real)(*hashmap)->nelements, (
unsigned int)maxprobelen);
2854 assert(hashmap !=
NULL);
2857 assert(hashmap->
mask > 0);
2884 assert(hashmap !=
NULL);
2887 assert(hashmap->
mask > 0);
2909 assert(hashmap !=
NULL);
2912 assert(hashmap->
mask > 0);
2928 assert(hashmap !=
NULL);
2931 assert(hashmap->
mask > 0);
2951 assert(hashmap !=
NULL);
2953 assert(hashmap->
mask > 0);
2979 assert(hashmap !=
NULL);
2981 assert(hashmap->
mask > 0);
3003 assert(hashmap !=
NULL);
3006 assert(hashmap->
mask > 0);
3019 assert(hashmap !=
NULL);
3021 assert(hashmap->
mask > 0);
3023 assert(origin !=
NULL);
3028 hashmap->
hashes[pos] = 0;
3034 uint32_t nextpos = (pos + 1) & hashmap->
mask;
3037 if( hashmap->
hashes[nextpos] == 0 )
3041 if( (hashmap->
hashes[nextpos]>>(hashmap->
shift)) == nextpos )
3048 hashmap->
hashes[nextpos] = 0;
3063 uint32_t maxprobelen = 0;
3064 uint64_t probelensum = 0;
3068 assert(hashmap !=
NULL);
3070 nslots = hashmap->
mask + 1;
3073 for( i = 0; i < nslots; ++i )
3075 if( hashmap->
hashes[i] != 0 )
3078 probelensum += probelen;
3079 maxprobelen =
MAX(probelen, maxprobelen);
3100 assert(hashmap !=
NULL);
3118 return (
int) hashmap->
mask + 1;
3127 assert(hashmap !=
NULL);
3129 return hashmap->
hashes[entryidx] == 0 ?
NULL : &hashmap->
slots[entryidx];
3137 assert(entry !=
NULL);
3147 assert(entry !=
NULL);
3157 assert(entry !=
NULL);
3167 assert(hashmap !=
NULL);
3187 assert(realarray !=
NULL);
3188 assert(blkmem !=
NULL);
3191 (*realarray)->blkmem = blkmem;
3192 (*realarray)->vals =
NULL;
3193 (*realarray)->valssize = 0;
3194 (*realarray)->firstidx = -1;
3195 (*realarray)->minusedidx = INT_MAX;
3196 (*realarray)->maxusedidx = INT_MIN;
3208 assert(realarray !=
NULL);
3209 assert(sourcerealarray !=
NULL);
3212 if( sourcerealarray->
valssize > 0 )
3217 (*realarray)->valssize = sourcerealarray->
valssize;
3218 (*realarray)->firstidx = sourcerealarray->
firstidx;
3219 (*realarray)->minusedidx = sourcerealarray->
minusedidx;
3220 (*realarray)->maxusedidx = sourcerealarray->
maxusedidx;
3230 assert(realarray !=
NULL);
3231 assert(*realarray !=
NULL);
3253 assert(realarray !=
NULL);
3258 assert(0 <= minidx);
3259 assert(minidx <= maxidx);
3263 assert(0 <= minidx);
3264 assert(minidx <= maxidx);
3266 SCIPdebugMessage(
"extending realarray %p (firstidx=%d, size=%d, range=[%d,%d]) to range [%d,%d]\n",
3267 (
void*)realarray, realarray->
firstidx, realarray->valssize, realarray->minusedidx, realarray->maxusedidx, minidx, maxidx);
3270 nused = maxidx - minidx + 1;
3271 if( nused > realarray->valssize )
3277 newvalssize =
calcGrowSize(arraygrowinit, arraygrowfac, nused);
3279 nfree = newvalssize - nused;
3280 newfirstidx = minidx - nfree/2;
3281 newfirstidx =
MAX(newfirstidx, 0);
3282 assert(newfirstidx <= minidx);
3283 assert(maxidx < newfirstidx + newvalssize);
3286 if( realarray->firstidx != -1 )
3288 for( i = 0; i < realarray->minusedidx - newfirstidx; ++i )
3292 assert(realarray->maxusedidx - realarray->minusedidx + 1 > 0);
3295 &(realarray->vals[realarray->minusedidx - realarray->firstidx]),
3296 realarray->maxusedidx - realarray->minusedidx + 1);
3297 for( i = realarray->maxusedidx - newfirstidx + 1; i < newvalssize; ++i )
3302 for( i = 0; i < newvalssize; ++i )
3308 realarray->vals = newvals;
3309 realarray->valssize = newvalssize;
3310 realarray->firstidx = newfirstidx;
3312 else if( realarray->firstidx == -1 )
3315 nfree = realarray->valssize - nused;
3317 realarray->firstidx = minidx - nfree/2;
3318 assert(realarray->firstidx <= minidx);
3319 assert(maxidx < realarray->firstidx + realarray->valssize);
3321 for( i = 0; i < realarray->valssize; ++i )
3322 assert(realarray->vals[i] == 0.0);
3325 else if( minidx < realarray->firstidx )
3328 nfree = realarray->valssize - nused;
3330 newfirstidx = minidx - nfree/2;
3331 newfirstidx =
MAX(newfirstidx, 0);
3332 assert(newfirstidx <= minidx);
3333 assert(maxidx < newfirstidx + realarray->valssize);
3335 if( realarray->minusedidx <= realarray->maxusedidx )
3339 assert(realarray->firstidx <= realarray->minusedidx);
3340 assert(realarray->maxusedidx < realarray->firstidx + realarray->valssize);
3343 shift = realarray->firstidx - newfirstidx;
3345 for( i = realarray->maxusedidx - realarray->firstidx; i >= realarray->minusedidx - realarray->firstidx; --i )
3347 assert(0 <= i + shift && i + shift < realarray->valssize);
3348 realarray->vals[i + shift] = realarray->vals[i];
3351 for( i = 0; i < shift; ++i )
3352 realarray->vals[realarray->minusedidx - realarray->firstidx + i] = 0.0;
3354 realarray->firstidx = newfirstidx;
3356 else if( maxidx >= realarray->firstidx + realarray->valssize )
3359 nfree = realarray->valssize - nused;
3361 newfirstidx = minidx - nfree/2;
3362 newfirstidx =
MAX(newfirstidx, 0);
3363 assert(newfirstidx <= minidx);
3364 assert(maxidx < newfirstidx + realarray->valssize);
3366 if( realarray->minusedidx <= realarray->maxusedidx )
3370 assert(realarray->firstidx <= realarray->minusedidx);
3371 assert(realarray->maxusedidx < realarray->firstidx + realarray->valssize);
3374 shift = newfirstidx - realarray->firstidx;
3376 for( i = realarray->minusedidx - realarray->firstidx; i <= realarray->maxusedidx - realarray->firstidx; ++i )
3378 assert(0 <= i - shift && i - shift < realarray->valssize);
3379 realarray->vals[i - shift] = realarray->vals[i];
3382 for( i = 0; i < shift; ++i )
3383 realarray->vals[realarray->maxusedidx - realarray->firstidx - i] = 0.0;
3385 realarray->firstidx = newfirstidx;
3388 assert(minidx >= realarray->firstidx);
3389 assert(maxidx < realarray->firstidx + realarray->valssize);
3399 assert(realarray !=
NULL);
3401 SCIPdebugMessage(
"clearing realarray %p (firstidx=%d, size=%d, range=[%d,%d])\n",
3402 (
void*)realarray, realarray->
firstidx, realarray->valssize, realarray->minusedidx, realarray->maxusedidx);
3404 if( realarray->minusedidx <= realarray->maxusedidx )
3406 assert(realarray->firstidx <= realarray->minusedidx);
3407 assert(realarray->maxusedidx < realarray->firstidx + realarray->valssize);
3408 assert(realarray->firstidx != -1);
3409 assert(realarray->valssize > 0);
3413 realarray->maxusedidx - realarray->minusedidx + 1);
3416 realarray->minusedidx = INT_MAX;
3417 realarray->maxusedidx = INT_MIN;
3419 assert(realarray->minusedidx == INT_MAX);
3420 assert(realarray->maxusedidx == INT_MIN);
3431 assert(realarray !=
NULL);
3434 if( idx < realarray->minusedidx || idx > realarray->
maxusedidx )
3439 assert(idx - realarray->
firstidx >= 0);
3455 assert(realarray !=
NULL);
3458 SCIPdebugMessage(
"setting realarray %p (firstidx=%d, size=%d, range=[%d,%d]) index %d to %g\n",
3459 (
void*)realarray, realarray->
firstidx, realarray->valssize, realarray->minusedidx, realarray->maxusedidx, idx, val);
3465 assert(idx >= realarray->firstidx);
3466 assert(idx < realarray->firstidx + realarray->valssize);
3469 realarray->vals[idx - realarray->firstidx] = val;
3472 realarray->minusedidx =
MIN(realarray->minusedidx, idx);
3473 realarray->maxusedidx =
MAX(realarray->maxusedidx, idx);
3475 else if( idx >= realarray->firstidx && idx < realarray->firstidx + realarray->valssize )
3478 realarray->vals[idx - realarray->firstidx] = 0.0;
3481 if( idx == realarray->minusedidx )
3483 assert(realarray->maxusedidx >= 0);
3484 assert(realarray->maxusedidx < realarray->firstidx + realarray->valssize);
3487 realarray->minusedidx++;
3489 while( realarray->minusedidx <= realarray->maxusedidx
3490 && realarray->vals[realarray->minusedidx - realarray->firstidx] == 0.0 );
3492 if( realarray->minusedidx > realarray->maxusedidx )
3494 realarray->minusedidx = INT_MAX;
3495 realarray->maxusedidx = INT_MIN;
3498 else if( idx == realarray->maxusedidx )
3500 assert(realarray->minusedidx >= 0);
3501 assert(realarray->minusedidx < realarray->maxusedidx);
3502 assert(realarray->maxusedidx < realarray->firstidx + realarray->valssize);
3505 realarray->maxusedidx--;
3506 assert(realarray->minusedidx <= realarray->maxusedidx);
3508 while( realarray->vals[realarray->maxusedidx - realarray->firstidx] == 0.0 );
3538 assert(realarray !=
NULL);
3548 assert(realarray !=
NULL);
3559 assert(intarray !=
NULL);
3560 assert(blkmem !=
NULL);
3563 (*intarray)->blkmem = blkmem;
3564 (*intarray)->vals =
NULL;
3565 (*intarray)->valssize = 0;
3566 (*intarray)->firstidx = -1;
3567 (*intarray)->minusedidx = INT_MAX;
3568 (*intarray)->maxusedidx = INT_MIN;
3580 assert(intarray !=
NULL);
3581 assert(sourceintarray !=
NULL);
3588 (*intarray)->valssize = sourceintarray->
valssize;
3589 (*intarray)->firstidx = sourceintarray->
firstidx;
3590 (*intarray)->minusedidx = sourceintarray->
minusedidx;
3591 (*intarray)->maxusedidx = sourceintarray->
maxusedidx;
3601 assert(intarray !=
NULL);
3602 assert(*intarray !=
NULL);
3624 assert(intarray !=
NULL);
3629 assert(0 <= minidx);
3630 assert(minidx <= maxidx);
3634 assert(0 <= minidx);
3635 assert(minidx <= maxidx);
3637 SCIPdebugMessage(
"extending intarray %p (firstidx=%d, size=%d, range=[%d,%d]) to range [%d,%d]\n",
3638 (
void*)intarray, intarray->
firstidx, intarray->valssize, intarray->minusedidx, intarray->maxusedidx, minidx, maxidx);
3641 nused = maxidx - minidx + 1;
3642 if( nused > intarray->valssize )
3648 newvalssize =
calcGrowSize(arraygrowinit, arraygrowfac, nused);
3650 nfree = newvalssize - nused;
3651 newfirstidx = minidx - nfree/2;
3652 newfirstidx =
MAX(newfirstidx, 0);
3653 assert(newfirstidx <= minidx);
3654 assert(maxidx < newfirstidx + newvalssize);
3657 if( intarray->firstidx != -1 )
3659 for( i = 0; i < intarray->minusedidx - newfirstidx; ++i )
3663 assert(intarray->maxusedidx - intarray->minusedidx + 1 > 0);
3666 &intarray->vals[intarray->minusedidx - intarray->firstidx],
3667 intarray->maxusedidx - intarray->minusedidx + 1);
3668 for( i = intarray->maxusedidx - newfirstidx + 1; i < newvalssize; ++i )
3673 for( i = 0; i < newvalssize; ++i )
3679 intarray->vals = newvals;
3680 intarray->valssize = newvalssize;
3681 intarray->firstidx = newfirstidx;
3683 else if( intarray->firstidx == -1 )
3686 nfree = intarray->valssize - nused;
3688 intarray->firstidx = minidx - nfree/2;
3689 assert(intarray->firstidx <= minidx);
3690 assert(maxidx < intarray->firstidx + intarray->valssize);
3692 for( i = 0; i < intarray->valssize; ++i )
3693 assert(intarray->vals[i] == 0);
3696 else if( minidx < intarray->firstidx )
3699 nfree = intarray->valssize - nused;
3701 newfirstidx = minidx - nfree/2;
3702 newfirstidx =
MAX(newfirstidx, 0);
3703 assert(newfirstidx <= minidx);
3704 assert(maxidx < newfirstidx + intarray->valssize);
3706 if( intarray->minusedidx <= intarray->maxusedidx )
3710 assert(intarray->firstidx <= intarray->minusedidx);
3711 assert(intarray->maxusedidx < intarray->firstidx + intarray->valssize);
3714 shift = intarray->firstidx - newfirstidx;
3716 for( i = intarray->maxusedidx - intarray->firstidx; i >= intarray->minusedidx - intarray->firstidx; --i )
3718 assert(0 <= i + shift && i + shift < intarray->valssize);
3719 intarray->vals[i + shift] = intarray->vals[i];
3722 for( i = 0; i < shift; ++i )
3723 intarray->vals[intarray->minusedidx - intarray->firstidx + i] = 0;
3725 intarray->firstidx = newfirstidx;
3727 else if( maxidx >= intarray->firstidx + intarray->valssize )
3730 nfree = intarray->valssize - nused;
3732 newfirstidx = minidx - nfree/2;
3733 newfirstidx =
MAX(newfirstidx, 0);
3734 assert(newfirstidx <= minidx);
3735 assert(maxidx < newfirstidx + intarray->valssize);
3737 if( intarray->minusedidx <= intarray->maxusedidx )
3741 assert(intarray->firstidx <= intarray->minusedidx);
3742 assert(intarray->maxusedidx < intarray->firstidx + intarray->valssize);
3745 shift = newfirstidx - intarray->firstidx;
3747 for( i = intarray->minusedidx - intarray->firstidx; i <= intarray->maxusedidx - intarray->firstidx; ++i )
3749 assert(0 <= i - shift && i - shift < intarray->valssize);
3750 intarray->vals[i - shift] = intarray->vals[i];
3753 for( i = 0; i < shift; ++i )
3754 intarray->vals[intarray->maxusedidx - intarray->firstidx - i] = 0;
3756 intarray->firstidx = newfirstidx;
3759 assert(minidx >= intarray->firstidx);
3760 assert(maxidx < intarray->firstidx + intarray->valssize);
3770 assert(intarray !=
NULL);
3772 SCIPdebugMessage(
"clearing intarray %p (firstidx=%d, size=%d, range=[%d,%d])\n",
3773 (
void*)intarray, intarray->
firstidx, intarray->valssize, intarray->minusedidx, intarray->maxusedidx);
3775 if( intarray->minusedidx <= intarray->maxusedidx )
3777 assert(intarray->firstidx <= intarray->minusedidx);
3778 assert(intarray->maxusedidx < intarray->firstidx + intarray->valssize);
3779 assert(intarray->firstidx != -1);
3780 assert(intarray->valssize > 0);
3784 intarray->maxusedidx - intarray->minusedidx + 1);
3787 intarray->minusedidx = INT_MAX;
3788 intarray->maxusedidx = INT_MIN;
3790 assert(intarray->minusedidx == INT_MAX);
3791 assert(intarray->maxusedidx == INT_MIN);
3802 assert(intarray !=
NULL);
3805 if( idx < intarray->minusedidx || idx > intarray->
maxusedidx )
3810 assert(idx - intarray->
firstidx >= 0);
3826 assert(intarray !=
NULL);
3829 SCIPdebugMessage(
"setting intarray %p (firstidx=%d, size=%d, range=[%d,%d]) index %d to %d\n",
3830 (
void*)intarray, intarray->
firstidx, intarray->valssize, intarray->minusedidx, intarray->maxusedidx, idx, val);
3836 assert(idx >= intarray->firstidx);
3837 assert(idx < intarray->firstidx + intarray->valssize);
3840 intarray->vals[idx - intarray->firstidx] = val;
3843 intarray->minusedidx =
MIN(intarray->minusedidx, idx);
3844 intarray->maxusedidx =
MAX(intarray->maxusedidx, idx);
3846 else if( idx >= intarray->firstidx && idx < intarray->firstidx + intarray->valssize )
3849 intarray->vals[idx - intarray->firstidx] = 0;
3852 if( idx == intarray->minusedidx )
3854 assert(intarray->maxusedidx >= 0);
3855 assert(intarray->maxusedidx < intarray->firstidx + intarray->valssize);
3858 intarray->minusedidx++;
3860 while( intarray->minusedidx <= intarray->maxusedidx
3861 && intarray->vals[intarray->minusedidx - intarray->firstidx] == 0 );
3862 if( intarray->minusedidx > intarray->maxusedidx )
3864 intarray->minusedidx = INT_MAX;
3865 intarray->maxusedidx = INT_MIN;
3868 else if( idx == intarray->maxusedidx )
3870 assert(intarray->minusedidx >= 0);
3871 assert(intarray->minusedidx < intarray->maxusedidx);
3872 assert(intarray->maxusedidx < intarray->firstidx + intarray->valssize);
3875 intarray->maxusedidx--;
3876 assert(intarray->minusedidx <= intarray->maxusedidx);
3878 while( intarray->vals[intarray->maxusedidx - intarray->firstidx] == 0 );
3902 assert(intarray !=
NULL);
3912 assert(intarray !=
NULL);
3924 assert(boolarray !=
NULL);
3925 assert(blkmem !=
NULL);
3928 (*boolarray)->blkmem = blkmem;
3929 (*boolarray)->vals =
NULL;
3930 (*boolarray)->valssize = 0;
3931 (*boolarray)->firstidx = -1;
3932 (*boolarray)->minusedidx = INT_MAX;
3933 (*boolarray)->maxusedidx = INT_MIN;
3945 assert(boolarray !=
NULL);
3946 assert(sourceboolarray !=
NULL);
3949 if( sourceboolarray->
valssize > 0 )
3954 (*boolarray)->valssize = sourceboolarray->
valssize;
3955 (*boolarray)->firstidx = sourceboolarray->
firstidx;
3956 (*boolarray)->minusedidx = sourceboolarray->
minusedidx;
3957 (*boolarray)->maxusedidx = sourceboolarray->
maxusedidx;
3967 assert(boolarray !=
NULL);
3968 assert(*boolarray !=
NULL);
3990 assert(boolarray !=
NULL);
3995 assert(0 <= minidx);
3996 assert(minidx <= maxidx);
4000 assert(0 <= minidx);
4001 assert(minidx <= maxidx);
4003 SCIPdebugMessage(
"extending boolarray %p (firstidx=%d, size=%d, range=[%d,%d]) to range [%d,%d]\n",
4004 (
void*)boolarray, boolarray->
firstidx, boolarray->valssize, boolarray->minusedidx, boolarray->maxusedidx, minidx, maxidx);
4007 nused = maxidx - minidx + 1;
4008 if( nused > boolarray->valssize )
4014 newvalssize =
calcGrowSize(arraygrowinit, arraygrowfac, nused);
4016 nfree = newvalssize - nused;
4017 newfirstidx = minidx - nfree/2;
4018 newfirstidx =
MAX(newfirstidx, 0);
4019 assert(newfirstidx <= minidx);
4020 assert(maxidx < newfirstidx + newvalssize);
4023 if( boolarray->firstidx != -1 )
4025 for( i = 0; i < boolarray->minusedidx - newfirstidx; ++i )
4029 assert(boolarray->maxusedidx - boolarray->minusedidx + 1 > 0);
4032 &boolarray->vals[boolarray->minusedidx - boolarray->firstidx],
4033 boolarray->maxusedidx - boolarray->minusedidx + 1);
4034 for( i = boolarray->maxusedidx - newfirstidx + 1; i < newvalssize; ++i )
4039 for( i = 0; i < newvalssize; ++i )
4045 boolarray->vals = newvals;
4046 boolarray->valssize = newvalssize;
4047 boolarray->firstidx = newfirstidx;
4049 else if( boolarray->firstidx == -1 )
4052 nfree = boolarray->valssize - nused;
4054 boolarray->firstidx = minidx - nfree/2;
4055 assert(boolarray->firstidx <= minidx);
4056 assert(maxidx < boolarray->firstidx + boolarray->valssize);
4058 for( i = 0; i < boolarray->valssize; ++i )
4059 assert(boolarray->vals[i] ==
FALSE);
4062 else if( minidx < boolarray->firstidx )
4065 nfree = boolarray->valssize - nused;
4067 newfirstidx = minidx - nfree/2;
4068 newfirstidx =
MAX(newfirstidx, 0);
4069 assert(newfirstidx <= minidx);
4070 assert(maxidx < newfirstidx + boolarray->valssize);
4072 if( boolarray->minusedidx <= boolarray->maxusedidx )
4076 assert(boolarray->firstidx <= boolarray->minusedidx);
4077 assert(boolarray->maxusedidx < boolarray->firstidx + boolarray->valssize);
4080 shift = boolarray->firstidx - newfirstidx;
4082 for( i = boolarray->maxusedidx - boolarray->firstidx; i >= boolarray->minusedidx - boolarray->firstidx; --i )
4084 assert(0 <= i + shift && i + shift < boolarray->valssize);
4085 boolarray->vals[i + shift] = boolarray->vals[i];
4088 for( i = 0; i < shift; ++i )
4089 boolarray->vals[boolarray->minusedidx - boolarray->firstidx + i] =
FALSE;
4091 boolarray->firstidx = newfirstidx;
4093 else if( maxidx >= boolarray->firstidx + boolarray->valssize )
4096 nfree = boolarray->valssize - nused;
4098 newfirstidx = minidx - nfree/2;
4099 newfirstidx =
MAX(newfirstidx, 0);
4100 assert(newfirstidx <= minidx);
4101 assert(maxidx < newfirstidx + boolarray->valssize);
4103 if( boolarray->minusedidx <= boolarray->maxusedidx )
4107 assert(boolarray->firstidx <= boolarray->minusedidx);
4108 assert(boolarray->maxusedidx < boolarray->firstidx + boolarray->valssize);
4111 shift = newfirstidx - boolarray->firstidx;
4114 assert(0 <= boolarray->minusedidx - boolarray->firstidx - shift);
4115 assert(boolarray->maxusedidx - boolarray->firstidx - shift < boolarray->valssize);
4116 BMSmoveMemoryArray(&(boolarray->vals[boolarray->minusedidx - boolarray->firstidx - shift]),
4117 &(boolarray->vals[boolarray->minusedidx - boolarray->firstidx]),
4118 boolarray->maxusedidx - boolarray->minusedidx + 1);
4121 for( i = 0; i < shift; ++i )
4122 boolarray->vals[boolarray->maxusedidx - boolarray->firstidx - i] =
FALSE;
4124 boolarray->firstidx = newfirstidx;
4127 assert(minidx >= boolarray->firstidx);
4128 assert(maxidx < boolarray->firstidx + boolarray->valssize);
4138 assert(boolarray !=
NULL);
4140 SCIPdebugMessage(
"clearing boolarray %p (firstidx=%d, size=%d, range=[%d,%d])\n",
4141 (
void*)boolarray, boolarray->
firstidx, boolarray->valssize, boolarray->minusedidx, boolarray->maxusedidx);
4143 if( boolarray->minusedidx <= boolarray->maxusedidx )
4145 assert(boolarray->firstidx <= boolarray->minusedidx);
4146 assert(boolarray->maxusedidx < boolarray->firstidx + boolarray->valssize);
4147 assert(boolarray->firstidx != -1);
4148 assert(boolarray->valssize > 0);
4152 boolarray->maxusedidx - boolarray->minusedidx + 1);
4155 boolarray->minusedidx = INT_MAX;
4156 boolarray->maxusedidx = INT_MIN;
4158 assert(boolarray->minusedidx == INT_MAX);
4159 assert(boolarray->maxusedidx == INT_MIN);
4170 assert(boolarray !=
NULL);
4173 if( idx < boolarray->minusedidx || idx > boolarray->
maxusedidx )
4178 assert(idx - boolarray->
firstidx >= 0);
4194 assert(boolarray !=
NULL);
4197 SCIPdebugMessage(
"setting boolarray %p (firstidx=%d, size=%d, range=[%d,%d]) index %d to %u\n",
4198 (
void*)boolarray, boolarray->
firstidx, boolarray->valssize, boolarray->minusedidx, boolarray->maxusedidx, idx, val);
4204 assert(idx >= boolarray->firstidx);
4205 assert(idx < boolarray->firstidx + boolarray->valssize);
4208 boolarray->vals[idx - boolarray->firstidx] = val;
4211 boolarray->minusedidx =
MIN(boolarray->minusedidx, idx);
4212 boolarray->maxusedidx =
MAX(boolarray->maxusedidx, idx);
4214 else if( idx >= boolarray->firstidx && idx < boolarray->firstidx + boolarray->valssize )
4217 boolarray->vals[idx - boolarray->firstidx] =
FALSE;
4220 if( idx == boolarray->minusedidx )
4222 assert(boolarray->maxusedidx >= 0);
4223 assert(boolarray->maxusedidx < boolarray->firstidx + boolarray->valssize);
4226 boolarray->minusedidx++;
4228 while( boolarray->minusedidx <= boolarray->maxusedidx
4229 && boolarray->vals[boolarray->minusedidx - boolarray->firstidx] ==
FALSE );
4230 if( boolarray->minusedidx > boolarray->maxusedidx )
4232 boolarray->minusedidx = INT_MAX;
4233 boolarray->maxusedidx = INT_MIN;
4236 else if( idx == boolarray->maxusedidx )
4238 assert(boolarray->minusedidx >= 0);
4239 assert(boolarray->minusedidx < boolarray->maxusedidx);
4240 assert(boolarray->maxusedidx < boolarray->firstidx + boolarray->valssize);
4243 boolarray->maxusedidx--;
4244 assert(boolarray->minusedidx <= boolarray->maxusedidx);
4246 while( boolarray->vals[boolarray->maxusedidx - boolarray->firstidx] ==
FALSE );
4258 assert(boolarray !=
NULL);
4268 assert(boolarray !=
NULL);
4280 assert(ptrarray !=
NULL);
4281 assert(blkmem !=
NULL);
4284 (*ptrarray)->blkmem = blkmem;
4285 (*ptrarray)->vals =
NULL;
4286 (*ptrarray)->valssize = 0;
4287 (*ptrarray)->firstidx = -1;
4288 (*ptrarray)->minusedidx = INT_MAX;
4289 (*ptrarray)->maxusedidx = INT_MIN;
4301 assert(ptrarray !=
NULL);
4302 assert(sourceptrarray !=
NULL);
4309 (*ptrarray)->valssize = sourceptrarray->
valssize;
4310 (*ptrarray)->firstidx = sourceptrarray->
firstidx;
4311 (*ptrarray)->minusedidx = sourceptrarray->
minusedidx;
4312 (*ptrarray)->maxusedidx = sourceptrarray->
maxusedidx;
4322 assert(ptrarray !=
NULL);
4323 assert(*ptrarray !=
NULL);
4345 assert(ptrarray !=
NULL);
4350 assert(0 <= minidx);
4351 assert(minidx <= maxidx);
4355 assert(0 <= minidx);
4356 assert(minidx <= maxidx);
4358 SCIPdebugMessage(
"extending ptrarray %p (firstidx=%d, size=%d, range=[%d,%d]) to range [%d,%d]\n",
4359 (
void*)ptrarray, ptrarray->
firstidx, ptrarray->valssize, ptrarray->minusedidx, ptrarray->maxusedidx, minidx, maxidx);
4362 nused = maxidx - minidx + 1;
4363 if( nused > ptrarray->valssize )
4369 newvalssize =
calcGrowSize(arraygrowinit, arraygrowfac, nused);
4371 nfree = newvalssize - nused;
4372 newfirstidx = minidx - nfree/2;
4373 newfirstidx =
MAX(newfirstidx, 0);
4374 assert(newfirstidx <= minidx);
4375 assert(maxidx < newfirstidx + newvalssize);
4378 if( ptrarray->firstidx != -1 )
4380 for( i = 0; i < ptrarray->minusedidx - newfirstidx; ++i )
4384 assert(ptrarray->maxusedidx - ptrarray->minusedidx + 1 > 0);
4387 &(ptrarray->vals[ptrarray->minusedidx - ptrarray->firstidx]),
4388 ptrarray->maxusedidx - ptrarray->minusedidx + 1);
4389 for( i = ptrarray->maxusedidx - newfirstidx + 1; i < newvalssize; ++i )
4394 for( i = 0; i < newvalssize; ++i )
4400 ptrarray->vals = newvals;
4401 ptrarray->valssize = newvalssize;
4402 ptrarray->firstidx = newfirstidx;
4404 else if( ptrarray->firstidx == -1 )
4407 nfree = ptrarray->valssize - nused;
4409 ptrarray->firstidx = minidx - nfree/2;
4410 assert(ptrarray->firstidx <= minidx);
4411 assert(maxidx < ptrarray->firstidx + ptrarray->valssize);
4413 for( i = 0; i < ptrarray->valssize; ++i )
4414 assert(ptrarray->vals[i] ==
NULL);
4417 else if( minidx < ptrarray->firstidx )
4420 nfree = ptrarray->valssize - nused;
4422 newfirstidx = minidx - nfree/2;
4423 newfirstidx =
MAX(newfirstidx, 0);
4424 assert(newfirstidx <= minidx);
4425 assert(maxidx < newfirstidx + ptrarray->valssize);
4427 if( ptrarray->minusedidx <= ptrarray->maxusedidx )
4431 assert(ptrarray->firstidx <= ptrarray->minusedidx);
4432 assert(ptrarray->maxusedidx < ptrarray->firstidx + ptrarray->valssize);
4435 shift = ptrarray->firstidx - newfirstidx;
4437 for( i = ptrarray->maxusedidx - ptrarray->firstidx; i >= ptrarray->minusedidx - ptrarray->firstidx; --i )
4439 assert(0 <= i + shift && i + shift < ptrarray->valssize);
4440 ptrarray->vals[i + shift] = ptrarray->vals[i];
4443 for( i = 0; i < shift; ++i )
4444 ptrarray->vals[ptrarray->minusedidx - ptrarray->firstidx + i] =
NULL;
4446 ptrarray->firstidx = newfirstidx;
4448 else if( maxidx >= ptrarray->firstidx + ptrarray->valssize )
4451 nfree = ptrarray->valssize - nused;
4453 newfirstidx = minidx - nfree/2;
4454 newfirstidx =
MAX(newfirstidx, 0);
4455 assert(newfirstidx <= minidx);
4456 assert(maxidx < newfirstidx + ptrarray->valssize);
4458 if( ptrarray->minusedidx <= ptrarray->maxusedidx )
4462 assert(ptrarray->firstidx <= ptrarray->minusedidx);
4463 assert(ptrarray->maxusedidx < ptrarray->firstidx + ptrarray->valssize);
4466 shift = newfirstidx - ptrarray->firstidx;
4468 for( i = ptrarray->minusedidx - ptrarray->firstidx; i <= ptrarray->maxusedidx - ptrarray->firstidx; ++i )
4470 assert(0 <= i - shift && i - shift < ptrarray->valssize);
4471 ptrarray->vals[i - shift] = ptrarray->vals[i];
4474 for( i = 0; i < shift; ++i )
4475 ptrarray->vals[ptrarray->maxusedidx - ptrarray->firstidx - i] =
NULL;
4477 ptrarray->firstidx = newfirstidx;
4480 assert(minidx >= ptrarray->firstidx);
4481 assert(maxidx < ptrarray->firstidx + ptrarray->valssize);
4491 assert(ptrarray !=
NULL);
4493 SCIPdebugMessage(
"clearing ptrarray %p (firstidx=%d, size=%d, range=[%d,%d])\n",
4494 (
void*)ptrarray, ptrarray->
firstidx, ptrarray->valssize, ptrarray->minusedidx, ptrarray->maxusedidx);
4496 if( ptrarray->minusedidx <= ptrarray->maxusedidx )
4498 assert(ptrarray->firstidx <= ptrarray->minusedidx);
4499 assert(ptrarray->maxusedidx < ptrarray->firstidx + ptrarray->valssize);
4500 assert(ptrarray->firstidx != -1);
4501 assert(ptrarray->valssize > 0);
4505 ptrarray->maxusedidx - ptrarray->minusedidx + 1);
4508 ptrarray->minusedidx = INT_MAX;
4509 ptrarray->maxusedidx = INT_MIN;
4511 assert(ptrarray->minusedidx == INT_MAX);
4512 assert(ptrarray->maxusedidx == INT_MIN);
4523 assert(ptrarray !=
NULL);
4526 if( idx < ptrarray->minusedidx || idx > ptrarray->
maxusedidx )
4531 assert(idx - ptrarray->
firstidx >= 0);
4547 assert(ptrarray !=
NULL);
4550 SCIPdebugMessage(
"setting ptrarray %p (firstidx=%d, size=%d, range=[%d,%d]) index %d to %p\n",
4551 (
void*)ptrarray, ptrarray->
firstidx, ptrarray->valssize, ptrarray->minusedidx, ptrarray->maxusedidx, idx, val);
4557 assert(idx >= ptrarray->firstidx);
4558 assert(idx < ptrarray->firstidx + ptrarray->valssize);
4561 ptrarray->vals[idx - ptrarray->firstidx] = val;
4564 ptrarray->minusedidx =
MIN(ptrarray->minusedidx, idx);
4565 ptrarray->maxusedidx =
MAX(ptrarray->maxusedidx, idx);
4567 else if( idx >= ptrarray->firstidx && idx < ptrarray->firstidx + ptrarray->valssize )
4570 ptrarray->vals[idx - ptrarray->firstidx] =
NULL;
4573 if( idx == ptrarray->minusedidx )
4575 assert(ptrarray->maxusedidx >= 0);
4576 assert(ptrarray->maxusedidx < ptrarray->firstidx + ptrarray->valssize);
4579 ptrarray->minusedidx++;
4581 while( ptrarray->minusedidx <= ptrarray->maxusedidx
4582 && ptrarray->vals[ptrarray->minusedidx - ptrarray->firstidx] ==
NULL );
4583 if( ptrarray->minusedidx > ptrarray->maxusedidx )
4585 ptrarray->minusedidx = INT_MAX;
4586 ptrarray->maxusedidx = INT_MIN;
4589 else if( idx == ptrarray->maxusedidx )
4591 assert(ptrarray->minusedidx >= 0);
4592 assert(ptrarray->minusedidx < ptrarray->maxusedidx);
4593 assert(ptrarray->maxusedidx < ptrarray->firstidx + ptrarray->valssize);
4596 ptrarray->maxusedidx--;
4597 assert(ptrarray->minusedidx <= ptrarray->maxusedidx);
4599 while( ptrarray->vals[ptrarray->maxusedidx - ptrarray->firstidx] ==
NULL );
4611 assert(ptrarray !=
NULL);
4621 assert(ptrarray !=
NULL);
4637 value1 = (int)(
size_t)elem1;
4638 value2 = (int)(
size_t)elem2;
4640 if( value1 < value2 )
4643 if( value2 < value1 )
4661 assert(indcomp !=
NULL);
4662 assert(len == 0 || perm !=
NULL);
4665 for( pos = 0; pos < len; ++pos )
4672 #define SORTTPL_NAMEEXT Ind 4673 #define SORTTPL_KEYTYPE int 4674 #define SORTTPL_INDCOMP 4679 #define SORTTPL_NAMEEXT Ptr 4680 #define SORTTPL_KEYTYPE void* 4681 #define SORTTPL_PTRCOMP 4686 #define SORTTPL_NAMEEXT PtrPtr 4687 #define SORTTPL_KEYTYPE void* 4688 #define SORTTPL_FIELD1TYPE void* 4689 #define SORTTPL_PTRCOMP 4694 #define SORTTPL_NAMEEXT PtrReal 4695 #define SORTTPL_KEYTYPE void* 4696 #define SORTTPL_FIELD1TYPE SCIP_Real 4697 #define SORTTPL_PTRCOMP 4702 #define SORTTPL_NAMEEXT PtrInt 4703 #define SORTTPL_KEYTYPE void* 4704 #define SORTTPL_FIELD1TYPE int 4705 #define SORTTPL_PTRCOMP 4710 #define SORTTPL_NAMEEXT PtrBool 4711 #define SORTTPL_KEYTYPE void* 4712 #define SORTTPL_FIELD1TYPE SCIP_Bool 4713 #define SORTTPL_PTRCOMP 4718 #define SORTTPL_NAMEEXT PtrIntInt 4719 #define SORTTPL_KEYTYPE void* 4720 #define SORTTPL_FIELD1TYPE int 4721 #define SORTTPL_FIELD2TYPE int 4722 #define SORTTPL_PTRCOMP 4727 #define SORTTPL_NAMEEXT PtrRealInt 4728 #define SORTTPL_KEYTYPE void* 4729 #define SORTTPL_FIELD1TYPE SCIP_Real 4730 #define SORTTPL_FIELD2TYPE int 4731 #define SORTTPL_PTRCOMP 4736 #define SORTTPL_NAMEEXT PtrRealBool 4737 #define SORTTPL_KEYTYPE void* 4738 #define SORTTPL_FIELD1TYPE SCIP_Real 4739 #define SORTTPL_FIELD2TYPE SCIP_Bool 4740 #define SORTTPL_PTRCOMP 4745 #define SORTTPL_NAMEEXT PtrPtrInt 4746 #define SORTTPL_KEYTYPE void* 4747 #define SORTTPL_FIELD1TYPE void* 4748 #define SORTTPL_FIELD2TYPE int 4749 #define SORTTPL_PTRCOMP 4754 #define SORTTPL_NAMEEXT PtrPtrReal 4755 #define SORTTPL_KEYTYPE void* 4756 #define SORTTPL_FIELD1TYPE void* 4757 #define SORTTPL_FIELD2TYPE SCIP_Real 4758 #define SORTTPL_PTRCOMP 4763 #define SORTTPL_NAMEEXT PtrRealIntInt 4764 #define SORTTPL_KEYTYPE void* 4765 #define SORTTPL_FIELD1TYPE SCIP_Real 4766 #define SORTTPL_FIELD2TYPE int 4767 #define SORTTPL_FIELD3TYPE int 4768 #define SORTTPL_PTRCOMP 4773 #define SORTTPL_NAMEEXT PtrPtrIntInt 4774 #define SORTTPL_KEYTYPE void* 4775 #define SORTTPL_FIELD1TYPE void* 4776 #define SORTTPL_FIELD2TYPE int 4777 #define SORTTPL_FIELD3TYPE int 4778 #define SORTTPL_PTRCOMP 4783 #define SORTTPL_NAMEEXT PtrPtrRealInt 4784 #define SORTTPL_KEYTYPE void* 4785 #define SORTTPL_FIELD1TYPE void* 4786 #define SORTTPL_FIELD2TYPE SCIP_Real 4787 #define SORTTPL_FIELD3TYPE int 4788 #define SORTTPL_PTRCOMP 4793 #define SORTTPL_NAMEEXT PtrPtrRealBool 4794 #define SORTTPL_KEYTYPE void* 4795 #define SORTTPL_FIELD1TYPE void* 4796 #define SORTTPL_FIELD2TYPE SCIP_Real 4797 #define SORTTPL_FIELD3TYPE SCIP_Bool 4798 #define SORTTPL_PTRCOMP 4803 #define SORTTPL_NAMEEXT PtrPtrLongInt 4804 #define SORTTPL_KEYTYPE void* 4805 #define SORTTPL_FIELD1TYPE void* 4806 #define SORTTPL_FIELD2TYPE SCIP_Longint 4807 #define SORTTPL_FIELD3TYPE int 4808 #define SORTTPL_PTRCOMP 4813 #define SORTTPL_NAMEEXT PtrPtrLongIntInt 4814 #define SORTTPL_KEYTYPE void* 4815 #define SORTTPL_FIELD1TYPE void* 4816 #define SORTTPL_FIELD2TYPE SCIP_Longint 4817 #define SORTTPL_FIELD3TYPE int 4818 #define SORTTPL_FIELD4TYPE int 4819 #define SORTTPL_PTRCOMP 4824 #define SORTTPL_NAMEEXT Real 4825 #define SORTTPL_KEYTYPE SCIP_Real 4830 #define SORTTPL_NAMEEXT RealBoolPtr 4831 #define SORTTPL_KEYTYPE SCIP_Real 4832 #define SORTTPL_FIELD1TYPE SCIP_Bool 4833 #define SORTTPL_FIELD2TYPE void* 4838 #define SORTTPL_NAMEEXT RealPtr 4839 #define SORTTPL_KEYTYPE SCIP_Real 4840 #define SORTTPL_FIELD1TYPE void* 4845 #define SORTTPL_NAMEEXT RealInt 4846 #define SORTTPL_KEYTYPE SCIP_Real 4847 #define SORTTPL_FIELD1TYPE int 4852 #define SORTTPL_NAMEEXT RealIntInt 4853 #define SORTTPL_KEYTYPE SCIP_Real 4854 #define SORTTPL_FIELD1TYPE int 4855 #define SORTTPL_FIELD2TYPE int 4860 #define SORTTPL_NAMEEXT RealIntLong 4861 #define SORTTPL_KEYTYPE SCIP_Real 4862 #define SORTTPL_FIELD1TYPE int 4863 #define SORTTPL_FIELD2TYPE SCIP_Longint 4868 #define SORTTPL_NAMEEXT RealIntPtr 4869 #define SORTTPL_KEYTYPE SCIP_Real 4870 #define SORTTPL_FIELD1TYPE int 4871 #define SORTTPL_FIELD2TYPE void* 4876 #define SORTTPL_NAMEEXT RealRealPtr 4877 #define SORTTPL_KEYTYPE SCIP_Real 4878 #define SORTTPL_FIELD1TYPE SCIP_Real 4879 #define SORTTPL_FIELD2TYPE void* 4884 #define SORTTPL_NAMEEXT RealLongRealInt 4885 #define SORTTPL_KEYTYPE SCIP_Real 4886 #define SORTTPL_FIELD1TYPE SCIP_Longint 4887 #define SORTTPL_FIELD2TYPE SCIP_Real 4888 #define SORTTPL_FIELD3TYPE int 4892 #define SORTTPL_NAMEEXT RealRealIntInt 4893 #define SORTTPL_KEYTYPE SCIP_Real 4894 #define SORTTPL_FIELD1TYPE SCIP_Real 4895 #define SORTTPL_FIELD2TYPE int 4896 #define SORTTPL_FIELD3TYPE int 4901 #define SORTTPL_NAMEEXT RealRealRealInt 4902 #define SORTTPL_KEYTYPE SCIP_Real 4903 #define SORTTPL_FIELD1TYPE SCIP_Real 4904 #define SORTTPL_FIELD2TYPE SCIP_Real 4905 #define SORTTPL_FIELD3TYPE int 4910 #define SORTTPL_NAMEEXT RealRealRealPtr 4911 #define SORTTPL_KEYTYPE SCIP_Real 4912 #define SORTTPL_FIELD1TYPE SCIP_Real 4913 #define SORTTPL_FIELD2TYPE SCIP_Real 4914 #define SORTTPL_FIELD3TYPE void* 4919 #define SORTTPL_NAMEEXT RealPtrPtrInt 4920 #define SORTTPL_KEYTYPE SCIP_Real 4921 #define SORTTPL_FIELD1TYPE void* 4922 #define SORTTPL_FIELD2TYPE void* 4923 #define SORTTPL_FIELD3TYPE int 4928 #define SORTTPL_NAMEEXT RealPtrPtrIntInt 4929 #define SORTTPL_KEYTYPE SCIP_Real 4930 #define SORTTPL_FIELD1TYPE void* 4931 #define SORTTPL_FIELD2TYPE void* 4932 #define SORTTPL_FIELD3TYPE int 4933 #define SORTTPL_FIELD4TYPE int 4938 #define SORTTPL_NAMEEXT RealRealRealBoolPtr 4939 #define SORTTPL_KEYTYPE SCIP_Real 4940 #define SORTTPL_FIELD1TYPE SCIP_Real 4941 #define SORTTPL_FIELD2TYPE SCIP_Real 4942 #define SORTTPL_FIELD3TYPE SCIP_Bool 4943 #define SORTTPL_FIELD4TYPE void* 4948 #define SORTTPL_NAMEEXT RealRealRealBoolBoolPtr 4949 #define SORTTPL_KEYTYPE SCIP_Real 4950 #define SORTTPL_FIELD1TYPE SCIP_Real 4951 #define SORTTPL_FIELD2TYPE SCIP_Real 4952 #define SORTTPL_FIELD3TYPE SCIP_Bool 4953 #define SORTTPL_FIELD4TYPE SCIP_Bool 4954 #define SORTTPL_FIELD5TYPE void* 4959 #define SORTTPL_NAMEEXT Int 4960 #define SORTTPL_KEYTYPE int 4965 #define SORTTPL_NAMEEXT IntInt 4966 #define SORTTPL_KEYTYPE int 4967 #define SORTTPL_FIELD1TYPE int 4972 #define SORTTPL_NAMEEXT IntReal 4973 #define SORTTPL_KEYTYPE int 4974 #define SORTTPL_FIELD1TYPE SCIP_Real 4979 #define SORTTPL_NAMEEXT IntPtr 4980 #define SORTTPL_KEYTYPE int 4981 #define SORTTPL_FIELD1TYPE void* 4986 #define SORTTPL_NAMEEXT IntIntInt 4987 #define SORTTPL_KEYTYPE int 4988 #define SORTTPL_FIELD1TYPE int 4989 #define SORTTPL_FIELD2TYPE int 4994 #define SORTTPL_NAMEEXT IntIntLong 4995 #define SORTTPL_KEYTYPE int 4996 #define SORTTPL_FIELD1TYPE int 4997 #define SORTTPL_FIELD2TYPE SCIP_Longint 5001 #define SORTTPL_NAMEEXT IntRealLong 5002 #define SORTTPL_KEYTYPE int 5003 #define SORTTPL_FIELD1TYPE SCIP_Real 5004 #define SORTTPL_FIELD2TYPE SCIP_Longint 5009 #define SORTTPL_NAMEEXT IntIntPtr 5010 #define SORTTPL_KEYTYPE int 5011 #define SORTTPL_FIELD1TYPE int 5012 #define SORTTPL_FIELD2TYPE void* 5017 #define SORTTPL_NAMEEXT IntIntReal 5018 #define SORTTPL_KEYTYPE int 5019 #define SORTTPL_FIELD1TYPE int 5020 #define SORTTPL_FIELD2TYPE SCIP_Real 5025 #define SORTTPL_NAMEEXT IntPtrReal 5026 #define SORTTPL_KEYTYPE int 5027 #define SORTTPL_FIELD1TYPE void* 5028 #define SORTTPL_FIELD2TYPE SCIP_Real 5033 #define SORTTPL_NAMEEXT IntIntIntPtr 5034 #define SORTTPL_KEYTYPE int 5035 #define SORTTPL_FIELD1TYPE int 5036 #define SORTTPL_FIELD2TYPE int 5037 #define SORTTPL_FIELD3TYPE void* 5041 #define SORTTPL_NAMEEXT IntIntIntReal 5042 #define SORTTPL_KEYTYPE int 5043 #define SORTTPL_FIELD1TYPE int 5044 #define SORTTPL_FIELD2TYPE int 5045 #define SORTTPL_FIELD3TYPE SCIP_Real 5049 #define SORTTPL_NAMEEXT IntPtrIntReal 5050 #define SORTTPL_KEYTYPE int 5051 #define SORTTPL_FIELD1TYPE void* 5052 #define SORTTPL_FIELD2TYPE int 5053 #define SORTTPL_FIELD3TYPE SCIP_Real 5058 #define SORTTPL_NAMEEXT Long 5059 #define SORTTPL_KEYTYPE SCIP_Longint 5064 #define SORTTPL_NAMEEXT LongPtr 5065 #define SORTTPL_KEYTYPE SCIP_Longint 5066 #define SORTTPL_FIELD1TYPE void* 5071 #define SORTTPL_NAMEEXT LongPtrInt 5072 #define SORTTPL_KEYTYPE SCIP_Longint 5073 #define SORTTPL_FIELD1TYPE void* 5074 #define SORTTPL_FIELD2TYPE int 5079 #define SORTTPL_NAMEEXT LongPtrRealBool 5080 #define SORTTPL_KEYTYPE SCIP_Longint 5081 #define SORTTPL_FIELD1TYPE void* 5082 #define SORTTPL_FIELD2TYPE SCIP_Real 5083 #define SORTTPL_FIELD3TYPE SCIP_Bool 5088 #define SORTTPL_NAMEEXT LongPtrRealRealBool 5089 #define SORTTPL_KEYTYPE SCIP_Longint 5090 #define SORTTPL_FIELD1TYPE void* 5091 #define SORTTPL_FIELD2TYPE SCIP_Real 5092 #define SORTTPL_FIELD3TYPE SCIP_Real 5093 #define SORTTPL_FIELD4TYPE SCIP_Bool 5098 #define SORTTPL_NAMEEXT LongPtrRealRealIntBool 5099 #define SORTTPL_KEYTYPE SCIP_Longint 5100 #define SORTTPL_FIELD1TYPE void* 5101 #define SORTTPL_FIELD2TYPE SCIP_Real 5102 #define SORTTPL_FIELD3TYPE SCIP_Real 5103 #define SORTTPL_FIELD4TYPE int 5104 #define SORTTPL_FIELD5TYPE SCIP_Bool 5109 #define SORTTPL_NAMEEXT LongPtrPtrInt 5110 #define SORTTPL_KEYTYPE SCIP_Longint 5111 #define SORTTPL_FIELD1TYPE void* 5112 #define SORTTPL_FIELD2TYPE void* 5113 #define SORTTPL_FIELD3TYPE int 5118 #define SORTTPL_NAMEEXT LongPtrPtrIntInt 5119 #define SORTTPL_KEYTYPE SCIP_Longint 5120 #define SORTTPL_FIELD1TYPE void* 5121 #define SORTTPL_FIELD2TYPE void* 5122 #define SORTTPL_FIELD3TYPE int 5123 #define SORTTPL_FIELD4TYPE int 5128 #define SORTTPL_NAMEEXT LongPtrPtrBoolInt 5129 #define SORTTPL_KEYTYPE SCIP_Longint 5130 #define SORTTPL_FIELD1TYPE void* 5131 #define SORTTPL_FIELD2TYPE void* 5132 #define SORTTPL_FIELD3TYPE SCIP_Bool 5133 #define SORTTPL_FIELD4TYPE int 5138 #define SORTTPL_NAMEEXT PtrIntIntBoolBool 5139 #define SORTTPL_KEYTYPE void* 5140 #define SORTTPL_FIELD1TYPE int 5141 #define SORTTPL_FIELD2TYPE int 5142 #define SORTTPL_FIELD3TYPE SCIP_Bool 5143 #define SORTTPL_FIELD4TYPE SCIP_Bool 5144 #define SORTTPL_PTRCOMP 5149 #define SORTTPL_NAMEEXT IntPtrIntIntBoolBool 5150 #define SORTTPL_KEYTYPE int 5151 #define SORTTPL_FIELD1TYPE void* 5152 #define SORTTPL_FIELD2TYPE int 5153 #define SORTTPL_FIELD3TYPE int 5154 #define SORTTPL_FIELD4TYPE SCIP_Bool 5155 #define SORTTPL_FIELD5TYPE SCIP_Bool 5172 assert(indcomp !=
NULL);
5173 assert(len == 0 || perm !=
NULL);
5176 for( pos = 0; pos < len; ++pos )
5184 #define SORTTPL_NAMEEXT DownInd 5185 #define SORTTPL_KEYTYPE int 5186 #define SORTTPL_INDCOMP 5187 #define SORTTPL_BACKWARDS 5192 #define SORTTPL_NAMEEXT DownPtr 5193 #define SORTTPL_KEYTYPE void* 5194 #define SORTTPL_PTRCOMP 5195 #define SORTTPL_BACKWARDS 5200 #define SORTTPL_NAMEEXT DownPtrPtr 5201 #define SORTTPL_KEYTYPE void* 5202 #define SORTTPL_FIELD1TYPE void* 5203 #define SORTTPL_PTRCOMP 5204 #define SORTTPL_BACKWARDS 5209 #define SORTTPL_NAMEEXT DownPtrReal 5210 #define SORTTPL_KEYTYPE void* 5211 #define SORTTPL_FIELD1TYPE SCIP_Real 5212 #define SORTTPL_PTRCOMP 5213 #define SORTTPL_BACKWARDS 5218 #define SORTTPL_NAMEEXT DownPtrInt 5219 #define SORTTPL_KEYTYPE void* 5220 #define SORTTPL_FIELD1TYPE int 5221 #define SORTTPL_PTRCOMP 5222 #define SORTTPL_BACKWARDS 5226 #define SORTTPL_NAMEEXT DownPtrBool 5227 #define SORTTPL_KEYTYPE void* 5228 #define SORTTPL_FIELD1TYPE SCIP_Bool 5229 #define SORTTPL_PTRCOMP 5230 #define SORTTPL_BACKWARDS 5234 #define SORTTPL_NAMEEXT DownPtrIntInt 5235 #define SORTTPL_KEYTYPE void* 5236 #define SORTTPL_FIELD1TYPE int 5237 #define SORTTPL_FIELD2TYPE int 5238 #define SORTTPL_PTRCOMP 5239 #define SORTTPL_BACKWARDS 5244 #define SORTTPL_NAMEEXT DownPtrRealInt 5245 #define SORTTPL_KEYTYPE void* 5246 #define SORTTPL_FIELD1TYPE SCIP_Real 5247 #define SORTTPL_FIELD2TYPE int 5248 #define SORTTPL_PTRCOMP 5249 #define SORTTPL_BACKWARDS 5254 #define SORTTPL_NAMEEXT DownPtrRealBool 5255 #define SORTTPL_KEYTYPE void* 5256 #define SORTTPL_FIELD1TYPE SCIP_Real 5257 #define SORTTPL_FIELD2TYPE SCIP_Bool 5258 #define SORTTPL_PTRCOMP 5259 #define SORTTPL_BACKWARDS 5264 #define SORTTPL_NAMEEXT DownPtrPtrInt 5265 #define SORTTPL_KEYTYPE void* 5266 #define SORTTPL_FIELD1TYPE void* 5267 #define SORTTPL_FIELD2TYPE int 5268 #define SORTTPL_PTRCOMP 5269 #define SORTTPL_BACKWARDS 5274 #define SORTTPL_NAMEEXT DownPtrPtrReal 5275 #define SORTTPL_KEYTYPE void* 5276 #define SORTTPL_FIELD1TYPE void* 5277 #define SORTTPL_FIELD2TYPE SCIP_Real 5278 #define SORTTPL_PTRCOMP 5279 #define SORTTPL_BACKWARDS 5284 #define SORTTPL_NAMEEXT DownPtrRealIntInt 5285 #define SORTTPL_KEYTYPE void* 5286 #define SORTTPL_FIELD1TYPE SCIP_Real 5287 #define SORTTPL_FIELD2TYPE int 5288 #define SORTTPL_FIELD3TYPE int 5289 #define SORTTPL_PTRCOMP 5290 #define SORTTPL_BACKWARDS 5295 #define SORTTPL_NAMEEXT DownPtrPtrIntInt 5296 #define SORTTPL_KEYTYPE void* 5297 #define SORTTPL_FIELD1TYPE void* 5298 #define SORTTPL_FIELD2TYPE int 5299 #define SORTTPL_FIELD3TYPE int 5300 #define SORTTPL_PTRCOMP 5301 #define SORTTPL_BACKWARDS 5306 #define SORTTPL_NAMEEXT DownPtrPtrRealInt 5307 #define SORTTPL_KEYTYPE void* 5308 #define SORTTPL_FIELD1TYPE void* 5309 #define SORTTPL_FIELD2TYPE SCIP_Real 5310 #define SORTTPL_FIELD3TYPE int 5311 #define SORTTPL_PTRCOMP 5312 #define SORTTPL_BACKWARDS 5317 #define SORTTPL_NAMEEXT DownPtrPtrRealBool 5318 #define SORTTPL_KEYTYPE void* 5319 #define SORTTPL_FIELD1TYPE void* 5320 #define SORTTPL_FIELD2TYPE SCIP_Real 5321 #define SORTTPL_FIELD3TYPE SCIP_Bool 5322 #define SORTTPL_PTRCOMP 5323 #define SORTTPL_BACKWARDS 5328 #define SORTTPL_NAMEEXT DownPtrPtrLongInt 5329 #define SORTTPL_KEYTYPE void* 5330 #define SORTTPL_FIELD1TYPE void* 5331 #define SORTTPL_FIELD2TYPE SCIP_Longint 5332 #define SORTTPL_FIELD3TYPE int 5333 #define SORTTPL_PTRCOMP 5334 #define SORTTPL_BACKWARDS 5339 #define SORTTPL_NAMEEXT DownPtrPtrLongIntInt 5340 #define SORTTPL_KEYTYPE void* 5341 #define SORTTPL_FIELD1TYPE void* 5342 #define SORTTPL_FIELD2TYPE SCIP_Longint 5343 #define SORTTPL_FIELD3TYPE int 5344 #define SORTTPL_FIELD4TYPE int 5345 #define SORTTPL_PTRCOMP 5346 #define SORTTPL_BACKWARDS 5351 #define SORTTPL_NAMEEXT DownReal 5352 #define SORTTPL_KEYTYPE SCIP_Real 5353 #define SORTTPL_BACKWARDS 5358 #define SORTTPL_NAMEEXT DownRealBoolPtr 5359 #define SORTTPL_KEYTYPE SCIP_Real 5360 #define SORTTPL_FIELD1TYPE SCIP_Bool 5361 #define SORTTPL_FIELD2TYPE void* 5362 #define SORTTPL_BACKWARDS 5367 #define SORTTPL_NAMEEXT DownRealPtr 5368 #define SORTTPL_KEYTYPE SCIP_Real 5369 #define SORTTPL_FIELD1TYPE void* 5370 #define SORTTPL_BACKWARDS 5375 #define SORTTPL_NAMEEXT DownRealInt 5376 #define SORTTPL_KEYTYPE SCIP_Real 5377 #define SORTTPL_FIELD1TYPE int 5378 #define SORTTPL_BACKWARDS 5383 #define SORTTPL_NAMEEXT DownRealIntLong 5384 #define SORTTPL_KEYTYPE SCIP_Real 5385 #define SORTTPL_FIELD1TYPE int 5386 #define SORTTPL_FIELD2TYPE SCIP_Longint 5387 #define SORTTPL_BACKWARDS 5392 #define SORTTPL_NAMEEXT DownRealIntPtr 5393 #define SORTTPL_KEYTYPE SCIP_Real 5394 #define SORTTPL_FIELD1TYPE int 5395 #define SORTTPL_FIELD2TYPE void* 5396 #define SORTTPL_BACKWARDS 5401 #define SORTTPL_NAMEEXT DownRealPtrPtr 5402 #define SORTTPL_KEYTYPE SCIP_Real 5403 #define SORTTPL_FIELD1TYPE void* 5404 #define SORTTPL_FIELD2TYPE void* 5405 #define SORTTPL_BACKWARDS 5409 #define SORTTPL_NAMEEXT DownRealRealInt 5410 #define SORTTPL_KEYTYPE SCIP_Real 5411 #define SORTTPL_FIELD1TYPE SCIP_Real 5412 #define SORTTPL_FIELD2TYPE int 5413 #define SORTTPL_BACKWARDS 5417 #define SORTTPL_NAMEEXT DownRealRealPtr 5418 #define SORTTPL_KEYTYPE SCIP_Real 5419 #define SORTTPL_FIELD1TYPE SCIP_Real 5420 #define SORTTPL_FIELD2TYPE void* 5421 #define SORTTPL_BACKWARDS 5425 #define SORTTPL_NAMEEXT DownRealRealPtrPtr 5426 #define SORTTPL_KEYTYPE SCIP_Real 5427 #define SORTTPL_FIELD1TYPE SCIP_Real 5428 #define SORTTPL_FIELD2TYPE void* 5429 #define SORTTPL_FIELD3TYPE void* 5430 #define SORTTPL_BACKWARDS 5435 #define SORTTPL_NAMEEXT DownRealLongRealInt 5436 #define SORTTPL_KEYTYPE SCIP_Real 5437 #define SORTTPL_FIELD1TYPE SCIP_Longint 5438 #define SORTTPL_FIELD2TYPE SCIP_Real 5439 #define SORTTPL_FIELD3TYPE int 5440 #define SORTTPL_BACKWARDS 5445 #define SORTTPL_NAMEEXT DownRealRealIntInt 5446 #define SORTTPL_KEYTYPE SCIP_Real 5447 #define SORTTPL_FIELD1TYPE SCIP_Real 5448 #define SORTTPL_FIELD2TYPE int 5449 #define SORTTPL_FIELD3TYPE int 5450 #define SORTTPL_BACKWARDS 5455 #define SORTTPL_NAMEEXT DownRealRealRealInt 5456 #define SORTTPL_KEYTYPE SCIP_Real 5457 #define SORTTPL_FIELD1TYPE SCIP_Real 5458 #define SORTTPL_FIELD2TYPE SCIP_Real 5459 #define SORTTPL_FIELD3TYPE int 5460 #define SORTTPL_BACKWARDS 5465 #define SORTTPL_NAMEEXT DownRealRealRealPtr 5466 #define SORTTPL_KEYTYPE SCIP_Real 5467 #define SORTTPL_FIELD1TYPE SCIP_Real 5468 #define SORTTPL_FIELD2TYPE SCIP_Real 5469 #define SORTTPL_FIELD3TYPE void* 5470 #define SORTTPL_BACKWARDS 5475 #define SORTTPL_NAMEEXT DownRealPtrPtrInt 5476 #define SORTTPL_KEYTYPE SCIP_Real 5477 #define SORTTPL_FIELD1TYPE void* 5478 #define SORTTPL_FIELD2TYPE void* 5479 #define SORTTPL_FIELD3TYPE int 5480 #define SORTTPL_BACKWARDS 5484 #define SORTTPL_NAMEEXT DownRealPtrPtrIntInt 5485 #define SORTTPL_KEYTYPE SCIP_Real 5486 #define SORTTPL_FIELD1TYPE void* 5487 #define SORTTPL_FIELD2TYPE void* 5488 #define SORTTPL_FIELD3TYPE int 5489 #define SORTTPL_FIELD4TYPE int 5490 #define SORTTPL_BACKWARDS 5495 #define SORTTPL_NAMEEXT DownRealRealRealBoolPtr 5496 #define SORTTPL_KEYTYPE SCIP_Real 5497 #define SORTTPL_FIELD1TYPE SCIP_Real 5498 #define SORTTPL_FIELD2TYPE SCIP_Real 5499 #define SORTTPL_FIELD3TYPE SCIP_Bool 5500 #define SORTTPL_FIELD4TYPE void* 5501 #define SORTTPL_BACKWARDS 5506 #define SORTTPL_NAMEEXT DownRealRealRealBoolBoolPtr 5507 #define SORTTPL_KEYTYPE SCIP_Real 5508 #define SORTTPL_FIELD1TYPE SCIP_Real 5509 #define SORTTPL_FIELD2TYPE SCIP_Real 5510 #define SORTTPL_FIELD3TYPE SCIP_Bool 5511 #define SORTTPL_FIELD4TYPE SCIP_Bool 5512 #define SORTTPL_FIELD5TYPE void* 5517 #define SORTTPL_NAMEEXT DownInt 5518 #define SORTTPL_KEYTYPE int 5519 #define SORTTPL_BACKWARDS 5524 #define SORTTPL_NAMEEXT DownIntInt 5525 #define SORTTPL_KEYTYPE int 5526 #define SORTTPL_FIELD1TYPE int 5527 #define SORTTPL_BACKWARDS 5532 #define SORTTPL_NAMEEXT DownIntIntReal 5533 #define SORTTPL_KEYTYPE int 5534 #define SORTTPL_FIELD1TYPE int 5535 #define SORTTPL_FIELD2TYPE SCIP_Real 5536 #define SORTTPL_BACKWARDS 5541 #define SORTTPL_NAMEEXT DownIntReal 5542 #define SORTTPL_KEYTYPE int 5543 #define SORTTPL_FIELD1TYPE SCIP_Real 5544 #define SORTTPL_BACKWARDS 5549 #define SORTTPL_NAMEEXT DownIntPtr 5550 #define SORTTPL_KEYTYPE int 5551 #define SORTTPL_FIELD1TYPE void* 5552 #define SORTTPL_BACKWARDS 5557 #define SORTTPL_NAMEEXT DownIntIntInt 5558 #define SORTTPL_KEYTYPE int 5559 #define SORTTPL_FIELD1TYPE int 5560 #define SORTTPL_FIELD2TYPE int 5561 #define SORTTPL_BACKWARDS 5566 #define SORTTPL_NAMEEXT DownIntIntLong 5567 #define SORTTPL_KEYTYPE int 5568 #define SORTTPL_FIELD1TYPE int 5569 #define SORTTPL_FIELD2TYPE SCIP_Longint 5570 #define SORTTPL_BACKWARDS 5575 #define SORTTPL_NAMEEXT DownIntIntPtr 5576 #define SORTTPL_KEYTYPE int 5577 #define SORTTPL_FIELD1TYPE int 5578 #define SORTTPL_FIELD2TYPE void* 5579 #define SORTTPL_BACKWARDS 5584 #define SORTTPL_NAMEEXT DownIntIntIntPtr 5585 #define SORTTPL_KEYTYPE int 5586 #define SORTTPL_FIELD1TYPE int 5587 #define SORTTPL_FIELD2TYPE int 5588 #define SORTTPL_FIELD3TYPE void* 5589 #define SORTTPL_BACKWARDS 5594 #define SORTTPL_NAMEEXT DownIntPtrIntReal 5595 #define SORTTPL_KEYTYPE int 5596 #define SORTTPL_FIELD1TYPE void* 5597 #define SORTTPL_FIELD2TYPE int 5598 #define SORTTPL_FIELD3TYPE SCIP_Real 5599 #define SORTTPL_BACKWARDS 5604 #define SORTTPL_NAMEEXT DownLong 5605 #define SORTTPL_KEYTYPE SCIP_Longint 5606 #define SORTTPL_BACKWARDS 5611 #define SORTTPL_NAMEEXT DownLongPtr 5612 #define SORTTPL_KEYTYPE SCIP_Longint 5613 #define SORTTPL_FIELD1TYPE void* 5614 #define SORTTPL_BACKWARDS 5619 #define SORTTPL_NAMEEXT DownLongPtrInt 5620 #define SORTTPL_KEYTYPE SCIP_Longint 5621 #define SORTTPL_FIELD1TYPE void* 5622 #define SORTTPL_FIELD2TYPE int 5623 #define SORTTPL_BACKWARDS 5628 #define SORTTPL_NAMEEXT DownLongPtrRealBool 5629 #define SORTTPL_KEYTYPE SCIP_Longint 5630 #define SORTTPL_FIELD1TYPE void* 5631 #define SORTTPL_FIELD2TYPE SCIP_Real 5632 #define SORTTPL_FIELD3TYPE SCIP_Bool 5633 #define SORTTPL_BACKWARDS 5638 #define SORTTPL_NAMEEXT DownLongPtrRealRealBool 5639 #define SORTTPL_KEYTYPE SCIP_Longint 5640 #define SORTTPL_FIELD1TYPE void* 5641 #define SORTTPL_FIELD2TYPE SCIP_Real 5642 #define SORTTPL_FIELD3TYPE SCIP_Real 5643 #define SORTTPL_FIELD4TYPE SCIP_Bool 5644 #define SORTTPL_BACKWARDS 5649 #define SORTTPL_NAMEEXT DownLongPtrRealRealIntBool 5650 #define SORTTPL_KEYTYPE SCIP_Longint 5651 #define SORTTPL_FIELD1TYPE void* 5652 #define SORTTPL_FIELD2TYPE SCIP_Real 5653 #define SORTTPL_FIELD3TYPE SCIP_Real 5654 #define SORTTPL_FIELD4TYPE int 5655 #define SORTTPL_FIELD5TYPE SCIP_Bool 5656 #define SORTTPL_BACKWARDS 5661 #define SORTTPL_NAMEEXT DownLongPtrPtrInt 5662 #define SORTTPL_KEYTYPE SCIP_Longint 5663 #define SORTTPL_FIELD1TYPE void* 5664 #define SORTTPL_FIELD2TYPE void* 5665 #define SORTTPL_FIELD3TYPE int 5666 #define SORTTPL_BACKWARDS 5671 #define SORTTPL_NAMEEXT DownLongPtrPtrIntInt 5672 #define SORTTPL_KEYTYPE SCIP_Longint 5673 #define SORTTPL_FIELD1TYPE void* 5674 #define SORTTPL_FIELD2TYPE void* 5675 #define SORTTPL_FIELD3TYPE int 5676 #define SORTTPL_FIELD4TYPE int 5677 #define SORTTPL_BACKWARDS 5682 #define SORTTPL_NAMEEXT DownLongPtrPtrBoolInt 5683 #define SORTTPL_KEYTYPE SCIP_Longint 5684 #define SORTTPL_FIELD1TYPE void* 5685 #define SORTTPL_FIELD2TYPE void* 5686 #define SORTTPL_FIELD3TYPE SCIP_Bool 5687 #define SORTTPL_FIELD4TYPE int 5688 #define SORTTPL_BACKWARDS 5693 #define SORTTPL_NAMEEXT DownPtrIntIntBoolBool 5694 #define SORTTPL_KEYTYPE void* 5695 #define SORTTPL_FIELD1TYPE int 5696 #define SORTTPL_FIELD2TYPE int 5697 #define SORTTPL_FIELD3TYPE SCIP_Bool 5698 #define SORTTPL_FIELD4TYPE SCIP_Bool 5699 #define SORTTPL_PTRCOMP 5700 #define SORTTPL_BACKWARDS 5705 #define SORTTPL_NAMEEXT DownIntPtrIntIntBoolBool 5706 #define SORTTPL_KEYTYPE int 5707 #define SORTTPL_FIELD1TYPE void* 5708 #define SORTTPL_FIELD2TYPE int 5709 #define SORTTPL_FIELD3TYPE int 5710 #define SORTTPL_FIELD4TYPE SCIP_Bool 5711 #define SORTTPL_FIELD5TYPE SCIP_Bool 5712 #define SORTTPL_BACKWARDS 5727 assert(activity !=
NULL);
5731 (*activity)->var = var;
5732 (*activity)->duration = duration;
5733 (*activity)->demand = demand;
5743 assert(activity !=
NULL);
5744 assert(*activity !=
NULL);
5759 #undef SCIPactivityGetVar 5760 #undef SCIPactivityGetDuration 5761 #undef SCIPactivityGetDemand 5762 #undef SCIPactivityGetEnergy 5769 assert(activity !=
NULL);
5771 return activity->
var;
5779 assert(activity !=
NULL);
5789 assert(activity !=
NULL);
5799 assert(activity !=
NULL);
5816 assert(profile !=
NULL);
5817 assert(capacity > 0);
5821 (*profile)->arraysize = 10;
5826 (*profile)->ntimepoints = 1;
5827 (*profile)->timepoints[0] = 0;
5828 (*profile)->loads[0] = 0;
5829 (*profile)->capacity = capacity;
5839 assert(profile !=
NULL);
5840 assert(*profile !=
NULL);
5875 assert(profile !=
NULL);
5885 assert(profile !=
NULL);
5895 assert(profile !=
NULL);
5905 assert(profile !=
NULL);
5907 return profile->
loads;
5916 assert(profile !=
NULL);
5917 assert(pos >= 0 && pos < profile->ntimepoints);
5928 assert(profile !=
NULL);
5929 assert(pos >= 0 && pos < profile->ntimepoints);
5931 return profile->
loads[pos];
5943 assert(profile !=
NULL);
5944 assert(timepoint >= 0);
5968 if( neededsize <= profile->arraysize )
5989 assert(profile !=
NULL);
5990 assert(timepoint >= 0);
5998 assert(*pos >= 0 && *pos < profile->ntimepoints);
5999 assert(timepoint >= profile->
timepoints[*pos]);
6037 assert(profile !=
NULL);
6040 assert(left < right);
6041 assert(infeasible !=
NULL);
6043 (*infeasible) =
FALSE;
6048 assert(profile->
timepoints[startpos] == left);
6052 assert(profile->
timepoints[endpos] == right);
6054 assert(startpos < endpos);
6058 for( i = startpos; i < endpos; ++i )
6060 profile->
loads[i] += demand;
6067 (*infeasible) =
TRUE;
6071 for( ; i >= startpos; --i )
6072 profile->
loads[i] -= demand;
6093 assert(profile !=
NULL);
6094 assert(left < right);
6095 assert(demand >= 0);
6096 assert(infeasible !=
NULL);
6098 (*infeasible) =
FALSE;
6102 SCIPdebugMessage(
"insert core [%d,%d] with demand %d\n", left, right, demand);
6124 assert(left < right);
6136 SCIPdebugMessage(
"delete core [%d,%d] with demand %d\n", left, right, demand);
6139 assert(!infeasible);
6155 int remainingduration;
6158 assert(profile !=
NULL);
6160 assert(pos < profile->ntimepoints);
6161 assert(duration > 0);
6165 remainingduration = duration;
6167 (*infeasible) =
FALSE;
6171 (*infeasible) =
TRUE;
6175 while( pos < profile->ntimepoints - 1 )
6179 SCIPdebugMessage(
"profile <%p>: core does not fit at time point %d (pos %d)\n", (
void*)profile, profile->
timepoints[pos], pos);
6181 remainingduration = duration;
6183 if( profile->timepoints[startpos] > lst )
6185 (*infeasible) =
TRUE;
6192 if( remainingduration <= 0 )
6216 assert(profile !=
NULL);
6219 assert(duration >= 0);
6220 assert(demand >= 0);
6221 assert(infeasible !=
NULL);
6225 SCIPdebugMessage(
"profile <%p>: find earliest start time (demad %d, duration %d) [%d,%d]\n", (
void*)profile, demand, duration, est, lst);
6227 if( duration == 0 || demand == 0 )
6229 *infeasible =
FALSE;
6234 SCIPdebugMessage(
"profile <%p>: earliest start time does %s exist as time point (pos %d)\n", (
void*)profile, found ?
"" :
"not", pos);
6237 if( pos == profile->ntimepoints - 1 )
6239 (*infeasible) =
FALSE;
6246 assert(profile->timepoints[pos] == est);
6249 assert(pos < profile->ntimepoints);
6250 est = profile->timepoints[pos];
6252 else if( profile->loads[pos] + demand > profile->capacity )
6257 assert(profile->timepoints[pos] <= est);
6260 assert(pos < profile->ntimepoints);
6261 est = profile->timepoints[pos];
6265 int remainingduration;
6269 assert(pos < profile->ntimepoints - 1);
6271 remainingduration = duration - (profile->timepoints[pos+1] - est);
6275 if( remainingduration <= 0 )
6276 (*infeasible) =
FALSE;
6280 SCIPdebugMessage(
"remaining duration can%s be processed\n", *infeasible ?
"not" :
"");
6286 assert(pos < profile->ntimepoints);
6287 est = profile->timepoints[pos];
6306 int remainingduration;
6309 assert(profile !=
NULL);
6311 assert(pos < profile->ntimepoints);
6312 assert(duration > 0);
6317 remainingduration = duration;
6319 (*infeasible) =
TRUE;
6321 if( profile->
timepoints[endpos] < ect - duration )
6328 SCIPdebugMessage(
"profile <%p>: core does not fit at time point %d (pos %d)\n", (
void*)profile, profile->
timepoints[pos-1], pos-1);
6331 remainingduration = duration;
6333 if( profile->timepoints[endpos] < ect - duration )
6339 if( remainingduration <= 0 )
6341 *infeasible =
FALSE;
6368 assert(profile !=
NULL);
6371 assert(duration >= 0);
6372 assert(demand >= 0);
6373 assert(infeasible !=
NULL);
6377 if( duration == 0 || demand == 0 )
6379 *infeasible =
FALSE;
6383 ect = est + duration;
6384 lct = lst + duration;
6387 SCIPdebugMessage(
"profile <%p>: latest completion time %d does %s exist as time point (pos %d)\n", (
void*)profile, lct, found ?
"" :
"not", pos);
6392 assert(profile->timepoints[pos] == lct);
6395 assert(pos < profile->ntimepoints && pos >= 0);
6396 lct = profile->timepoints[pos];
6398 else if( profile->loads[pos] + demand > profile->capacity )
6403 assert(profile->timepoints[pos] < lct);
6406 assert(pos < profile->ntimepoints && pos >= 0);
6407 lct = profile->timepoints[pos];
6411 int remainingduration;
6414 assert(profile->timepoints[pos] < lct);
6416 remainingduration = duration - (lct - profile->timepoints[pos]);
6418 if( remainingduration <= 0 )
6419 (*infeasible) =
FALSE;
6428 assert(pos < profile->ntimepoints && pos >= 0);
6429 lct = profile->timepoints[pos];
6434 return lct - duration;
6447 assert(digraph !=
NULL);
6459 (*digraph)->nnodes =
nnodes;
6462 (*digraph)->ncomponents = 0;
6463 (*digraph)->componentstartsize = 0;
6464 (*digraph)->components =
NULL;
6465 (*digraph)->componentstarts =
NULL;
6479 if( nnodes <= digraph->nnodes )
6490 for( n = digraph->
nnodes; n < nnodes; ++n )
6520 nnodes = sourcedigraph->
nnodes;
6522 (*targetdigraph)->nnodes =
nnodes;
6523 (*targetdigraph)->ncomponents = ncomponents;
6531 for( i = 0; i <
nnodes; ++i )
6544 (*targetdigraph)->nodedata[i] = sourcedigraph->
nodedata[i];
6550 if( ncomponents > 0 )
6556 (*targetdigraph)->componentstartsize = ncomponents + 1;
6560 (*targetdigraph)->components =
NULL;
6561 (*targetdigraph)->componentstarts =
NULL;
6562 (*targetdigraph)->componentstartsize = 0;
6576 assert(digraph !=
NULL);
6577 assert(digraph->
nnodes > 0);
6579 for( i = 0; i < digraph->
nnodes; ++i )
6597 assert(digraph !=
NULL);
6598 assert(*digraph !=
NULL);
6601 for( i = (*digraph)->nnodes - 1; i >= 0; --i )
6606 (*digraph)->nnodes = 0;
6610 assert((*digraph)->ncomponents == 0);
6611 assert((*digraph)->componentstartsize == 0);
6612 assert((*digraph)->components ==
NULL);
6613 assert((*digraph)->componentstarts ==
NULL);
6625 #define STARTSUCCESSORSSIZE 5 6635 assert(digraph !=
NULL);
6637 assert(idx < digraph->
nnodes);
6638 assert(newsize > 0);
6675 assert(digraph !=
NULL);
6676 assert(startnode >= 0);
6677 assert(endnode >= 0);
6678 assert(startnode < digraph->
nnodes);
6679 assert(endnode < digraph->nnodes);
6706 assert(digraph !=
NULL);
6707 assert(startnode >= 0);
6708 assert(endnode >= 0);
6709 assert(startnode < digraph->
nnodes);
6710 assert(endnode < digraph->nnodes);
6715 for( i = 0; i < nsuccessors; ++i )
6716 if( digraph->
successors[startnode][i] == endnode )
6722 digraph->
successors[startnode][nsuccessors] = endnode;
6723 digraph->
arcdata[startnode][nsuccessors] = data;
6736 assert(digraph !=
NULL);
6738 assert(node < digraph->
nnodes);
6750 assert(digraph !=
NULL);
6761 assert(digraph !=
NULL);
6763 assert(node < digraph->
nnodes);
6778 assert(digraph !=
NULL);
6780 assert(node < digraph->
nnodes);
6793 assert(digraph !=
NULL);
6797 for( i = 0; i < digraph->
nnodes; ++i )
6809 assert(digraph !=
NULL);
6811 assert(node < digraph->
nnodes);
6824 assert(digraph !=
NULL);
6826 assert(node < digraph->
nnodes);
6842 assert(digraph !=
NULL);
6844 assert(node < digraph->
nnodes);
6849 return digraph->
arcdata[node];
6860 int* stackadjvisited,
6868 assert(digraph !=
NULL);
6869 assert(startnode >= 0);
6870 assert(startnode < digraph->
nnodes);
6871 assert(visited !=
NULL);
6872 assert(visited[startnode] ==
FALSE);
6873 assert(dfsstack !=
NULL);
6874 assert(dfsnodes !=
NULL);
6875 assert(ndfsnodes !=
NULL);
6878 dfsstack[0] = startnode;
6879 stackadjvisited[0] = 0;
6882 while( stackidx >= 0 )
6888 currnode = dfsstack[stackidx];
6890 sadv = stackadjvisited[stackidx];
6891 assert( 0 <= sadv && sadv <= digraph->nsuccessors[currnode] );
6894 assert( visited[currnode] == (sadv > 0) );
6895 visited[currnode] =
TRUE;
6898 while( sadv < digraph->nsuccessors[currnode] && visited[digraph->
successors[currnode][sadv]] )
6907 dfsnodes[(*ndfsnodes)++] = currnode;
6912 assert( ! visited[digraph->
successors[currnode][sadv]] );
6915 stackadjvisited[stackidx] = sadv + 1;
6919 dfsstack[stackidx] = digraph->
successors[currnode][sadv];
6920 stackadjvisited[stackidx] = 0;
6921 assert( stackidx < digraph->nnodes );
6943 int* ndirectedsuccessors;
6944 int* stackadjvisited;
6954 assert(digraph !=
NULL);
6955 assert(digraph->
nnodes > 0);
6979 for( i = digraph->
nnodes - 1; i >= 0; --i )
6981 for( j = 0; j < ndirectedsuccessors[i]; ++j )
6987 for( v = 0; v < digraph->
nnodes; ++v )
6995 &digraph->
components[compstart], &ndfsnodes);
6998 if( ndfsnodes >= minsize )
7013 if( components !=
NULL )
7028 if( ncomponents !=
NULL )
7057 int* stackadjvisited;
7067 assert(digraph !=
NULL);
7079 for( i = 0; i < ncomps; ++i )
7081 endidx = compstarts[i+1] - 1;
7083 for( j = compstarts[i]; j < compstarts[i+1]; ++j )
7085 if( visited[comps[j]] )
7092 depthFirstSearch(digraph, comps[j], visited, dfsstack, stackadjvisited, dfsnodes, &ndfsnodes);
7094 assert(endidx - ndfsnodes == compstarts[i] - 1);
7099 for( k = 0; k < ndfsnodes; ++k )
7101 digraph->
components[endidx - k] = dfsnodes[k];
7118 assert(digraph !=
NULL);
7135 assert(digraph !=
NULL);
7136 assert(compidx >= 0);
7137 assert(compidx < digraph->ncomponents);
7138 assert(nodes !=
NULL || nnodes !=
NULL);
7142 if( nnodes !=
NULL )
7160 int* strongcomponents,
7163 int* nstrongcomponents,
7164 int* strongcompstartidx,
7170 assert(digraph !=
NULL);
7172 assert(v < digraph->
nnodes);
7173 assert(lowlink !=
NULL);
7174 assert(dfsidx !=
NULL);
7175 assert(stack !=
NULL);
7176 assert(stacksize !=
NULL);
7177 assert(*stacksize >= 0);
7178 assert(*stacksize < digraph->nnodes);
7179 assert(unprocessed !=
NULL);
7180 assert(nodeinstack !=
NULL);
7181 assert(maxdfs !=
NULL);
7182 assert(strongcomponents !=
NULL);
7183 assert(nstrongcomponents !=
NULL);
7184 assert(strongcompstartidx !=
NULL);
7185 assert(nstorednodes !=
NULL);
7186 assert(*nstorednodes >= 0 && *nstorednodes < digraph->nnodes);
7188 dfsidx[v] = *maxdfs;
7189 lowlink[v] = *maxdfs;
7193 stack[*stacksize] = v;
7195 nodeinstack[v] =
TRUE;
7198 unprocessed[v] =
FALSE;
7207 if( unprocessed[w] )
7209 tarjan(digraph, w, lowlink, dfsidx, stack, stacksize, unprocessed, nodeinstack, maxdfs, strongcomponents,
7210 nstrongcomponents, strongcompstartidx, nstorednodes);
7212 assert(lowlink[v] >= 0 && lowlink[v] < digraph->
nnodes);
7213 assert(lowlink[w] >= 0 && lowlink[w] < digraph->
nnodes);
7216 lowlink[v] =
MIN(lowlink[v], lowlink[w]);
7218 else if( nodeinstack[w] )
7220 assert(lowlink[v] >= 0 && lowlink[v] < digraph->
nnodes);
7221 assert(dfsidx[w] >= 0 && dfsidx[w] < digraph->
nnodes);
7224 lowlink[v] =
MIN(lowlink[v], dfsidx[w]);
7229 if( lowlink[v] == dfsidx[v] )
7233 strongcompstartidx[*nstrongcomponents] = *nstorednodes;
7234 *nstrongcomponents += 1;
7238 assert(*stacksize > 0);
7241 w = stack[*stacksize - 1];
7243 nodeinstack[w] =
FALSE;
7246 strongcomponents[*nstorednodes] = w;
7262 int* strongcomponents,
7264 int* strongcompstartidx,
7266 int* nstrongcomponents
7281 assert(digraph !=
NULL);
7282 assert(compidx >= 0);
7283 assert(compidx < digraph->ncomponents);
7284 assert(strongcomponents !=
NULL);
7285 assert(strongcompstartidx !=
NULL);
7286 assert(nstrongcomponents !=
NULL);
7296 for( i = 0; i < digraph->
nnodes; ++i )
7301 unprocessed[i] =
TRUE;
7302 nodeinstack[i] =
FALSE;
7308 *nstrongcomponents = 0;
7311 for( i = digraph->
componentstarts[compidx]; i < digraph->componentstarts[compidx + 1]; ++i )
7316 assert(v >= 0 && v < digraph->
nnodes);
7319 if( unprocessed[v] )
7322 tarjan(digraph, v, lowlink, dfsidx, stack, &stacksize, unprocessed, nodeinstack, &maxdfs,
7323 strongcomponents, nstrongcomponents, strongcompstartidx, &nstorednodes);
7331 assert(*nstrongcomponents < digraph->
nnodes + 1);
7332 strongcompstartidx[*nstrongcomponents] = nstorednodes;
7351 assert(digraph !=
NULL);
7382 for( n = 0; n < digraph->
nnodes; ++n )
7393 for( m = 0; m < nsuccessors ; ++m )
7420 for( n = 0; n < digraph->
nnodes; ++n )
7429 for( n = 0; n < digraph->
nnodes; ++n )
7438 for( m = 0; m < nsuccessors; ++m )
7464 for( i = start; i < end; ++i )
7492 (*node)->parent =
NULL;
7493 (*node)->left =
NULL;
7494 (*node)->right =
NULL;
7495 (*node)->dataptr =
NULL;
7507 assert(tree !=
NULL);
7508 assert(node !=
NULL);
7512 assert((*node)->parent ==
NULL);
7513 assert((*node)->left ==
NULL);
7514 assert((*node)->right ==
NULL);
7517 (*node)->dataptr = dataptr;
7529 assert(tree !=
NULL);
7530 assert(node !=
NULL);
7531 assert(*node !=
NULL);
7533 assert((*node)->left ==
NULL);
7534 assert((*node)->right ==
NULL);
7538 if( (*node)->parent !=
NULL )
7540 assert(*node !=
NULL);
7542 assert((*node)->parent->left == *node || ((*node)->parent->right == *node));
7544 if( (*node)->parent->left == *node )
7546 (*node)->parent->left =
NULL;
7550 assert((*node)->parent->right == *node);
7551 (*node)->parent->right =
NULL;
7556 assert(*node !=
NULL);
7558 assert(*node ==
NULL);
7570 assert(tree !=
NULL);
7571 assert(node !=
NULL);
7572 assert(*node !=
NULL);
7574 if( (*node)->left !=
NULL )
7577 assert((*node)->left ==
NULL);
7580 if( (*node)->right !=
NULL )
7583 assert((*node)->right ==
NULL);
7587 assert(*node ==
NULL);
7598 #undef SCIPbtnodeGetData 7599 #undef SCIPbtnodeGetKey 7600 #undef SCIPbtnodeGetParent 7601 #undef SCIPbtnodeGetLeftchild 7602 #undef SCIPbtnodeGetRightchild 7603 #undef SCIPbtnodeGetSibling 7604 #undef SCIPbtnodeIsRoot 7605 #undef SCIPbtnodeIsLeaf 7606 #undef SCIPbtnodeIsLeftchild 7607 #undef SCIPbtnodeIsRightchild 7614 assert(node !=
NULL);
7624 assert(node !=
NULL);
7634 assert(node !=
NULL);
7644 assert(node !=
NULL);
7658 if( parent ==
NULL )
7674 assert(node !=
NULL);
7684 assert(node !=
NULL);
7734 assert(node !=
NULL);
7748 assert(node !=
NULL);
7762 assert(node !=
NULL);
7776 assert(node !=
NULL);
7778 node->
right = right;
7787 assert(tree !=
NULL);
7788 assert(blkmem !=
NULL);
7791 (*tree)->blkmem = blkmem;
7792 (*tree)->root =
NULL;
7805 assert(tree !=
NULL);
7807 if( (*tree)->root !=
NULL )
7827 assert(node !=
NULL);
7867 assert(root !=
NULL);
7879 #undef SCIPbtIsEmpty 7880 #undef SCIPbtGetRoot 7887 assert(tree !=
NULL);
7897 assert(tree !=
NULL);
7911 assert(tree !=
NULL);
7937 onepluseps = one + eps;
7939 while( onepluseps > one );
7957 while( !(val1 & 1) )
7971 while( !(val1 & 1) )
7979 while( !(val2 & 1) )
7992 while( !(val1 & 1) )
7995 else if( val1 < val2 )
8000 while( !(val2 & 1) )
8006 while( val1 != val2 )
8017 if( ((val1 ^ val2) & 2) == 2 )
8022 assert((val1 & 3) == 0);
8026 while( !(val1 & 1) )
8038 if( ((val2 ^ val1) & 2) == 2 )
8043 assert((val2 & 3) == 0);
8047 while( !(val2 & 1) )
8068 return val1/gcd * val2;
8071 static const SCIP_Real simplednoms[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0,
8072 17.0, 18.0, 19.0, 25.0, -1.0};
8099 assert(mindelta < 0.0);
8100 assert(maxdelta > 0.0);
8101 assert(nominator !=
NULL);
8102 assert(denominator !=
NULL);
8107 for( i = 0; simplednoms[i] > 0.0; ++i )
8115 dnom = simplednoms[i];
8116 while( dnom <= maxdnom )
8118 nom = floor(val * dnom);
8120 ratval1 = (nom+1.0)/dnom;
8121 if( mindelta <= val - ratval0 && val - ratval1 <= maxdelta )
8123 if( val - ratval0 <= maxdelta )
8129 if( mindelta <= val - ratval1 )
8141 epsilon =
MIN(-mindelta, maxdelta)/2.0;
8149 delta0 = val - g0/h0;
8150 delta1 = (delta0 < 0.0 ? val - (g0-1.0)/h0 : val - (g0+1.0)/h0);
8152 while( (delta0 < mindelta || delta0 > maxdelta) && (delta1 < mindelta || delta1 > maxdelta) )
8154 assert(
EPSGT(b, a, epsilon));
8174 delta0 = val - g0/h0;
8175 delta1 = (delta0 < 0.0 ? val - (g0-1.0)/h0 : val - (g0+1.0)/h0);
8183 if( delta0 < mindelta )
8185 assert(mindelta <= delta1 && delta1 <= maxdelta);
8189 else if( delta0 > maxdelta )
8191 assert(mindelta <= delta1 && delta1 <= maxdelta);
8200 assert(*denominator >= 1);
8220 assert(mindelta <= 0.0);
8221 assert(maxdelta >= 0.0);
8223 sval = val * scalar;
8224 downval = floor(sval);
8263 assert(vals !=
NULL);
8265 assert(maxdnom >= 1);
8266 assert(mindelta < 0.0);
8267 assert(maxdelta > 0.0);
8268 assert(success !=
NULL);
8270 SCIPdebugMessage(
"trying to find rational representation for given values\n");
8272 if( intscalar !=
NULL )
8278 for( c = 0; c < nvals; ++c )
8281 if( val < mindelta || val > maxdelta )
8284 minval =
MIN(minval, absval);
8291 if( intscalar !=
NULL )
8298 assert(minval >
MIN(-mindelta, maxdelta));
8302 for( i = 0; i < 2; ++i )
8308 scaleval = 1.0/minval;
8313 for( c = 0; c < nvals && scalable; ++c )
8321 while( scaleval <= maxscale
8322 && (absval * scaleval < 0.5 || !
isIntegralScalar(val, scaleval, mindelta, maxdelta)) )
8328 scaleval *= scalars[s];
8335 scalable = (scaleval <= maxscale);
8336 SCIPdebugMessage(
" -> val=%g, scaleval=%g, val*scaleval=%g, scalable=%u\n",
8337 val, scaleval, val*scaleval, scalable);
8342 assert(scaleval <= maxscale);
8345 if( scaleval < bestscalar )
8346 bestscalar = scaleval;
8348 SCIPdebugMessage(
" -> integrality could be achieved by scaling with %g\n", scaleval);
8353 if( intscalar !=
NULL )
8354 *intscalar = bestscalar;
8370 for( c = 0; c < nvals && rational; ++c )
8376 rational =
SCIPrealToRational(val, mindelta, maxdelta, maxdnom, &nominator, &denominator);
8377 if( rational && nominator != 0 )
8379 assert(denominator > 0);
8380 gcd = ABS(nominator);
8383 SCIPdebugMessage(
" -> c=%d first rational: val: %g == %" SCIP_LONGINT_FORMAT
"/%" SCIP_LONGINT_FORMAT
", gcd=%" SCIP_LONGINT_FORMAT
", scm=%" SCIP_LONGINT_FORMAT
", rational=%u\n",
8384 c, val, nominator, denominator, gcd, scm, rational);
8390 for( ++c; c < nvals && rational; ++c )
8396 rational =
SCIPrealToRational(val, mindelta, maxdelta, maxdnom, &nominator, &denominator);
8397 if( rational && nominator != 0 )
8399 assert(denominator > 0);
8403 SCIPdebugMessage(
" -> c=%d next rational : val: %g == %" SCIP_LONGINT_FORMAT
"/%" SCIP_LONGINT_FORMAT
", gcd=%" SCIP_LONGINT_FORMAT
", scm=%" SCIP_LONGINT_FORMAT
", rational=%u\n",
8404 c, val, nominator, denominator, gcd, scm, rational);
8408 SCIPdebugMessage(
" -> failed to convert %g into a rational representation\n", val);
8421 SCIPdebugMessage(
" -> integrality could be achieved by scaling with %g (rational:%" SCIP_LONGINT_FORMAT
"/%" SCIP_LONGINT_FORMAT
")\n",
8427 if( intscalar !=
NULL )
8428 *intscalar = bestscalar;
8431 SCIPdebugMessage(
" -> smallest value to achieve integrality is %g \n", bestscalar);
8454 center = 0.5*(lb+ub);
8466 delta = 0.5*(ub-lb);
8472 delta = 0.5*(ub-lb);
8503 SCIPdebugPrintf(
" %" SCIP_LONGINT_FORMAT
"/%" SCIP_LONGINT_FORMAT
" == %.9f\n", nominator, denominator, val);
8505 if( val - lb < 0.0 || val - ub > 0.0 )
8507 SCIPdebugPrintf(
" value is out of interval bounds by %g -> failed\n",
MAX(lb-val, val-ub));
8527 #if defined(NO_RAND_R) || defined(_WIN32) || defined(_WIN64) 8529 #define SCIP_RAND_MAX 32767 8538 assert(seedp !=
NULL);
8540 nextseed = (*seedp) * (
SCIP_Longint)1103515245 + 12345;
8541 *seedp = (
unsigned int)nextseed;
8548 #define SCIP_RAND_MAX RAND_MAX 8556 return rand_r(seedp);
8572 assert(randnumber >= 0.0);
8573 assert(randnumber < 1.0);
8578 return (
int) (minrandval*(1.0 - randnumber) + maxrandval*randnumber + randnumber);
8592 assert(randnumber >= 0.0);
8593 assert(randnumber <= 1.0);
8598 return minrandval*(1.0 - randnumber) + maxrandval*randnumber;
8629 #define DEFAULT_SEED UINT32_C(123456789) 8630 #define DEFAULT_XOR UINT32_C(362436000) 8631 #define DEFAULT_MWC UINT32_C(521288629) 8632 #define DEFAULT_CST UINT32_C(7654321) 8639 unsigned int initseed
8642 assert(randnumgen !=
NULL);
8650 assert(randnumgen->
seed > 0);
8677 randnumgen->
seed = (uint32_t) (randnumgen->
seed * UINT64_C(1103515245) + UINT64_C(12345));
8686 randnumgen->
cst_seed = (uint32_t) (t >> 32);
8687 randnumgen->
mwc_seed = (uint32_t) t;
8696 unsigned int initialseed
8699 assert(randnumgen !=
NULL);
8702 (*randnumgen)->blkmem = blkmem;
8714 assert(randnumgen !=
NULL);
8715 assert((*randnumgen) !=
NULL);
8733 assert(randnumber >= 0.0);
8734 assert(randnumber < 1.0);
8754 assert(randnumber >= 0.0);
8755 assert(randnumber <= 1.0);
8760 return minrandval*(1.0 - randnumber) + maxrandval*randnumber;
8779 while( end > begin+1 )
8788 array[i] = array[end];
8809 while( end > begin+1 )
8818 array[i] = array[end];
8838 if( nelems == nsubelems)
8845 if( nsubelems > nelems )
8847 SCIPerrorMessage(
"Cannot create %d-elementary subset of %d-elementary set.\n", nsubelems, nelems);
8851 for( i = 0; i < nsubelems; i++ )
8852 for( j = 0; j < i; j++ )
8853 assert(
set[i] !=
set[j]);
8858 while( i < nsubelems )
8866 for( j = 0; j < i; j++ )
8868 if( subset[i] == subset[j] )
8892 if( m == 0 || m >= n )
8916 if( m > 16 || n > 33 )
8921 return (n*(n-1)*(n-2)/6);
8930 1166803110, 601080390, 1037158320, 565722720, 300540195, 155117520, 818809200, 471435600, 265182525, 145422675,
8931 77558760, 40116600, 573166440, 347373600, 206253075, 119759850, 67863915, 37442160, 20058300, 10400600,
8932 354817320, 225792840, 141120525, 86493225, 51895935, 30421755, 17383860, 9657700, 5200300, 2704156, 193536720,
8933 129024480, 84672315, 54627300, 34597290, 21474180, 13037895, 7726160, 4457400, 2496144, 1352078, 705432,
8934 92561040, 64512240, 44352165, 30045015, 20030010, 13123110, 8436285, 5311735, 3268760, 1961256, 1144066,
8935 646646, 352716, 184756, 38567100, 28048800, 20160075, 14307150, 10015005, 6906900, 4686825, 3124550, 2042975,
8936 1307504, 817190, 497420, 293930, 167960, 92378, 48620, 13884156, 10518300, 7888725, 5852925, 4292145, 3108105,
8937 2220075, 1562275, 1081575, 735471, 490314, 319770, 203490, 125970, 75582, 43758, 24310, 12870, 4272048, 3365856,
8938 2629575, 2035800, 1560780, 1184040, 888030, 657800, 480700, 346104, 245157, 170544, 116280, 77520, 50388, 31824,
8939 19448, 11440, 6435, 3432, 1107568, 906192, 736281, 593775, 475020, 376740, 296010, 230230, 177100, 134596,
8940 100947, 74613, 54264, 38760, 27132, 18564, 12376, 8008, 5005, 3003, 1716, 924, 237336, 201376, 169911, 142506,
8941 118755, 98280, 80730, 65780, 53130, 42504, 33649, 26334, 20349, 15504, 11628, 8568, 6188, 4368, 3003, 2002,
8942 1287, 792, 462, 252, 40920, 35960, 31465, 27405, 23751, 20475, 17550, 14950, 12650, 10626, 8855, 7315, 5985,
8943 4845, 3876, 3060, 2380, 1820, 1365, 1001, 715, 495, 330, 210, 126, 70};
8951 assert(t*(t+1)+(33-n) < 182);
8953 return binoms[t*(t+1)+(33-n)];
9004 *pointer1 = *pointer2;
9027 while( end > begin+1 )
9036 array[i] = array[end];
9061 while( end > begin+1 )
9070 array[i] = array[end];
9092 if( nelems == nsubelems)
9099 if( nsubelems > nelems )
9101 SCIPerrorMessage(
"Cannot create %d-elementary subset of %d-elementary set.\n", nsubelems, nelems);
9105 for( i = 0; i < nsubelems; i++ )
9106 for( j = 0; j < i; j++ )
9107 assert(
set[i] !=
set[j]);
9112 while( i < nsubelems )
9120 for( j = 0; j < i; j++ )
9122 if( subset[i] == subset[j] )
9144 int* intersectarray,
9146 int* nintersectarray
9155 assert( array1 !=
NULL );
9156 assert( array2 !=
NULL );
9157 assert( intersectarray !=
NULL );
9158 assert( nintersectarray !=
NULL );
9161 for (v1 = 0; v1 < narray1; ++v1)
9163 assert( v1 == 0 || array1[v1] >= array1[v1-1] );
9166 if ( v1+1 < narray1 && array1[v1] == array1[v1+1])
9169 for (v2 = k; v2 < narray2; ++v2)
9171 assert( v2 == 0 || array2[v2] >= array2[v2-1] );
9173 if ( array2[v2] > array1[v1] )
9178 else if ( array2[v2] == array1[v1] )
9180 intersectarray[cnt++] = array2[v2];
9188 *nintersectarray = cnt;
9210 assert( array1 !=
NULL );
9211 assert( array2 !=
NULL );
9212 assert( setminusarray !=
NULL );
9213 assert( nsetminusarray !=
NULL );
9215 while ( v1 < narray1 )
9219 assert( v1 == 0 || array1[v1] >= array1[v1-1] );
9222 while ( v1 + 1 < narray1 && array1[v1] == array1[v1 + 1] )
9225 entry1 = array1[v1];
9227 while ( v2 < narray2 && array2[v2] < entry1 )
9230 if ( v2 >= narray2 || entry1 < array2[v2] )
9231 setminusarray[cnt++] = entry1;
9236 *nsetminusarray = cnt;
9259 if( dest ==
NULL || src ==
NULL || cnt == 0 )
9263 char* destination = dest;
9265 while( cnt-- && (*destination++ = *src++) != stop );
9267 return (
int)(destination - dest);
9280 #ifdef NO_STRERROR_R 9282 buf = strerror(errno);
9286 #if defined(_WIN32) || defined(_WIN64) 9305 return strtok(s, delim);
9307 return strtok_r(s, delim, ptrptr);
9323 assert(bufsize > 0);
9325 len = (int)strlen(s);
9326 for( p = 0, i = 0; i <= len && p < bufsize; ++i, ++p )
9328 if( s[i] ==
' ' || s[i] ==
'"' || s[i] ==
'\'' )
9336 t[bufsize-1] =
'\0';
9355 #if defined(_WIN32) || defined(_WIN64) 9356 n = _vsnprintf(t, (
size_t) len, s, ap);
9358 n = vsnprintf(t, (
size_t) len, s, ap);
9362 if( n < 0 || n >= len )
9386 assert(str !=
NULL);
9387 assert(value !=
NULL);
9388 assert(endptr !=
NULL);
9393 *value = (int) strtol(str, endptr, 10);
9395 if( *endptr != str && *endptr !=
NULL )
9400 *endptr = (
char*)str;
9417 assert(str !=
NULL);
9418 assert(value !=
NULL);
9419 assert(endptr !=
NULL);
9424 *value = strtod(str, endptr);
9426 if( *endptr != str && *endptr !=
NULL )
9431 *endptr = (
char*)str;
9450 const char* copystr;
9453 assert(str !=
NULL);
9454 assert(token !=
NULL);
9456 assert(endptr !=
NULL);
9463 while( *str !=
'\0' && *str != startchar )
9469 *endptr = (
char*)copystr;
9477 while( *str !=
'\0' && *str != endchar && nchars < size-1 )
9480 token[nchars] = *str;
9486 token[nchars] =
'\0';
9489 if( nchars == (size-1) )
9490 while( *str !=
'\0' && *str != endchar )
9496 *endptr = (
char*)copystr;
9505 *endptr = (
char*) str;
9514 const char* filename
9519 f = fopen(filename,
"r");
9538 char* lastbackslash;
9541 assert(filename !=
NULL);
9547 if( extension !=
NULL )
9549 if( compression !=
NULL )
9550 *compression =
NULL;
9553 lastslash = strrchr(filename,
'/');
9554 lastbackslash = strrchr(filename,
'\\');
9555 lastslash =
MAX(lastslash, lastbackslash);
9556 lastdot = strrchr(filename,
'.');
9557 if( lastslash !=
NULL && lastdot !=
NULL && lastdot < lastslash )
9562 if( lastdot !=
NULL )
9566 compext = lastdot+1;
9567 if( strcmp(compext,
"gz") == 0
9568 || strcmp(compext,
"z") == 0
9569 || strcmp(compext,
"Z") == 0 )
9571 if( compression !=
NULL )
9572 *compression = compext;
9577 lastdot = strrchr(filename,
'.');
9578 if( lastslash !=
NULL && lastdot !=
NULL && lastdot < lastslash )
9583 if( lastslash ==
NULL )
9593 *name = lastslash+1;
9597 if( lastdot !=
NULL )
9599 if( extension !=
NULL )
9600 *extension = lastdot+1;
9629 quot = MAX3(1.0, absval1, absval2);
9631 return (val1-val2)/quot;
9643 if(
EPSEQ(primalbound, dualbound, eps) )
9645 else if(
EPSZ(dualbound, eps) ||
9646 EPSZ(primalbound, eps) ||
9647 REALABS(primalbound) >= inf ||
9649 primalbound * dualbound < 0.0 )
9656 return REALABS((primalbound - dualbound)/
MIN(absdual, absprimal));
void SCIPmultihashFree(SCIP_MULTIHASH **multihash)
void SCIPpermuteArray(void **array, int begin, int end, unsigned int *randseed)
SCIP_RETCODE SCIPbtnodeCreate(SCIP_BT *tree, SCIP_BTNODE **node, void *dataptr)
int SCIPrealarrayGetMaxIdx(SCIP_REALARRAY *realarray)
void ** SCIPdigraphGetSuccessorsData(SCIP_DIGRAPH *digraph, int node)
int SCIPpqueueNElems(SCIP_PQUEUE *pqueue)
static void regressionRecompute(SCIP_REGRESSION *regression)
SCIP_RETCODE SCIPrandomCreate(SCIP_RANDNUMGEN **randnumgen, BMS_BLKMEM *blkmem, unsigned int initialseed)
void SCIPbtnodeFree(SCIP_BT *tree, SCIP_BTNODE **node)
void * SCIPhashmapEntryGetImage(SCIP_HASHMAPENTRY *entry)
SCIP_Real SCIPnormalGetCriticalValue(SCIP_CONFIDENCELEVEL clevel)
static void * multihashlistRetrieveNext(SCIP_MULTIHASHLIST **multihashlist, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr, uint64_t keyval, void *key)
#define BMSfreeBlockMemoryArrayNull(mem, ptr, num)
static SCIP_Bool hashmapLookup(SCIP_HASHMAP *hashmap, void *origin, uint32_t *pos)
int SCIPmemccpy(char *dest, const char *src, char stop, unsigned int cnt)
SCIP_Real SCIPerf(SCIP_Real x)
static SCIP_Bool multihashlistRemove(SCIP_MULTIHASHLIST **multihashlist, BMS_BLKMEM *blkmem, void *element)
static SCIP_RETCODE hashmapCheckLoad(SCIP_HASHMAP *hashmap)
#define BMSfreeMemoryArrayNull(ptr)
static const int nscalars
static SCIP_RETCODE hashmapInsert(SCIP_HASHMAP *hashmap, void *origin, SCIP_HASHMAPIMAGE image, uint32_t hashval, SCIP_Bool override)
void SCIPsparseSolGetFirstSol(SCIP_SPARSESOL *sparsesol, SCIP_Longint *sol, int nvars)
SCIP_BTNODE * SCIPbtnodeGetSibling(SCIP_BTNODE *node)
SCIP_RETCODE SCIPprofileDeleteCore(SCIP_PROFILE *profile, int left, int right, int demand)
void * SCIPbtnodeGetData(SCIP_BTNODE *node)
void SCIPsortInd(int *indarray, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len)
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
SCIP_DECL_HASHKEYVAL(SCIPhashKeyValString)
static void randomInitialize(SCIP_RANDNUMGEN *randnumgen, unsigned int initseed)
void SCIPdigraphFreeComponents(SCIP_DIGRAPH *digraph)
SCIP_RETCODE SCIPintarrayIncVal(SCIP_INTARRAY *intarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, int incval)
static SCIP_RETCODE multihashlistAppend(SCIP_MULTIHASHLIST **multihashlist, BMS_BLKMEM *blkmem, void *element)
static SCIP_RETCODE hashtableCheckLoad(SCIP_HASHTABLE *hashtable)
void SCIPgmlWriteArc(FILE *file, unsigned int source, unsigned int target, const char *label, const char *color)
SCIP_RETCODE SCIPdigraphComputeUndirectedComponents(SCIP_DIGRAPH *digraph, int minsize, int *components, int *ncomponents)
int SCIPintarrayGetMinIdx(SCIP_INTARRAY *intarray)
SCIP_RETCODE SCIPrealarrayCreate(SCIP_REALARRAY **realarray, BMS_BLKMEM *blkmem)
static SCIP_RETCODE btnodeCreateEmpty(SCIP_BT *tree, SCIP_BTNODE **node)
SCIP_RETCODE SCIPintarrayCopy(SCIP_INTARRAY **intarray, BMS_BLKMEM *blkmem, SCIP_INTARRAY *sourceintarray)
SCIP_Bool SCIPboolarrayGetVal(SCIP_BOOLARRAY *boolarray, int idx)
int * SCIPdigraphGetSuccessors(SCIP_DIGRAPH *digraph, int node)
static SCIP_RETCODE ensureSuccessorsSize(SCIP_DIGRAPH *digraph, int idx, int newsize)
SCIP_RETCODE SCIPqueueInsert(SCIP_QUEUE *queue, void *elem)
void SCIPgmlWriteNode(FILE *file, unsigned int id, const char *label, const char *nodetype, const char *fillcolor, const char *bordercolor)
void SCIPsplitFilename(char *filename, char **path, char **name, char **extension, char **compression)
void * SCIPhashmapEntryGetOrigin(SCIP_HASHMAPENTRY *entry)
SCIP_Bool SCIPsparseSolGetNextSol(SCIP_SPARSESOL *sparsesol, SCIP_Longint *sol, int nvars)
int SCIPprofileGetTime(SCIP_PROFILE *profile, int pos)
SCIP_RETCODE SCIPmultihashCreate(SCIP_MULTIHASH **multihash, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr)
int SCIPintarrayGetVal(SCIP_INTARRAY *intarray, int idx)
void SCIPgmlWriteClosing(FILE *file)
static int calcGrowSize(int initsize, SCIP_Real growfac, int num)
void SCIPswapPointers(void **pointer1, void **pointer2)
void SCIPbtnodeSetRightchild(SCIP_BTNODE *node, SCIP_BTNODE *right)
void SCIPintervalSetRoundingMode(SCIP_ROUNDMODE roundmode)
void * SCIPptrarrayGetVal(SCIP_PTRARRAY *ptrarray, int idx)
static SCIP_RETCODE hashtableInsert(SCIP_HASHTABLE *hashtable, void *element, void *key, uint32_t hashval, SCIP_Bool override)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
static const SCIP_Real studentt_quartilesabove[]
int SCIPboolarrayGetMaxIdx(SCIP_BOOLARRAY *boolarray)
SCIP_Real SCIPrelDiff(SCIP_Real val1, SCIP_Real val2)
int SCIPprofileGetEarliestFeasibleStart(SCIP_PROFILE *profile, int est, int lst, int duration, int demand, SCIP_Bool *infeasible)
#define SCIP_MULTIHASH_MAXSIZE
miscellaneous datastructures
int SCIPsnprintf(char *t, int len, const char *s,...)
void SCIPrandomPermuteArray(SCIP_RANDNUMGEN *randnumgen, void **array, int begin, int end)
enum SCIP_Retcode SCIP_RETCODE
SCIP_RETCODE SCIPdigraphSetSizes(SCIP_DIGRAPH *digraph, int *sizes)
void SCIPdigraphPrintComponents(SCIP_DIGRAPH *digraph, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
SCIP_VAR * SCIPactivityGetVar(SCIP_RESOURCEACTIVITY *activity)
SCIP_RETCODE SCIPptrarrayExtend(SCIP_PTRARRAY *ptrarray, int arraygrowinit, SCIP_Real arraygrowfac, int minidx, int maxidx)
void * SCIPpqueueFirst(SCIP_PQUEUE *pqueue)
SCIP_RETCODE SCIPboolarrayCopy(SCIP_BOOLARRAY **boolarray, BMS_BLKMEM *blkmem, SCIP_BOOLARRAY *sourceboolarray)
SCIPInterval exp(const SCIPInterval &x)
SCIP_Real SCIPregressionGetIntercept(SCIP_REGRESSION *regression)
void SCIPhashtableClear(SCIP_HASHTABLE *hashtable)
SCIP_RETCODE SCIPcomputeArraysIntersection(int *array1, int narray1, int *array2, int narray2, int *intersectarray, int *nintersectarray)
#define BMSallocMemoryArray(ptr, num)
void SCIPregressionAddObservation(SCIP_REGRESSION *regression, SCIP_Real x, SCIP_Real y)
void SCIPswapReals(SCIP_Real *value1, SCIP_Real *value2)
int SCIPdigraphGetNComponents(SCIP_DIGRAPH *digraph)
static SCIP_MULTIHASHLIST * multihashlistFind(SCIP_MULTIHASHLIST *multihashlist, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr, uint64_t keyval, void *key)
SCIP_Bool SCIPstrToIntValue(const char *str, int *value, char **endptr)
#define SCIP_MULTIHASH_RESIZE_PERCENTAGE
void SCIPpqueueFree(SCIP_PQUEUE **pqueue)
SCIP_RETCODE SCIPprofileInsertCore(SCIP_PROFILE *profile, int left, int right, int demand, int *pos, SCIP_Bool *infeasible)
int SCIPrandomGetInt(SCIP_RANDNUMGEN *randnumgen, int minrandval, int maxrandval)
SCIP_Real SCIPselectSimpleValue(SCIP_Real lb, SCIP_Real ub, SCIP_Longint maxdnom)
void SCIPdigraphGetComponent(SCIP_DIGRAPH *digraph, int compidx, int **nodes, int *nnodes)
SCIP_Bool SCIPhashmapIsEmpty(SCIP_HASHMAP *hashmap)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
int SCIPptrarrayGetMinIdx(SCIP_PTRARRAY *ptrarray)
SCIP_Bool SCIPqueueIsEmpty(SCIP_QUEUE *queue)
#define BMSfreeMemory(ptr)
SCIP_Real SCIPnegateReal(SCIP_Real x)
void SCIPsortDown(int *perm, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len)
SCIP_MULTIHASHLIST ** lists
template functions for sorting
int SCIPprofileGetLoad(SCIP_PROFILE *profile, int pos)
SCIP_Real SCIPhashmapGetImageReal(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPdigraphTopoSortComponents(SCIP_DIGRAPH *digraph)
#define SCIP_MULTIHASH_GROW_FACTOR
int SCIPrealarrayGetMinIdx(SCIP_REALARRAY *realarray)
SCIP_Bool SCIPbtnodeIsRoot(SCIP_BTNODE *node)
void SCIPmultihashRemoveAll(SCIP_MULTIHASH *multihash)
SCIP_RETCODE SCIPhashtableCreate(SCIP_HASHTABLE **hashtable, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr)
SCIP_RETCODE SCIPboolarraySetVal(SCIP_BOOLARRAY *boolarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, SCIP_Bool val)
#define SCIP_DEFAULT_EPSILON
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
SCIP_Longint SCIPmultihashGetNElements(SCIP_MULTIHASH *multihash)
SCIP_Bool SCIPfileExists(const char *filename)
void SCIPqueueClear(SCIP_QUEUE *queue)
int SCIPdigraphGetNNodes(SCIP_DIGRAPH *digraph)
int SCIPprofileGetCapacity(SCIP_PROFILE *profile)
SCIP_RETCODE SCIPintarrayFree(SCIP_INTARRAY **intarray)
SCIP_Bool SCIPrealToRational(SCIP_Real val, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Longint *nominator, SCIP_Longint *denominator)
SCIP_RETCODE SCIPdigraphCreate(SCIP_DIGRAPH **digraph, int nnodes)
void SCIPsortedvecInsertIntInt(int *intarray1, int *intarray2, int keyval, int field1val, int *len, int *pos)
SCIP_RETCODE SCIPrealarrayIncVal(SCIP_REALARRAY *realarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, SCIP_Real incval)
SCIP_RETCODE SCIPactivityCreate(SCIP_RESOURCEACTIVITY **activity, SCIP_VAR *var, int duration, int demand)
void SCIPregressionRemoveObservation(SCIP_REGRESSION *regression, SCIP_Real x, SCIP_Real y)
SCIP_DECL_HASHKEYEQ(SCIPhashKeyEqString)
void SCIPsortDownInd(int *indarray, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len)
void SCIPrandomFree(SCIP_RANDNUMGEN **randnumgen)
static const int studentt_maxdf
enum SCIP_Confidencelevel SCIP_CONFIDENCELEVEL
#define BMSduplicateBlockMemoryArray(mem, ptr, source, num)
SCIP_RETCODE SCIPrealarrayCopy(SCIP_REALARRAY **realarray, BMS_BLKMEM *blkmem, SCIP_REALARRAY *sourcerealarray)
SCIP_Longint * SCIPsparseSolGetLbs(SCIP_SPARSESOL *sparsesol)
int SCIPqueueNElems(SCIP_QUEUE *queue)
#define BMSfreeMemoryArray(ptr)
SCIP_Bool SCIPmultihashExists(SCIP_MULTIHASH *multihash, void *element)
SCIP_BTNODE * SCIPbtnodeGetParent(SCIP_BTNODE *node)
SCIP_RETCODE SCIPdigraphSetNSuccessors(SCIP_DIGRAPH *digraph, int node, int nsuccessors)
void SCIPmessagePrintError(const char *formatstr,...)
void SCIPhashmapPrintStatistics(SCIP_HASHMAP *hashmap, SCIP_MESSAGEHDLR *messagehdlr)
int SCIPactivityGetEnergy(SCIP_RESOURCEACTIVITY *activity)
interval arithmetics for provable bounds
static SCIP_RETCODE multihashResize(SCIP_MULTIHASH *multihash)
int SCIPhashmapGetNEntries(SCIP_HASHMAP *hashmap)
SCIP_HASHMAPENTRY * SCIPhashmapGetEntry(SCIP_HASHMAP *hashmap, int entryidx)
void SCIPbtnodeSetLeftchild(SCIP_BTNODE *node, SCIP_BTNODE *left)
SCIP_RETCODE SCIPboolarrayCreate(SCIP_BOOLARRAY **boolarray, BMS_BLKMEM *blkmem)
void * SCIPdigraphGetNodeData(SCIP_DIGRAPH *digraph, int node)
#define BMSmoveMemoryArray(ptr, source, num)
SCIPInterval sqrt(const SCIPInterval &x)
SCIP_Real SCIPrealarrayGetVal(SCIP_REALARRAY *realarray, int idx)
void SCIPdigraphSetNodeData(SCIP_DIGRAPH *digraph, void *dataptr, int node)
void SCIPescapeString(char *t, int bufsize, const char *s)
int SCIPintarrayGetMaxIdx(SCIP_INTARRAY *intarray)
void SCIPstrCopySection(const char *str, char startchar, char endchar, char *token, int size, char **endptr)
SCIPInterval sign(const SCIPInterval &x)
SCIP_RETCODE SCIPmultihashSafeInsert(SCIP_MULTIHASH *multihash, void *element)
static int profileFindFeasibleStart(SCIP_PROFILE *profile, int pos, int lst, int duration, int demand, SCIP_Bool *infeasible)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void SCIPdigraphPrint(SCIP_DIGRAPH *digraph, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
#define BMSallocClearBlockMemoryArray(mem, ptr, num)
internal miscellaneous methods
SCIP_RETCODE SCIPboolarrayClear(SCIP_BOOLARRAY *boolarray)
void SCIPactivityFree(SCIP_RESOURCEACTIVITY **activity)
void SCIPgmlWriteEdge(FILE *file, unsigned int source, unsigned int target, const char *label, const char *color)
int SCIPptrarrayGetMaxIdx(SCIP_PTRARRAY *ptrarray)
#define SCIPhashTwo(a, b)
static SCIP_RETCODE profileUpdate(SCIP_PROFILE *profile, int left, int right, int demand, int *pos, SCIP_Bool *infeasible)
void SCIPmessagePrintInfo(SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
void SCIPhashtableRemoveAll(SCIP_HASHTABLE *hashtable)
SCIP_RETCODE SCIPhashtableRemove(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPintarraySetVal(SCIP_INTARRAY *intarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, int val)
SCIP_RETCODE SCIPprofileCreate(SCIP_PROFILE **profile, int capacity)
static SCIP_RETCODE ensureProfileSize(SCIP_PROFILE *profile, int neededsize)
void SCIPqueueFree(SCIP_QUEUE **queue)
SCIP_RETCODE SCIPdigraphAddArc(SCIP_DIGRAPH *digraph, int startnode, int endnode, void *data)
SCIP_Bool SCIPbtnodeIsRightchild(SCIP_BTNODE *node)
SCIP_Real SCIPmultihashGetLoad(SCIP_MULTIHASH *multihash)
void * SCIPpqueueRemove(SCIP_PQUEUE *pqueue)
SCIP_RETCODE SCIPgetRandomSubset(void **set, int nelems, void **subset, int nsubelems, unsigned int randseed)
SCIP_Bool SCIPsortedvecFindInt(int *intarray, int val, int len, int *pos)
SCIP_BTNODE * SCIPbtGetRoot(SCIP_BT *tree)
#define BMSduplicateMemoryArray(ptr, source, num)
SCIP_RETCODE SCIPhashmapInsertReal(SCIP_HASHMAP *hashmap, void *origin, SCIP_Real image)
void SCIPregressionFree(SCIP_REGRESSION **regression)
SCIP_RETCODE SCIPcomputeArraysSetminus(int *array1, int narray1, int *array2, int narray2, int *setminusarray, int *nsetminusarray)
#define BMSfreeBlockMemory(mem, ptr)
SCIP_DECL_HASHGETKEY(SCIPhashGetKeyStandard)
static int getRand(unsigned int *seedp)
static SCIP_RETCODE pqueueResize(SCIP_PQUEUE *pqueue, int minsize)
void SCIPhashtablePrintStatistics(SCIP_HASHTABLE *hashtable, SCIP_MESSAGEHDLR *messagehdlr)
SCIP_DECL_SORTPTRCOMP(SCIPsortCompInt)
SCIP_BTNODE * SCIPbtnodeGetRightchild(SCIP_BTNODE *node)
public data structures and miscellaneous methods
SCIP_RETCODE SCIPdigraphAddArcSafe(SCIP_DIGRAPH *digraph, int startnode, int endnode, void *data)
static const int primetablesize
int SCIPdigraphGetNSuccessors(SCIP_DIGRAPH *digraph, int node)
#define BMSallocBlockMemoryArray(mem, ptr, num)
SCIP_Longint * SCIPsparseSolGetUbs(SCIP_SPARSESOL *sparsesol)
void SCIPprintSysError(const char *message)
SCIP_RETCODE SCIPsparseSolCreate(SCIP_SPARSESOL **sparsesol, SCIP_VAR **vars, int nvars, SCIP_Bool cleared)
SCIP_RETCODE SCIPhashmapRemoveAll(SCIP_HASHMAP *hashmap)
static const SCIP_Real studentt_quartiles[]
#define ELEM_DISTANCE(pos)
SCIP_RETCODE SCIPmultihashInsert(SCIP_MULTIHASH *multihash, void *element)
static uint32_t randomGetRand(SCIP_RANDNUMGEN *randnumgen)
SCIP_Bool SCIPprofileFindLeft(SCIP_PROFILE *profile, int timepoint, int *pos)
SCIP_RETCODE SCIPrealarrayFree(SCIP_REALARRAY **realarray)
SCIP_RETCODE SCIPdigraphResize(SCIP_DIGRAPH *digraph, int nnodes)
#define BMSfreeBlockMemoryArray(mem, ptr, num)
void SCIPrandomPermuteIntArray(SCIP_RANDNUMGEN *randnumgen, int *array, int begin, int end)
static const SCIP_Real simplednoms[]
SCIP_Bool SCIPstrToRealValue(const char *str, SCIP_Real *value, char **endptr)
static int getRandomInt(int minrandval, int maxrandval, unsigned int *seedp)
int SCIPdigraphGetNArcs(SCIP_DIGRAPH *digraph)
void SCIPbtFree(SCIP_BT **tree)
SCIP_RETCODE SCIPhashtableSafeInsert(SCIP_HASHTABLE *hashtable, void *element)
SCIP_Bool SCIPbtnodeIsLeftchild(SCIP_BTNODE *node)
static const unsigned int randseed
SCIP_Bool SCIPintervalHasRoundingControl(void)
SCIP_RETCODE SCIPdigraphComputeDirectedComponents(SCIP_DIGRAPH *digraph, int compidx, int *strongcomponents, int *strongcompstartidx, int *nstrongcomponents)
int SCIPboolarrayGetMinIdx(SCIP_BOOLARRAY *boolarray)
void * SCIPmultihashRetrieveNext(SCIP_MULTIHASH *multihash, SCIP_MULTIHASHLIST **multihashlist, void *key)
SCIP_Real SCIPcomputeTwoSampleTTestValue(SCIP_Real meanx, SCIP_Real meany, SCIP_Real variancex, SCIP_Real variancey, SCIP_Real countx, SCIP_Real county)
void ** SCIPpqueueElems(SCIP_PQUEUE *pqueue)
#define BMScopyMemoryArray(ptr, source, num)
SCIPInterval log(const SCIPInterval &x)
void SCIPprofilePrint(SCIP_PROFILE *profile, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
void SCIPgmlWriteNodeWeight(FILE *file, unsigned int id, const char *label, const char *nodetype, const char *fillcolor, const char *bordercolor, SCIP_Real weight)
SCIP_Bool SCIPfindSimpleRational(SCIP_Real lb, SCIP_Real ub, SCIP_Longint maxdnom, SCIP_Longint *nominator, SCIP_Longint *denominator)
void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)
static SCIP_Real getRandomReal(SCIP_Real minrandval, SCIP_Real maxrandval, unsigned int *seedp)
static SCIP_Bool isIntegralScalar(SCIP_Real val, SCIP_Real scalar, SCIP_Real mindelta, SCIP_Real maxdelta)
int * SCIPprofileGetTimepoints(SCIP_PROFILE *profile)
SCIP_VAR ** SCIPsparseSolGetVars(SCIP_SPARSESOL *sparsesol)
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
int * SCIPprofileGetLoads(SCIP_PROFILE *profile)
static void depthFirstSearch(SCIP_DIGRAPH *digraph, int startnode, SCIP_Bool *visited, int *dfsstack, int *stackadjvisited, int *dfsnodes, int *ndfsnodes)
#define BMSallocClearMemoryArray(ptr, num)
static void incrementalStatsUpdate(SCIP_Real value, SCIP_Real *meanptr, SCIP_Real *sumvarptr, int nobservations, SCIP_Bool add)
int SCIPgetRandomInt(int minrandval, int maxrandval, unsigned int *seedp)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
SCIP_Bool SCIPbtIsEmpty(SCIP_BT *tree)
SCIP_RETCODE SCIPptrarrayClear(SCIP_PTRARRAY *ptrarray)
static void tarjan(SCIP_DIGRAPH *digraph, int v, int *lowlink, int *dfsidx, int *stack, int *stacksize, SCIP_Bool *unprocessed, SCIP_Bool *nodeinstack, int *maxdfs, int *strongcomponents, int *nstrongcomponents, int *strongcompstartidx, int *nstorednodes)
SCIP_Real SCIPgetRandomReal(SCIP_Real minrandval, SCIP_Real maxrandval, unsigned int *seedp)
SCIP_BTNODE * SCIPbtnodeGetLeftchild(SCIP_BTNODE *node)
static uint32_t hashvalue(uint64_t input)
#define SCIP_DECL_SORTINDCOMP(x)
int SCIPsparseSolGetNVars(SCIP_SPARSESOL *sparsesol)
void SCIPbtSetRoot(SCIP_BT *tree, SCIP_BTNODE *root)
SCIP_RETCODE SCIPhashmapSetImageReal(SCIP_HASHMAP *hashmap, void *origin, SCIP_Real image)
SCIP_RETCODE SCIPhashmapRemove(SCIP_HASHMAP *hashmap, void *origin)
void SCIPbtnodeSetParent(SCIP_BTNODE *node, SCIP_BTNODE *parent)
int SCIPhashmapGetNElements(SCIP_HASHMAP *hashmap)
SCIP_Real SCIPstudentTGetCriticalValue(SCIP_CONFIDENCELEVEL clevel, int df)
void SCIPsort(int *perm, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len)
SCIP_RETCODE SCIPqueueCreate(SCIP_QUEUE **queue, int initsize, SCIP_Real sizefac)
SCIP_RETCODE SCIPptrarrayFree(SCIP_PTRARRAY **ptrarray)
#define GMLNODEBORDERCOLOR
SCIP_RETCODE SCIPdigraphCopy(SCIP_DIGRAPH **targetdigraph, SCIP_DIGRAPH *sourcedigraph)
SCIP_RETCODE SCIPpqueueInsert(SCIP_PQUEUE *pqueue, void *elem)
SCIP_Real SCIPcalcMachineEpsilon(void)
SCIP_RETCODE SCIPpqueueCreate(SCIP_PQUEUE **pqueue, int initsize, SCIP_Real sizefac, SCIP_DECL_SORTPTRCOMP((*ptrcomp)))
SCIP_Real SCIPhashmapEntryGetImageReal(SCIP_HASHMAPENTRY *entry)
void * SCIPmultihashRetrieve(SCIP_MULTIHASH *multihash, void *key)
SCIP_RETCODE SCIPintarrayExtend(SCIP_INTARRAY *intarray, int arraygrowinit, SCIP_Real arraygrowfac, int minidx, int maxidx)
SCIP_RETCODE SCIPptrarraySetVal(SCIP_PTRARRAY *ptrarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, void *val)
SCIP_HASHMAPENTRY * slots
SCIP_Real SCIPnormalCDF(SCIP_Real mean, SCIP_Real variance, SCIP_Real value)
SCIP_Real SCIPregressionGetSlope(SCIP_REGRESSION *regression)
static int profileFindDownFeasibleStart(SCIP_PROFILE *profile, int pos, int ect, int duration, int demand, SCIP_Bool *infeasible)
int SCIPactivityGetDuration(SCIP_RESOURCEACTIVITY *activity)
SCIP_RETCODE SCIPboolarrayFree(SCIP_BOOLARRAY **boolarray)
public methods for message output
void SCIPmessageFPrintInfo(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
static const SCIP_Real scalars[]
SCIP_RETCODE SCIPhashmapSetImage(SCIP_HASHMAP *hashmap, void *origin, void *image)
static SCIP_RETCODE profileInsertTimepoint(SCIP_PROFILE *profile, int timepoint, int *pos)
void SCIPmultihashPrintStatistics(SCIP_MULTIHASH *multihash, SCIP_MESSAGEHDLR *messagehdlr)
void SCIPpermuteIntArray(int *array, int begin, int end, unsigned int *randseed)
#define SCIP_CALL_TERMINATE(retcode, x, TERM)
SCIP_RETCODE SCIPrealarrayExtend(SCIP_REALARRAY *realarray, int arraygrowinit, SCIP_Real arraygrowfac, int minidx, int maxidx)
SCIP_RETCODE SCIPrandomGetSubset(SCIP_RANDNUMGEN *randnumgen, void **set, int nelems, void **subset, int nsubelems)
SCIP_Longint SCIPcalcBinomCoef(int n, int m)
#define BMSallocMemory(ptr)
#define BMSreallocMemoryArray(ptr, num)
static void multihashlistFree(SCIP_MULTIHASHLIST **multihashlist, BMS_BLKMEM *blkmem)
static void btnodeFreeLeaf(SCIP_BT *tree, SCIP_BTNODE **node)
SCIP_RETCODE SCIPcalcIntegralScalar(SCIP_Real *vals, int nvals, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Real maxscale, SCIP_Real *intscalar, SCIP_Bool *success)
static void btPrintSubtree(SCIP_BTNODE *node, FILE *file, int *nnodes)
void SCIPregressionReset(SCIP_REGRESSION *regression)
SCIP_RETCODE SCIPrealarraySetVal(SCIP_REALARRAY *realarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, SCIP_Real val)
SCIP_Bool SCIPhashtableExists(SCIP_HASHTABLE *hashtable, void *element)
void * SCIPqueueRemove(SCIP_QUEUE *queue)
SCIP_RETCODE SCIPintarrayClear(SCIP_INTARRAY *intarray)
SCIP_RETCODE SCIPmultihashRemove(SCIP_MULTIHASH *multihash, void *element)
#define STARTSUCCESSORSSIZE
int SCIPprofileGetLatestFeasibleStart(SCIP_PROFILE *profile, int est, int lst, int duration, int demand, SCIP_Bool *infeasible)
SCIP_MULTIHASHLIST * next
void SCIPgmlWriteOpening(FILE *file, SCIP_Bool directed)
int SCIPcalcMultihashSize(int minsize)
#define BMSallocBlockMemory(mem, ptr)
SCIP_RETCODE SCIPregressionCreate(SCIP_REGRESSION **regression)
SCIP_RETCODE SCIPboolarrayExtend(SCIP_BOOLARRAY *boolarray, int arraygrowinit, SCIP_Real arraygrowfac, int minidx, int maxidx)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
#define BMSclearMemoryArray(ptr, num)
SCIP_Real SCIPhashtableGetLoad(SCIP_HASHTABLE *hashtable)
common defines and data types used in all packages of SCIP
void * SCIPqueueFirst(SCIP_QUEUE *queue)
void SCIPswapInts(int *value1, int *value2)
struct BMS_BlkMem BMS_BLKMEM
SCIP_RETCODE SCIPbtCreate(SCIP_BT **tree, BMS_BLKMEM *blkmem)
#define SCIP_ALLOC_TERMINATE(retcode, x, TERM)
static SCIP_RETCODE queueResize(SCIP_QUEUE *queue, int minsize)
#define SCIP_CALL_ABORT(x)
int SCIPactivityGetDemand(SCIP_RESOURCEACTIVITY *activity)
void SCIPbtnodeSetData(SCIP_BTNODE *node, void *dataptr)
static void * multihashlistRetrieve(SCIP_MULTIHASHLIST *multihashlist, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr, uint64_t keyval, void *key)
SCIP_RETCODE SCIPptrarrayCreate(SCIP_PTRARRAY **ptrarray, BMS_BLKMEM *blkmem)
void SCIPdigraphFree(SCIP_DIGRAPH **digraph)
int SCIPprofileGetNTimepoints(SCIP_PROFILE *profile)
void SCIPpqueueClear(SCIP_PQUEUE *pqueue)
int SCIPregressionGetNObservations(SCIP_REGRESSION *regression)
char * SCIPstrtok(char *s, const char *delim, char **ptrptr)
SCIP_ROUNDMODE SCIPintervalGetRoundingMode(void)
SCIP_Longint SCIPcalcGreComDiv(SCIP_Longint val1, SCIP_Longint val2)
void SCIPdigraphPrintGml(SCIP_DIGRAPH *digraph, FILE *file)
SCIP_RETCODE SCIPintarrayCreate(SCIP_INTARRAY **intarray, BMS_BLKMEM *blkmem)
void SCIPbtPrintGml(SCIP_BT *tree, FILE *file)
SCIP_Longint SCIPhashtableGetNElements(SCIP_HASHTABLE *hashtable)
void SCIPintervalSetRoundingModeDownwards(void)
SCIP_Longint SCIPcalcSmaComMul(SCIP_Longint val1, SCIP_Longint val2)
SCIP_RETCODE SCIPptrarrayCopy(SCIP_PTRARRAY **ptrarray, BMS_BLKMEM *blkmem, SCIP_PTRARRAY *sourceptrarray)
SCIP_Bool SCIPbtnodeIsLeaf(SCIP_BTNODE *node)
void SCIPsparseSolFree(SCIP_SPARSESOL **sparsesol)
SCIP_Real SCIPcomputeGap(SCIP_Real eps, SCIP_Real inf, SCIP_Real primalbound, SCIP_Real dualbound)
void SCIPprofileFree(SCIP_PROFILE **profile)
SCIP_RETCODE SCIPrealarrayClear(SCIP_REALARRAY *realarray)