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;
1422 unsigned int keyval,
1426 unsigned int 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;
1453 unsigned int keyval,
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");
1504 unsigned int keyval,
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 )
1590 unsigned int keyval;
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 )
1749 unsigned int keyval;
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);
1808 unsigned int keyval;
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);
1840 unsigned int keyval;
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);
1874 unsigned int keyval;
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);
1901 unsigned int keyval;
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%%)",
2025 unsigned int nslots;
2030 assert(tablesize >= 0);
2031 assert(hashtable !=
NULL);
2032 assert(hashgetkey !=
NULL);
2033 assert(hashkeyeq !=
NULL);
2034 assert(hashkeyval !=
NULL);
2035 assert(blkmem !=
NULL);
2044 (*hashtable)->shift = 32;
2045 (*hashtable)->shift -= (int)ceil(
log(
MAX(32.0, tablesize / 0.9)) /
log(2.0));
2048 nslots = 1u << (32 - (*hashtable)->shift);
2051 (*hashtable)->mask = nslots - 1;
2054 (*hashtable)->blkmem = blkmem;
2055 (*hashtable)->hashgetkey = hashgetkey;
2056 (*hashtable)->hashkeyeq = hashkeyeq;
2057 (*hashtable)->hashkeyval = hashkeyval;
2058 (*hashtable)->userptr = userptr;
2059 (*hashtable)->nelements = 0;
2072 assert(hashtable !=
NULL);
2073 assert(*hashtable !=
NULL);
2075 nslots = (*hashtable)->
mask + 1;
2078 uint32_t maxprobelen = 0;
2079 uint64_t probelensum = 0;
2082 assert(table !=
NULL);
2084 for( i = 0; i < nslots; ++i )
2086 if( table->
hashes[i] != 0 )
2088 uint32_t probelen = ((i + table->
mask + 1 - (table->
hashes[i]>>(table->
shift))) & table->
mask) + 1;
2089 probelensum += probelen;
2090 maxprobelen =
MAX(probelen, maxprobelen);
2095 (
unsigned int)table->
nelements, (
unsigned int)table->
nelements, (
unsigned int)nslots,
2125 #define ELEM_DISTANCE(pos) (((pos) + hashtable->mask + 1 - (hashtable->hashes[(pos)]>>(hashtable->shift))) & hashtable->mask) 2137 uint32_t elemdistance;
2140 assert(hashtable !=
NULL);
2143 assert(hashtable->
mask > 0);
2144 assert(hashtable->hashgetkey !=
NULL);
2145 assert(hashtable->hashkeyeq !=
NULL);
2146 assert(hashtable->hashkeyval !=
NULL);
2147 assert(element !=
NULL);
2149 pos = hashval>>(hashtable->
shift);
2156 if( hashtable->
hashes[pos] == 0 )
2158 hashtable->
slots[pos] = element;
2159 hashtable->
hashes[pos] = hashval;
2164 if( hashtable->
hashes[pos] == hashval && hashtable->hashkeyeq(hashtable->
userptr,
2165 hashtable->hashgetkey(hashtable->
userptr, hashtable->
slots[pos]), key) )
2169 hashtable->
slots[pos] = element;
2170 hashtable->
hashes[pos] = hashval;
2181 if( distance < elemdistance )
2186 elemdistance = distance;
2189 hashval = hashtable->
hashes[pos];
2190 hashtable->
hashes[pos] = tmp;
2194 pos = (pos + 1) & hashtable->
mask;
2205 assert(hashtable !=
NULL);
2206 assert(hashtable->
shift < 32);
2218 nslots = hashtable->
mask + 1;
2219 newnslots = 2*nslots;
2220 hashtable->
mask = newnslots-1;
2232 for( i = 0; i < nslots; ++i )
2237 if( hashes[i] != 0 )
2260 unsigned int keyval;
2263 assert(hashtable !=
NULL);
2266 assert(hashtable->
mask > 0);
2267 assert(hashtable->hashgetkey !=
NULL);
2268 assert(hashtable->hashkeyeq !=
NULL);
2269 assert(hashtable->hashkeyval !=
NULL);
2270 assert(element !=
NULL);
2275 key = hashtable->hashgetkey(hashtable->
userptr, element);
2276 keyval = hashtable->hashkeyval(hashtable->
userptr, key);
2292 unsigned int keyval;
2295 assert(hashtable !=
NULL);
2298 assert(hashtable->
mask > 0);
2299 assert(hashtable->hashgetkey !=
NULL);
2300 assert(hashtable->hashkeyeq !=
NULL);
2301 assert(hashtable->hashkeyval !=
NULL);
2302 assert(element !=
NULL);
2307 key = hashtable->hashgetkey(hashtable->
userptr, element);
2308 keyval = hashtable->hashkeyval(hashtable->
userptr, key);
2320 unsigned int keyval;
2323 uint32_t elemdistance;
2325 assert(hashtable !=
NULL);
2328 assert(hashtable->
mask > 0);
2329 assert(hashtable->hashgetkey !=
NULL);
2330 assert(hashtable->hashkeyeq !=
NULL);
2331 assert(hashtable->hashkeyval !=
NULL);
2332 assert(key !=
NULL);
2335 keyval = hashtable->hashkeyval(hashtable->
userptr, key);
2338 pos = hashval>>(hashtable->
shift);
2346 if( hashtable->
hashes[pos] == 0 )
2352 if( elemdistance > distance )
2356 if( hashtable->
hashes[pos] == hashval && hashtable->hashkeyeq(hashtable->
userptr,
2357 hashtable->hashgetkey(hashtable->
userptr, hashtable->
slots[pos]), key) )
2358 return hashtable->
slots[pos];
2360 pos = (pos + 1) & hashtable->
mask;
2371 assert(hashtable !=
NULL);
2374 assert(hashtable->
mask > 0);
2375 assert(hashtable->hashgetkey !=
NULL);
2376 assert(hashtable->hashkeyeq !=
NULL);
2377 assert(hashtable->hashkeyval !=
NULL);
2378 assert(element !=
NULL);
2390 unsigned int keyval;
2392 uint32_t elemdistance;
2396 assert(hashtable !=
NULL);
2399 assert(hashtable->
mask > 0);
2400 assert(hashtable->hashgetkey !=
NULL);
2401 assert(hashtable->hashkeyeq !=
NULL);
2402 assert(hashtable->hashkeyval !=
NULL);
2403 assert(element !=
NULL);
2406 key = hashtable->hashgetkey(hashtable->
userptr, element);
2407 keyval = hashtable->hashkeyval(hashtable->
userptr, key);
2411 pos = hashval>>(hashtable->
shift);
2415 if( hashtable->
hashes[pos] == 0 )
2421 if( elemdistance > distance )
2424 if( hashtable->
hashes[pos] == hashval && hashtable->hashkeyeq(hashtable->
userptr,
2425 hashtable->hashgetkey(hashtable->
userptr, hashtable->
slots[pos]), key) )
2431 pos = (pos + 1) & hashtable->
mask;
2436 hashtable->
hashes[pos] = 0;
2440 uint32_t nextpos = (pos + 1) & hashtable->
mask;
2443 if( hashtable->
hashes[nextpos] == 0 )
2447 if( (hashtable->
hashes[nextpos]>>(hashtable->
shift)) == nextpos )
2451 hashtable->
slots[pos] = hashtable->
slots[nextpos];
2453 hashtable->
hashes[nextpos] = 0;
2466 assert(hashtable !=
NULL);
2478 assert(hashtable !=
NULL);
2488 assert(hashtable !=
NULL);
2499 uint32_t maxprobelen = 0;
2500 uint64_t probelensum = 0;
2504 assert(hashtable !=
NULL);
2506 nslots = hashtable->
mask + 1;
2509 for( i = 0; i < nslots; ++i )
2511 if( hashtable->
hashes[i] != 0 )
2514 probelensum += probelen;
2515 maxprobelen =
MAX(probelen, maxprobelen);
2534 const char* string1 = (
const char*)key1;
2535 const char* string2 = (
const char*)key2;
2537 return (strcmp(string1, string2) == 0);
2546 str = (
const char*)key;
2548 while( *str !=
'\0' )
2551 hash += (
unsigned int)(*str);
2569 return (key1 == key2);
2576 return (
unsigned int) ((0xd37e9a1ce2148403ULL * (size_t) key)>>32);
2586 #undef ELEM_DISTANCE 2588 #define ELEM_DISTANCE(pos) (((pos) + hashmap->mask + 1 - (hashmap->hashes[(pos)]>>(hashmap->shift))) & hashmap->mask) 2601 uint32_t elemdistance;
2604 assert(hashmap !=
NULL);
2607 assert(hashmap->
mask > 0);
2608 assert(hashval != 0);
2610 pos = hashval>>(hashmap->
shift);
2617 if( hashmap->
hashes[pos] == 0 )
2621 hashmap->
hashes[pos] = hashval;
2632 hashmap->
hashes[pos] = hashval;
2643 if( distance < elemdistance )
2649 elemdistance = distance;
2651 hashval = hashmap->
hashes[pos];
2652 hashmap->
hashes[pos] = tmphash;
2660 pos = (pos + 1) & hashmap->
mask;
2676 uint32_t elemdistance;
2678 assert(hashmap !=
NULL);
2681 assert(hashmap->
mask > 0);
2685 assert(hashval != 0);
2687 *pos = hashval>>(hashmap->
shift);
2695 if( hashmap->
hashes[*pos] == 0 )
2700 if( elemdistance > distance )
2707 *pos = (*pos + 1) & hashmap->
mask;
2718 assert(hashmap !=
NULL);
2719 assert(hashmap->
shift < 32);
2731 nslots = hashmap->
mask + 1;
2733 newnslots = 2*nslots;
2734 hashmap->
mask = newnslots-1;
2745 for( i = 0; i < nslots; ++i )
2750 if( hashes[i] != 0 )
2773 assert(hashmap !=
NULL);
2774 assert(mapsize >= 0);
2775 assert(blkmem !=
NULL);
2784 (*hashmap)->shift = 32;
2785 (*hashmap)->shift -= (int)ceil(
log(
MAX(32, mapsize / 0.9)) /
log(2.0));
2786 nslots = 1u << (32 - (*hashmap)->shift);
2787 (*hashmap)->mask = nslots - 1;
2788 (*hashmap)->blkmem = blkmem;
2789 (*hashmap)->nelements = 0;
2804 assert(hashmap !=
NULL);
2805 assert(*hashmap !=
NULL);
2807 nslots = (*hashmap)->mask + 1;
2810 uint32_t maxprobelen = 0;
2811 uint64_t probelensum = 0;
2814 assert(hashmap !=
NULL);
2816 for( i = 0; i < nslots; ++i )
2818 if( (*hashmap)->hashes[i] != 0 )
2820 uint32_t probelen = ((i + (*hashmap)->mask + 1 - ((*hashmap)->hashes[i]>>((*hashmap)->shift))) & (*hashmap)->mask) + 1;
2821 probelensum += probelen;
2822 maxprobelen =
MAX(probelen, maxprobelen);
2827 (
unsigned int)(*hashmap)->nelements, (
unsigned int)(*hashmap)->nelements, (
unsigned int)nslots,
2829 if( (*hashmap)->nelements > 0 )
2831 (
SCIP_Real)(probelensum)/(
SCIP_Real)(*hashmap)->nelements, (
unsigned int)maxprobelen);
2855 assert(hashmap !=
NULL);
2858 assert(hashmap->
mask > 0);
2885 assert(hashmap !=
NULL);
2888 assert(hashmap->
mask > 0);
2910 assert(hashmap !=
NULL);
2913 assert(hashmap->
mask > 0);
2929 assert(hashmap !=
NULL);
2932 assert(hashmap->
mask > 0);
2952 assert(hashmap !=
NULL);
2954 assert(hashmap->
mask > 0);
2980 assert(hashmap !=
NULL);
2982 assert(hashmap->
mask > 0);
3004 assert(hashmap !=
NULL);
3007 assert(hashmap->
mask > 0);
3020 assert(hashmap !=
NULL);
3022 assert(hashmap->
mask > 0);
3024 assert(origin !=
NULL);
3029 hashmap->
hashes[pos] = 0;
3035 uint32_t nextpos = (pos + 1) & hashmap->
mask;
3038 if( hashmap->
hashes[nextpos] == 0 )
3042 if( (hashmap->
hashes[nextpos]>>(hashmap->
shift)) == nextpos )
3049 hashmap->
hashes[nextpos] = 0;
3064 uint32_t maxprobelen = 0;
3065 uint64_t probelensum = 0;
3069 assert(hashmap !=
NULL);
3071 nslots = hashmap->
mask + 1;
3074 for( i = 0; i < nslots; ++i )
3076 if( hashmap->
hashes[i] != 0 )
3079 probelensum += probelen;
3080 maxprobelen =
MAX(probelen, maxprobelen);
3101 assert(hashmap !=
NULL);
3119 return (
int) hashmap->
mask + 1;
3128 assert(hashmap !=
NULL);
3130 return hashmap->
hashes[entryidx] == 0 ?
NULL : &hashmap->
slots[entryidx];
3138 assert(entry !=
NULL);
3148 assert(entry !=
NULL);
3158 assert(entry !=
NULL);
3168 assert(hashmap !=
NULL);
3188 assert(realarray !=
NULL);
3189 assert(blkmem !=
NULL);
3192 (*realarray)->blkmem = blkmem;
3193 (*realarray)->vals =
NULL;
3194 (*realarray)->valssize = 0;
3195 (*realarray)->firstidx = -1;
3196 (*realarray)->minusedidx = INT_MAX;
3197 (*realarray)->maxusedidx = INT_MIN;
3209 assert(realarray !=
NULL);
3210 assert(sourcerealarray !=
NULL);
3213 if( sourcerealarray->
valssize > 0 )
3218 (*realarray)->valssize = sourcerealarray->
valssize;
3219 (*realarray)->firstidx = sourcerealarray->
firstidx;
3220 (*realarray)->minusedidx = sourcerealarray->
minusedidx;
3221 (*realarray)->maxusedidx = sourcerealarray->
maxusedidx;
3231 assert(realarray !=
NULL);
3232 assert(*realarray !=
NULL);
3254 assert(realarray !=
NULL);
3259 assert(0 <= minidx);
3260 assert(minidx <= maxidx);
3264 assert(0 <= minidx);
3265 assert(minidx <= maxidx);
3267 SCIPdebugMessage(
"extending realarray %p (firstidx=%d, size=%d, range=[%d,%d]) to range [%d,%d]\n",
3268 (
void*)realarray, realarray->
firstidx, realarray->valssize, realarray->minusedidx, realarray->maxusedidx, minidx, maxidx);
3271 nused = maxidx - minidx + 1;
3272 if( nused > realarray->valssize )
3278 newvalssize =
calcGrowSize(arraygrowinit, arraygrowfac, nused);
3280 nfree = newvalssize - nused;
3281 newfirstidx = minidx - nfree/2;
3282 newfirstidx =
MAX(newfirstidx, 0);
3283 assert(newfirstidx <= minidx);
3284 assert(maxidx < newfirstidx + newvalssize);
3287 if( realarray->firstidx != -1 )
3289 for( i = 0; i < realarray->minusedidx - newfirstidx; ++i )
3293 assert(realarray->maxusedidx - realarray->minusedidx + 1 > 0);
3296 &(realarray->vals[realarray->minusedidx - realarray->firstidx]),
3297 realarray->maxusedidx - realarray->minusedidx + 1);
3298 for( i = realarray->maxusedidx - newfirstidx + 1; i < newvalssize; ++i )
3303 for( i = 0; i < newvalssize; ++i )
3309 realarray->vals = newvals;
3310 realarray->valssize = newvalssize;
3311 realarray->firstidx = newfirstidx;
3313 else if( realarray->firstidx == -1 )
3316 nfree = realarray->valssize - nused;
3318 realarray->firstidx = minidx - nfree/2;
3319 assert(realarray->firstidx <= minidx);
3320 assert(maxidx < realarray->firstidx + realarray->valssize);
3322 for( i = 0; i < realarray->valssize; ++i )
3323 assert(realarray->vals[i] == 0.0);
3326 else if( minidx < realarray->firstidx )
3329 nfree = realarray->valssize - nused;
3331 newfirstidx = minidx - nfree/2;
3332 newfirstidx =
MAX(newfirstidx, 0);
3333 assert(newfirstidx <= minidx);
3334 assert(maxidx < newfirstidx + realarray->valssize);
3336 if( realarray->minusedidx <= realarray->maxusedidx )
3340 assert(realarray->firstidx <= realarray->minusedidx);
3341 assert(realarray->maxusedidx < realarray->firstidx + realarray->valssize);
3344 shift = realarray->firstidx - newfirstidx;
3346 for( i = realarray->maxusedidx - realarray->firstidx; i >= realarray->minusedidx - realarray->firstidx; --i )
3348 assert(0 <= i + shift && i + shift < realarray->valssize);
3349 realarray->vals[i + shift] = realarray->vals[i];
3352 for( i = 0; i < shift; ++i )
3353 realarray->vals[realarray->minusedidx - realarray->firstidx + i] = 0.0;
3355 realarray->firstidx = newfirstidx;
3357 else if( maxidx >= realarray->firstidx + realarray->valssize )
3360 nfree = realarray->valssize - nused;
3362 newfirstidx = minidx - nfree/2;
3363 newfirstidx =
MAX(newfirstidx, 0);
3364 assert(newfirstidx <= minidx);
3365 assert(maxidx < newfirstidx + realarray->valssize);
3367 if( realarray->minusedidx <= realarray->maxusedidx )
3371 assert(realarray->firstidx <= realarray->minusedidx);
3372 assert(realarray->maxusedidx < realarray->firstidx + realarray->valssize);
3375 shift = newfirstidx - realarray->firstidx;
3377 for( i = realarray->minusedidx - realarray->firstidx; i <= realarray->maxusedidx - realarray->firstidx; ++i )
3379 assert(0 <= i - shift && i - shift < realarray->valssize);
3380 realarray->vals[i - shift] = realarray->vals[i];
3383 for( i = 0; i < shift; ++i )
3384 realarray->vals[realarray->maxusedidx - realarray->firstidx - i] = 0.0;
3386 realarray->firstidx = newfirstidx;
3389 assert(minidx >= realarray->firstidx);
3390 assert(maxidx < realarray->firstidx + realarray->valssize);
3400 assert(realarray !=
NULL);
3402 SCIPdebugMessage(
"clearing realarray %p (firstidx=%d, size=%d, range=[%d,%d])\n",
3403 (
void*)realarray, realarray->
firstidx, realarray->valssize, realarray->minusedidx, realarray->maxusedidx);
3405 if( realarray->minusedidx <= realarray->maxusedidx )
3407 assert(realarray->firstidx <= realarray->minusedidx);
3408 assert(realarray->maxusedidx < realarray->firstidx + realarray->valssize);
3409 assert(realarray->firstidx != -1);
3410 assert(realarray->valssize > 0);
3414 realarray->maxusedidx - realarray->minusedidx + 1);
3417 realarray->minusedidx = INT_MAX;
3418 realarray->maxusedidx = INT_MIN;
3420 assert(realarray->minusedidx == INT_MAX);
3421 assert(realarray->maxusedidx == INT_MIN);
3432 assert(realarray !=
NULL);
3435 if( idx < realarray->minusedidx || idx > realarray->
maxusedidx )
3440 assert(idx - realarray->
firstidx >= 0);
3456 assert(realarray !=
NULL);
3459 SCIPdebugMessage(
"setting realarray %p (firstidx=%d, size=%d, range=[%d,%d]) index %d to %g\n",
3460 (
void*)realarray, realarray->
firstidx, realarray->valssize, realarray->minusedidx, realarray->maxusedidx, idx, val);
3466 assert(idx >= realarray->firstidx);
3467 assert(idx < realarray->firstidx + realarray->valssize);
3470 realarray->vals[idx - realarray->firstidx] = val;
3473 realarray->minusedidx =
MIN(realarray->minusedidx, idx);
3474 realarray->maxusedidx =
MAX(realarray->maxusedidx, idx);
3476 else if( idx >= realarray->firstidx && idx < realarray->firstidx + realarray->valssize )
3479 realarray->vals[idx - realarray->firstidx] = 0.0;
3482 if( idx == realarray->minusedidx )
3484 assert(realarray->maxusedidx >= 0);
3485 assert(realarray->maxusedidx < realarray->firstidx + realarray->valssize);
3488 realarray->minusedidx++;
3490 while( realarray->minusedidx <= realarray->maxusedidx
3491 && realarray->vals[realarray->minusedidx - realarray->firstidx] == 0.0 );
3493 if( realarray->minusedidx > realarray->maxusedidx )
3495 realarray->minusedidx = INT_MAX;
3496 realarray->maxusedidx = INT_MIN;
3499 else if( idx == realarray->maxusedidx )
3501 assert(realarray->minusedidx >= 0);
3502 assert(realarray->minusedidx < realarray->maxusedidx);
3503 assert(realarray->maxusedidx < realarray->firstidx + realarray->valssize);
3506 realarray->maxusedidx--;
3507 assert(realarray->minusedidx <= realarray->maxusedidx);
3509 while( realarray->vals[realarray->maxusedidx - realarray->firstidx] == 0.0 );
3539 assert(realarray !=
NULL);
3549 assert(realarray !=
NULL);
3560 assert(intarray !=
NULL);
3561 assert(blkmem !=
NULL);
3564 (*intarray)->blkmem = blkmem;
3565 (*intarray)->vals =
NULL;
3566 (*intarray)->valssize = 0;
3567 (*intarray)->firstidx = -1;
3568 (*intarray)->minusedidx = INT_MAX;
3569 (*intarray)->maxusedidx = INT_MIN;
3581 assert(intarray !=
NULL);
3582 assert(sourceintarray !=
NULL);
3589 (*intarray)->valssize = sourceintarray->
valssize;
3590 (*intarray)->firstidx = sourceintarray->
firstidx;
3591 (*intarray)->minusedidx = sourceintarray->
minusedidx;
3592 (*intarray)->maxusedidx = sourceintarray->
maxusedidx;
3602 assert(intarray !=
NULL);
3603 assert(*intarray !=
NULL);
3625 assert(intarray !=
NULL);
3630 assert(0 <= minidx);
3631 assert(minidx <= maxidx);
3635 assert(0 <= minidx);
3636 assert(minidx <= maxidx);
3638 SCIPdebugMessage(
"extending intarray %p (firstidx=%d, size=%d, range=[%d,%d]) to range [%d,%d]\n",
3639 (
void*)intarray, intarray->
firstidx, intarray->valssize, intarray->minusedidx, intarray->maxusedidx, minidx, maxidx);
3642 nused = maxidx - minidx + 1;
3643 if( nused > intarray->valssize )
3649 newvalssize =
calcGrowSize(arraygrowinit, arraygrowfac, nused);
3651 nfree = newvalssize - nused;
3652 newfirstidx = minidx - nfree/2;
3653 newfirstidx =
MAX(newfirstidx, 0);
3654 assert(newfirstidx <= minidx);
3655 assert(maxidx < newfirstidx + newvalssize);
3658 if( intarray->firstidx != -1 )
3660 for( i = 0; i < intarray->minusedidx - newfirstidx; ++i )
3664 assert(intarray->maxusedidx - intarray->minusedidx + 1 > 0);
3667 &intarray->vals[intarray->minusedidx - intarray->firstidx],
3668 intarray->maxusedidx - intarray->minusedidx + 1);
3669 for( i = intarray->maxusedidx - newfirstidx + 1; i < newvalssize; ++i )
3674 for( i = 0; i < newvalssize; ++i )
3680 intarray->vals = newvals;
3681 intarray->valssize = newvalssize;
3682 intarray->firstidx = newfirstidx;
3684 else if( intarray->firstidx == -1 )
3687 nfree = intarray->valssize - nused;
3689 intarray->firstidx = minidx - nfree/2;
3690 assert(intarray->firstidx <= minidx);
3691 assert(maxidx < intarray->firstidx + intarray->valssize);
3693 for( i = 0; i < intarray->valssize; ++i )
3694 assert(intarray->vals[i] == 0);
3697 else if( minidx < intarray->firstidx )
3700 nfree = intarray->valssize - nused;
3702 newfirstidx = minidx - nfree/2;
3703 newfirstidx =
MAX(newfirstidx, 0);
3704 assert(newfirstidx <= minidx);
3705 assert(maxidx < newfirstidx + intarray->valssize);
3707 if( intarray->minusedidx <= intarray->maxusedidx )
3711 assert(intarray->firstidx <= intarray->minusedidx);
3712 assert(intarray->maxusedidx < intarray->firstidx + intarray->valssize);
3715 shift = intarray->firstidx - newfirstidx;
3717 for( i = intarray->maxusedidx - intarray->firstidx; i >= intarray->minusedidx - intarray->firstidx; --i )
3719 assert(0 <= i + shift && i + shift < intarray->valssize);
3720 intarray->vals[i + shift] = intarray->vals[i];
3723 for( i = 0; i < shift; ++i )
3724 intarray->vals[intarray->minusedidx - intarray->firstidx + i] = 0;
3726 intarray->firstidx = newfirstidx;
3728 else if( maxidx >= intarray->firstidx + intarray->valssize )
3731 nfree = intarray->valssize - nused;
3733 newfirstidx = minidx - nfree/2;
3734 newfirstidx =
MAX(newfirstidx, 0);
3735 assert(newfirstidx <= minidx);
3736 assert(maxidx < newfirstidx + intarray->valssize);
3738 if( intarray->minusedidx <= intarray->maxusedidx )
3742 assert(intarray->firstidx <= intarray->minusedidx);
3743 assert(intarray->maxusedidx < intarray->firstidx + intarray->valssize);
3746 shift = newfirstidx - intarray->firstidx;
3748 for( i = intarray->minusedidx - intarray->firstidx; i <= intarray->maxusedidx - intarray->firstidx; ++i )
3750 assert(0 <= i - shift && i - shift < intarray->valssize);
3751 intarray->vals[i - shift] = intarray->vals[i];
3754 for( i = 0; i < shift; ++i )
3755 intarray->vals[intarray->maxusedidx - intarray->firstidx - i] = 0;
3757 intarray->firstidx = newfirstidx;
3760 assert(minidx >= intarray->firstidx);
3761 assert(maxidx < intarray->firstidx + intarray->valssize);
3771 assert(intarray !=
NULL);
3773 SCIPdebugMessage(
"clearing intarray %p (firstidx=%d, size=%d, range=[%d,%d])\n",
3774 (
void*)intarray, intarray->
firstidx, intarray->valssize, intarray->minusedidx, intarray->maxusedidx);
3776 if( intarray->minusedidx <= intarray->maxusedidx )
3778 assert(intarray->firstidx <= intarray->minusedidx);
3779 assert(intarray->maxusedidx < intarray->firstidx + intarray->valssize);
3780 assert(intarray->firstidx != -1);
3781 assert(intarray->valssize > 0);
3785 intarray->maxusedidx - intarray->minusedidx + 1);
3788 intarray->minusedidx = INT_MAX;
3789 intarray->maxusedidx = INT_MIN;
3791 assert(intarray->minusedidx == INT_MAX);
3792 assert(intarray->maxusedidx == INT_MIN);
3803 assert(intarray !=
NULL);
3806 if( idx < intarray->minusedidx || idx > intarray->
maxusedidx )
3811 assert(idx - intarray->
firstidx >= 0);
3827 assert(intarray !=
NULL);
3830 SCIPdebugMessage(
"setting intarray %p (firstidx=%d, size=%d, range=[%d,%d]) index %d to %d\n",
3831 (
void*)intarray, intarray->
firstidx, intarray->valssize, intarray->minusedidx, intarray->maxusedidx, idx, val);
3837 assert(idx >= intarray->firstidx);
3838 assert(idx < intarray->firstidx + intarray->valssize);
3841 intarray->vals[idx - intarray->firstidx] = val;
3844 intarray->minusedidx =
MIN(intarray->minusedidx, idx);
3845 intarray->maxusedidx =
MAX(intarray->maxusedidx, idx);
3847 else if( idx >= intarray->firstidx && idx < intarray->firstidx + intarray->valssize )
3850 intarray->vals[idx - intarray->firstidx] = 0;
3853 if( idx == intarray->minusedidx )
3855 assert(intarray->maxusedidx >= 0);
3856 assert(intarray->maxusedidx < intarray->firstidx + intarray->valssize);
3859 intarray->minusedidx++;
3861 while( intarray->minusedidx <= intarray->maxusedidx
3862 && intarray->vals[intarray->minusedidx - intarray->firstidx] == 0 );
3863 if( intarray->minusedidx > intarray->maxusedidx )
3865 intarray->minusedidx = INT_MAX;
3866 intarray->maxusedidx = INT_MIN;
3869 else if( idx == intarray->maxusedidx )
3871 assert(intarray->minusedidx >= 0);
3872 assert(intarray->minusedidx < intarray->maxusedidx);
3873 assert(intarray->maxusedidx < intarray->firstidx + intarray->valssize);
3876 intarray->maxusedidx--;
3877 assert(intarray->minusedidx <= intarray->maxusedidx);
3879 while( intarray->vals[intarray->maxusedidx - intarray->firstidx] == 0 );
3903 assert(intarray !=
NULL);
3913 assert(intarray !=
NULL);
3925 assert(boolarray !=
NULL);
3926 assert(blkmem !=
NULL);
3929 (*boolarray)->blkmem = blkmem;
3930 (*boolarray)->vals =
NULL;
3931 (*boolarray)->valssize = 0;
3932 (*boolarray)->firstidx = -1;
3933 (*boolarray)->minusedidx = INT_MAX;
3934 (*boolarray)->maxusedidx = INT_MIN;
3946 assert(boolarray !=
NULL);
3947 assert(sourceboolarray !=
NULL);
3950 if( sourceboolarray->
valssize > 0 )
3955 (*boolarray)->valssize = sourceboolarray->
valssize;
3956 (*boolarray)->firstidx = sourceboolarray->
firstidx;
3957 (*boolarray)->minusedidx = sourceboolarray->
minusedidx;
3958 (*boolarray)->maxusedidx = sourceboolarray->
maxusedidx;
3968 assert(boolarray !=
NULL);
3969 assert(*boolarray !=
NULL);
3991 assert(boolarray !=
NULL);
3996 assert(0 <= minidx);
3997 assert(minidx <= maxidx);
4001 assert(0 <= minidx);
4002 assert(minidx <= maxidx);
4004 SCIPdebugMessage(
"extending boolarray %p (firstidx=%d, size=%d, range=[%d,%d]) to range [%d,%d]\n",
4005 (
void*)boolarray, boolarray->
firstidx, boolarray->valssize, boolarray->minusedidx, boolarray->maxusedidx, minidx, maxidx);
4008 nused = maxidx - minidx + 1;
4009 if( nused > boolarray->valssize )
4015 newvalssize =
calcGrowSize(arraygrowinit, arraygrowfac, nused);
4017 nfree = newvalssize - nused;
4018 newfirstidx = minidx - nfree/2;
4019 newfirstidx =
MAX(newfirstidx, 0);
4020 assert(newfirstidx <= minidx);
4021 assert(maxidx < newfirstidx + newvalssize);
4024 if( boolarray->firstidx != -1 )
4026 for( i = 0; i < boolarray->minusedidx - newfirstidx; ++i )
4030 assert(boolarray->maxusedidx - boolarray->minusedidx + 1 > 0);
4033 &boolarray->vals[boolarray->minusedidx - boolarray->firstidx],
4034 boolarray->maxusedidx - boolarray->minusedidx + 1);
4035 for( i = boolarray->maxusedidx - newfirstidx + 1; i < newvalssize; ++i )
4040 for( i = 0; i < newvalssize; ++i )
4046 boolarray->vals = newvals;
4047 boolarray->valssize = newvalssize;
4048 boolarray->firstidx = newfirstidx;
4050 else if( boolarray->firstidx == -1 )
4053 nfree = boolarray->valssize - nused;
4055 boolarray->firstidx = minidx - nfree/2;
4056 assert(boolarray->firstidx <= minidx);
4057 assert(maxidx < boolarray->firstidx + boolarray->valssize);
4059 for( i = 0; i < boolarray->valssize; ++i )
4060 assert(boolarray->vals[i] ==
FALSE);
4063 else if( minidx < boolarray->firstidx )
4066 nfree = boolarray->valssize - nused;
4068 newfirstidx = minidx - nfree/2;
4069 newfirstidx =
MAX(newfirstidx, 0);
4070 assert(newfirstidx <= minidx);
4071 assert(maxidx < newfirstidx + boolarray->valssize);
4073 if( boolarray->minusedidx <= boolarray->maxusedidx )
4077 assert(boolarray->firstidx <= boolarray->minusedidx);
4078 assert(boolarray->maxusedidx < boolarray->firstidx + boolarray->valssize);
4081 shift = boolarray->firstidx - newfirstidx;
4083 for( i = boolarray->maxusedidx - boolarray->firstidx; i >= boolarray->minusedidx - boolarray->firstidx; --i )
4085 assert(0 <= i + shift && i + shift < boolarray->valssize);
4086 boolarray->vals[i + shift] = boolarray->vals[i];
4089 for( i = 0; i < shift; ++i )
4090 boolarray->vals[boolarray->minusedidx - boolarray->firstidx + i] =
FALSE;
4092 boolarray->firstidx = newfirstidx;
4094 else if( maxidx >= boolarray->firstidx + boolarray->valssize )
4097 nfree = boolarray->valssize - nused;
4099 newfirstidx = minidx - nfree/2;
4100 newfirstidx =
MAX(newfirstidx, 0);
4101 assert(newfirstidx <= minidx);
4102 assert(maxidx < newfirstidx + boolarray->valssize);
4104 if( boolarray->minusedidx <= boolarray->maxusedidx )
4108 assert(boolarray->firstidx <= boolarray->minusedidx);
4109 assert(boolarray->maxusedidx < boolarray->firstidx + boolarray->valssize);
4112 shift = newfirstidx - boolarray->firstidx;
4115 assert(0 <= boolarray->minusedidx - boolarray->firstidx - shift);
4116 assert(boolarray->maxusedidx - boolarray->firstidx - shift < boolarray->valssize);
4117 BMSmoveMemoryArray(&(boolarray->vals[boolarray->minusedidx - boolarray->firstidx - shift]),
4118 &(boolarray->vals[boolarray->minusedidx - boolarray->firstidx]),
4119 boolarray->maxusedidx - boolarray->minusedidx + 1);
4122 for( i = 0; i < shift; ++i )
4123 boolarray->vals[boolarray->maxusedidx - boolarray->firstidx - i] =
FALSE;
4125 boolarray->firstidx = newfirstidx;
4128 assert(minidx >= boolarray->firstidx);
4129 assert(maxidx < boolarray->firstidx + boolarray->valssize);
4139 assert(boolarray !=
NULL);
4141 SCIPdebugMessage(
"clearing boolarray %p (firstidx=%d, size=%d, range=[%d,%d])\n",
4142 (
void*)boolarray, boolarray->
firstidx, boolarray->valssize, boolarray->minusedidx, boolarray->maxusedidx);
4144 if( boolarray->minusedidx <= boolarray->maxusedidx )
4146 assert(boolarray->firstidx <= boolarray->minusedidx);
4147 assert(boolarray->maxusedidx < boolarray->firstidx + boolarray->valssize);
4148 assert(boolarray->firstidx != -1);
4149 assert(boolarray->valssize > 0);
4153 boolarray->maxusedidx - boolarray->minusedidx + 1);
4156 boolarray->minusedidx = INT_MAX;
4157 boolarray->maxusedidx = INT_MIN;
4159 assert(boolarray->minusedidx == INT_MAX);
4160 assert(boolarray->maxusedidx == INT_MIN);
4171 assert(boolarray !=
NULL);
4174 if( idx < boolarray->minusedidx || idx > boolarray->
maxusedidx )
4179 assert(idx - boolarray->
firstidx >= 0);
4195 assert(boolarray !=
NULL);
4198 SCIPdebugMessage(
"setting boolarray %p (firstidx=%d, size=%d, range=[%d,%d]) index %d to %u\n",
4199 (
void*)boolarray, boolarray->
firstidx, boolarray->valssize, boolarray->minusedidx, boolarray->maxusedidx, idx, val);
4205 assert(idx >= boolarray->firstidx);
4206 assert(idx < boolarray->firstidx + boolarray->valssize);
4209 boolarray->vals[idx - boolarray->firstidx] = val;
4212 boolarray->minusedidx =
MIN(boolarray->minusedidx, idx);
4213 boolarray->maxusedidx =
MAX(boolarray->maxusedidx, idx);
4215 else if( idx >= boolarray->firstidx && idx < boolarray->firstidx + boolarray->valssize )
4218 boolarray->vals[idx - boolarray->firstidx] =
FALSE;
4221 if( idx == boolarray->minusedidx )
4223 assert(boolarray->maxusedidx >= 0);
4224 assert(boolarray->maxusedidx < boolarray->firstidx + boolarray->valssize);
4227 boolarray->minusedidx++;
4229 while( boolarray->minusedidx <= boolarray->maxusedidx
4230 && boolarray->vals[boolarray->minusedidx - boolarray->firstidx] ==
FALSE );
4231 if( boolarray->minusedidx > boolarray->maxusedidx )
4233 boolarray->minusedidx = INT_MAX;
4234 boolarray->maxusedidx = INT_MIN;
4237 else if( idx == boolarray->maxusedidx )
4239 assert(boolarray->minusedidx >= 0);
4240 assert(boolarray->minusedidx < boolarray->maxusedidx);
4241 assert(boolarray->maxusedidx < boolarray->firstidx + boolarray->valssize);
4244 boolarray->maxusedidx--;
4245 assert(boolarray->minusedidx <= boolarray->maxusedidx);
4247 while( boolarray->vals[boolarray->maxusedidx - boolarray->firstidx] ==
FALSE );
4259 assert(boolarray !=
NULL);
4269 assert(boolarray !=
NULL);
4281 assert(ptrarray !=
NULL);
4282 assert(blkmem !=
NULL);
4285 (*ptrarray)->blkmem = blkmem;
4286 (*ptrarray)->vals =
NULL;
4287 (*ptrarray)->valssize = 0;
4288 (*ptrarray)->firstidx = -1;
4289 (*ptrarray)->minusedidx = INT_MAX;
4290 (*ptrarray)->maxusedidx = INT_MIN;
4302 assert(ptrarray !=
NULL);
4303 assert(sourceptrarray !=
NULL);
4310 (*ptrarray)->valssize = sourceptrarray->
valssize;
4311 (*ptrarray)->firstidx = sourceptrarray->
firstidx;
4312 (*ptrarray)->minusedidx = sourceptrarray->
minusedidx;
4313 (*ptrarray)->maxusedidx = sourceptrarray->
maxusedidx;
4323 assert(ptrarray !=
NULL);
4324 assert(*ptrarray !=
NULL);
4346 assert(ptrarray !=
NULL);
4351 assert(0 <= minidx);
4352 assert(minidx <= maxidx);
4356 assert(0 <= minidx);
4357 assert(minidx <= maxidx);
4359 SCIPdebugMessage(
"extending ptrarray %p (firstidx=%d, size=%d, range=[%d,%d]) to range [%d,%d]\n",
4360 (
void*)ptrarray, ptrarray->
firstidx, ptrarray->valssize, ptrarray->minusedidx, ptrarray->maxusedidx, minidx, maxidx);
4363 nused = maxidx - minidx + 1;
4364 if( nused > ptrarray->valssize )
4370 newvalssize =
calcGrowSize(arraygrowinit, arraygrowfac, nused);
4372 nfree = newvalssize - nused;
4373 newfirstidx = minidx - nfree/2;
4374 newfirstidx =
MAX(newfirstidx, 0);
4375 assert(newfirstidx <= minidx);
4376 assert(maxidx < newfirstidx + newvalssize);
4379 if( ptrarray->firstidx != -1 )
4381 for( i = 0; i < ptrarray->minusedidx - newfirstidx; ++i )
4385 assert(ptrarray->maxusedidx - ptrarray->minusedidx + 1 > 0);
4388 &(ptrarray->vals[ptrarray->minusedidx - ptrarray->firstidx]),
4389 ptrarray->maxusedidx - ptrarray->minusedidx + 1);
4390 for( i = ptrarray->maxusedidx - newfirstidx + 1; i < newvalssize; ++i )
4395 for( i = 0; i < newvalssize; ++i )
4401 ptrarray->vals = newvals;
4402 ptrarray->valssize = newvalssize;
4403 ptrarray->firstidx = newfirstidx;
4405 else if( ptrarray->firstidx == -1 )
4408 nfree = ptrarray->valssize - nused;
4410 ptrarray->firstidx = minidx - nfree/2;
4411 assert(ptrarray->firstidx <= minidx);
4412 assert(maxidx < ptrarray->firstidx + ptrarray->valssize);
4414 for( i = 0; i < ptrarray->valssize; ++i )
4415 assert(ptrarray->vals[i] ==
NULL);
4418 else if( minidx < ptrarray->firstidx )
4421 nfree = ptrarray->valssize - nused;
4423 newfirstidx = minidx - nfree/2;
4424 newfirstidx =
MAX(newfirstidx, 0);
4425 assert(newfirstidx <= minidx);
4426 assert(maxidx < newfirstidx + ptrarray->valssize);
4428 if( ptrarray->minusedidx <= ptrarray->maxusedidx )
4432 assert(ptrarray->firstidx <= ptrarray->minusedidx);
4433 assert(ptrarray->maxusedidx < ptrarray->firstidx + ptrarray->valssize);
4436 shift = ptrarray->firstidx - newfirstidx;
4438 for( i = ptrarray->maxusedidx - ptrarray->firstidx; i >= ptrarray->minusedidx - ptrarray->firstidx; --i )
4440 assert(0 <= i + shift && i + shift < ptrarray->valssize);
4441 ptrarray->vals[i + shift] = ptrarray->vals[i];
4444 for( i = 0; i < shift; ++i )
4445 ptrarray->vals[ptrarray->minusedidx - ptrarray->firstidx + i] =
NULL;
4447 ptrarray->firstidx = newfirstidx;
4449 else if( maxidx >= ptrarray->firstidx + ptrarray->valssize )
4452 nfree = ptrarray->valssize - nused;
4454 newfirstidx = minidx - nfree/2;
4455 newfirstidx =
MAX(newfirstidx, 0);
4456 assert(newfirstidx <= minidx);
4457 assert(maxidx < newfirstidx + ptrarray->valssize);
4459 if( ptrarray->minusedidx <= ptrarray->maxusedidx )
4463 assert(ptrarray->firstidx <= ptrarray->minusedidx);
4464 assert(ptrarray->maxusedidx < ptrarray->firstidx + ptrarray->valssize);
4467 shift = newfirstidx - ptrarray->firstidx;
4469 for( i = ptrarray->minusedidx - ptrarray->firstidx; i <= ptrarray->maxusedidx - ptrarray->firstidx; ++i )
4471 assert(0 <= i - shift && i - shift < ptrarray->valssize);
4472 ptrarray->vals[i - shift] = ptrarray->vals[i];
4475 for( i = 0; i < shift; ++i )
4476 ptrarray->vals[ptrarray->maxusedidx - ptrarray->firstidx - i] =
NULL;
4478 ptrarray->firstidx = newfirstidx;
4481 assert(minidx >= ptrarray->firstidx);
4482 assert(maxidx < ptrarray->firstidx + ptrarray->valssize);
4492 assert(ptrarray !=
NULL);
4494 SCIPdebugMessage(
"clearing ptrarray %p (firstidx=%d, size=%d, range=[%d,%d])\n",
4495 (
void*)ptrarray, ptrarray->
firstidx, ptrarray->valssize, ptrarray->minusedidx, ptrarray->maxusedidx);
4497 if( ptrarray->minusedidx <= ptrarray->maxusedidx )
4499 assert(ptrarray->firstidx <= ptrarray->minusedidx);
4500 assert(ptrarray->maxusedidx < ptrarray->firstidx + ptrarray->valssize);
4501 assert(ptrarray->firstidx != -1);
4502 assert(ptrarray->valssize > 0);
4506 ptrarray->maxusedidx - ptrarray->minusedidx + 1);
4509 ptrarray->minusedidx = INT_MAX;
4510 ptrarray->maxusedidx = INT_MIN;
4512 assert(ptrarray->minusedidx == INT_MAX);
4513 assert(ptrarray->maxusedidx == INT_MIN);
4524 assert(ptrarray !=
NULL);
4527 if( idx < ptrarray->minusedidx || idx > ptrarray->
maxusedidx )
4532 assert(idx - ptrarray->
firstidx >= 0);
4548 assert(ptrarray !=
NULL);
4551 SCIPdebugMessage(
"setting ptrarray %p (firstidx=%d, size=%d, range=[%d,%d]) index %d to %p\n",
4552 (
void*)ptrarray, ptrarray->
firstidx, ptrarray->valssize, ptrarray->minusedidx, ptrarray->maxusedidx, idx, val);
4558 assert(idx >= ptrarray->firstidx);
4559 assert(idx < ptrarray->firstidx + ptrarray->valssize);
4562 ptrarray->vals[idx - ptrarray->firstidx] = val;
4565 ptrarray->minusedidx =
MIN(ptrarray->minusedidx, idx);
4566 ptrarray->maxusedidx =
MAX(ptrarray->maxusedidx, idx);
4568 else if( idx >= ptrarray->firstidx && idx < ptrarray->firstidx + ptrarray->valssize )
4571 ptrarray->vals[idx - ptrarray->firstidx] =
NULL;
4574 if( idx == ptrarray->minusedidx )
4576 assert(ptrarray->maxusedidx >= 0);
4577 assert(ptrarray->maxusedidx < ptrarray->firstidx + ptrarray->valssize);
4580 ptrarray->minusedidx++;
4582 while( ptrarray->minusedidx <= ptrarray->maxusedidx
4583 && ptrarray->vals[ptrarray->minusedidx - ptrarray->firstidx] ==
NULL );
4584 if( ptrarray->minusedidx > ptrarray->maxusedidx )
4586 ptrarray->minusedidx = INT_MAX;
4587 ptrarray->maxusedidx = INT_MIN;
4590 else if( idx == ptrarray->maxusedidx )
4592 assert(ptrarray->minusedidx >= 0);
4593 assert(ptrarray->minusedidx < ptrarray->maxusedidx);
4594 assert(ptrarray->maxusedidx < ptrarray->firstidx + ptrarray->valssize);
4597 ptrarray->maxusedidx--;
4598 assert(ptrarray->minusedidx <= ptrarray->maxusedidx);
4600 while( ptrarray->vals[ptrarray->maxusedidx - ptrarray->firstidx] ==
NULL );
4612 assert(ptrarray !=
NULL);
4622 assert(ptrarray !=
NULL);
4638 value1 = (int)(
size_t)elem1;
4639 value2 = (int)(
size_t)elem2;
4641 if( value1 < value2 )
4644 if( value2 < value1 )
4662 assert(indcomp !=
NULL);
4663 assert(len == 0 || perm !=
NULL);
4666 for( pos = 0; pos < len; ++pos )
4673 #define SORTTPL_NAMEEXT Ind 4674 #define SORTTPL_KEYTYPE int 4675 #define SORTTPL_INDCOMP 4680 #define SORTTPL_NAMEEXT Ptr 4681 #define SORTTPL_KEYTYPE void* 4682 #define SORTTPL_PTRCOMP 4687 #define SORTTPL_NAMEEXT PtrPtr 4688 #define SORTTPL_KEYTYPE void* 4689 #define SORTTPL_FIELD1TYPE void* 4690 #define SORTTPL_PTRCOMP 4695 #define SORTTPL_NAMEEXT PtrReal 4696 #define SORTTPL_KEYTYPE void* 4697 #define SORTTPL_FIELD1TYPE SCIP_Real 4698 #define SORTTPL_PTRCOMP 4703 #define SORTTPL_NAMEEXT PtrInt 4704 #define SORTTPL_KEYTYPE void* 4705 #define SORTTPL_FIELD1TYPE int 4706 #define SORTTPL_PTRCOMP 4711 #define SORTTPL_NAMEEXT PtrBool 4712 #define SORTTPL_KEYTYPE void* 4713 #define SORTTPL_FIELD1TYPE SCIP_Bool 4714 #define SORTTPL_PTRCOMP 4719 #define SORTTPL_NAMEEXT PtrIntInt 4720 #define SORTTPL_KEYTYPE void* 4721 #define SORTTPL_FIELD1TYPE int 4722 #define SORTTPL_FIELD2TYPE int 4723 #define SORTTPL_PTRCOMP 4728 #define SORTTPL_NAMEEXT PtrRealInt 4729 #define SORTTPL_KEYTYPE void* 4730 #define SORTTPL_FIELD1TYPE SCIP_Real 4731 #define SORTTPL_FIELD2TYPE int 4732 #define SORTTPL_PTRCOMP 4737 #define SORTTPL_NAMEEXT PtrRealBool 4738 #define SORTTPL_KEYTYPE void* 4739 #define SORTTPL_FIELD1TYPE SCIP_Real 4740 #define SORTTPL_FIELD2TYPE SCIP_Bool 4741 #define SORTTPL_PTRCOMP 4746 #define SORTTPL_NAMEEXT PtrPtrInt 4747 #define SORTTPL_KEYTYPE void* 4748 #define SORTTPL_FIELD1TYPE void* 4749 #define SORTTPL_FIELD2TYPE int 4750 #define SORTTPL_PTRCOMP 4755 #define SORTTPL_NAMEEXT PtrPtrReal 4756 #define SORTTPL_KEYTYPE void* 4757 #define SORTTPL_FIELD1TYPE void* 4758 #define SORTTPL_FIELD2TYPE SCIP_Real 4759 #define SORTTPL_PTRCOMP 4764 #define SORTTPL_NAMEEXT PtrRealIntInt 4765 #define SORTTPL_KEYTYPE void* 4766 #define SORTTPL_FIELD1TYPE SCIP_Real 4767 #define SORTTPL_FIELD2TYPE int 4768 #define SORTTPL_FIELD3TYPE int 4769 #define SORTTPL_PTRCOMP 4774 #define SORTTPL_NAMEEXT PtrPtrIntInt 4775 #define SORTTPL_KEYTYPE void* 4776 #define SORTTPL_FIELD1TYPE void* 4777 #define SORTTPL_FIELD2TYPE int 4778 #define SORTTPL_FIELD3TYPE int 4779 #define SORTTPL_PTRCOMP 4784 #define SORTTPL_NAMEEXT PtrPtrRealInt 4785 #define SORTTPL_KEYTYPE void* 4786 #define SORTTPL_FIELD1TYPE void* 4787 #define SORTTPL_FIELD2TYPE SCIP_Real 4788 #define SORTTPL_FIELD3TYPE int 4789 #define SORTTPL_PTRCOMP 4794 #define SORTTPL_NAMEEXT PtrPtrRealBool 4795 #define SORTTPL_KEYTYPE void* 4796 #define SORTTPL_FIELD1TYPE void* 4797 #define SORTTPL_FIELD2TYPE SCIP_Real 4798 #define SORTTPL_FIELD3TYPE SCIP_Bool 4799 #define SORTTPL_PTRCOMP 4804 #define SORTTPL_NAMEEXT PtrPtrLongInt 4805 #define SORTTPL_KEYTYPE void* 4806 #define SORTTPL_FIELD1TYPE void* 4807 #define SORTTPL_FIELD2TYPE SCIP_Longint 4808 #define SORTTPL_FIELD3TYPE int 4809 #define SORTTPL_PTRCOMP 4814 #define SORTTPL_NAMEEXT PtrPtrLongIntInt 4815 #define SORTTPL_KEYTYPE void* 4816 #define SORTTPL_FIELD1TYPE void* 4817 #define SORTTPL_FIELD2TYPE SCIP_Longint 4818 #define SORTTPL_FIELD3TYPE int 4819 #define SORTTPL_FIELD4TYPE int 4820 #define SORTTPL_PTRCOMP 4825 #define SORTTPL_NAMEEXT Real 4826 #define SORTTPL_KEYTYPE SCIP_Real 4831 #define SORTTPL_NAMEEXT RealBoolPtr 4832 #define SORTTPL_KEYTYPE SCIP_Real 4833 #define SORTTPL_FIELD1TYPE SCIP_Bool 4834 #define SORTTPL_FIELD2TYPE void* 4839 #define SORTTPL_NAMEEXT RealPtr 4840 #define SORTTPL_KEYTYPE SCIP_Real 4841 #define SORTTPL_FIELD1TYPE void* 4846 #define SORTTPL_NAMEEXT RealInt 4847 #define SORTTPL_KEYTYPE SCIP_Real 4848 #define SORTTPL_FIELD1TYPE int 4853 #define SORTTPL_NAMEEXT RealIntInt 4854 #define SORTTPL_KEYTYPE SCIP_Real 4855 #define SORTTPL_FIELD1TYPE int 4856 #define SORTTPL_FIELD2TYPE int 4861 #define SORTTPL_NAMEEXT RealIntLong 4862 #define SORTTPL_KEYTYPE SCIP_Real 4863 #define SORTTPL_FIELD1TYPE int 4864 #define SORTTPL_FIELD2TYPE SCIP_Longint 4869 #define SORTTPL_NAMEEXT RealIntPtr 4870 #define SORTTPL_KEYTYPE SCIP_Real 4871 #define SORTTPL_FIELD1TYPE int 4872 #define SORTTPL_FIELD2TYPE void* 4877 #define SORTTPL_NAMEEXT RealRealPtr 4878 #define SORTTPL_KEYTYPE SCIP_Real 4879 #define SORTTPL_FIELD1TYPE SCIP_Real 4880 #define SORTTPL_FIELD2TYPE void* 4885 #define SORTTPL_NAMEEXT RealLongRealInt 4886 #define SORTTPL_KEYTYPE SCIP_Real 4887 #define SORTTPL_FIELD1TYPE SCIP_Longint 4888 #define SORTTPL_FIELD2TYPE SCIP_Real 4889 #define SORTTPL_FIELD3TYPE int 4893 #define SORTTPL_NAMEEXT RealRealIntInt 4894 #define SORTTPL_KEYTYPE SCIP_Real 4895 #define SORTTPL_FIELD1TYPE SCIP_Real 4896 #define SORTTPL_FIELD2TYPE int 4897 #define SORTTPL_FIELD3TYPE int 4902 #define SORTTPL_NAMEEXT RealRealRealInt 4903 #define SORTTPL_KEYTYPE SCIP_Real 4904 #define SORTTPL_FIELD1TYPE SCIP_Real 4905 #define SORTTPL_FIELD2TYPE SCIP_Real 4906 #define SORTTPL_FIELD3TYPE int 4911 #define SORTTPL_NAMEEXT RealRealRealPtr 4912 #define SORTTPL_KEYTYPE SCIP_Real 4913 #define SORTTPL_FIELD1TYPE SCIP_Real 4914 #define SORTTPL_FIELD2TYPE SCIP_Real 4915 #define SORTTPL_FIELD3TYPE void* 4920 #define SORTTPL_NAMEEXT RealPtrPtrInt 4921 #define SORTTPL_KEYTYPE SCIP_Real 4922 #define SORTTPL_FIELD1TYPE void* 4923 #define SORTTPL_FIELD2TYPE void* 4924 #define SORTTPL_FIELD3TYPE int 4929 #define SORTTPL_NAMEEXT RealPtrPtrIntInt 4930 #define SORTTPL_KEYTYPE SCIP_Real 4931 #define SORTTPL_FIELD1TYPE void* 4932 #define SORTTPL_FIELD2TYPE void* 4933 #define SORTTPL_FIELD3TYPE int 4934 #define SORTTPL_FIELD4TYPE int 4939 #define SORTTPL_NAMEEXT RealRealRealBoolPtr 4940 #define SORTTPL_KEYTYPE SCIP_Real 4941 #define SORTTPL_FIELD1TYPE SCIP_Real 4942 #define SORTTPL_FIELD2TYPE SCIP_Real 4943 #define SORTTPL_FIELD3TYPE SCIP_Bool 4944 #define SORTTPL_FIELD4TYPE void* 4949 #define SORTTPL_NAMEEXT RealRealRealBoolBoolPtr 4950 #define SORTTPL_KEYTYPE SCIP_Real 4951 #define SORTTPL_FIELD1TYPE SCIP_Real 4952 #define SORTTPL_FIELD2TYPE SCIP_Real 4953 #define SORTTPL_FIELD3TYPE SCIP_Bool 4954 #define SORTTPL_FIELD4TYPE SCIP_Bool 4955 #define SORTTPL_FIELD5TYPE void* 4960 #define SORTTPL_NAMEEXT Int 4961 #define SORTTPL_KEYTYPE int 4966 #define SORTTPL_NAMEEXT IntInt 4967 #define SORTTPL_KEYTYPE int 4968 #define SORTTPL_FIELD1TYPE int 4973 #define SORTTPL_NAMEEXT IntReal 4974 #define SORTTPL_KEYTYPE int 4975 #define SORTTPL_FIELD1TYPE SCIP_Real 4980 #define SORTTPL_NAMEEXT IntPtr 4981 #define SORTTPL_KEYTYPE int 4982 #define SORTTPL_FIELD1TYPE void* 4987 #define SORTTPL_NAMEEXT IntIntInt 4988 #define SORTTPL_KEYTYPE int 4989 #define SORTTPL_FIELD1TYPE int 4990 #define SORTTPL_FIELD2TYPE int 4995 #define SORTTPL_NAMEEXT IntIntLong 4996 #define SORTTPL_KEYTYPE int 4997 #define SORTTPL_FIELD1TYPE int 4998 #define SORTTPL_FIELD2TYPE SCIP_Longint 5002 #define SORTTPL_NAMEEXT IntRealLong 5003 #define SORTTPL_KEYTYPE int 5004 #define SORTTPL_FIELD1TYPE SCIP_Real 5005 #define SORTTPL_FIELD2TYPE SCIP_Longint 5010 #define SORTTPL_NAMEEXT IntIntPtr 5011 #define SORTTPL_KEYTYPE int 5012 #define SORTTPL_FIELD1TYPE int 5013 #define SORTTPL_FIELD2TYPE void* 5018 #define SORTTPL_NAMEEXT IntIntReal 5019 #define SORTTPL_KEYTYPE int 5020 #define SORTTPL_FIELD1TYPE int 5021 #define SORTTPL_FIELD2TYPE SCIP_Real 5026 #define SORTTPL_NAMEEXT IntPtrReal 5027 #define SORTTPL_KEYTYPE int 5028 #define SORTTPL_FIELD1TYPE void* 5029 #define SORTTPL_FIELD2TYPE SCIP_Real 5034 #define SORTTPL_NAMEEXT IntIntIntPtr 5035 #define SORTTPL_KEYTYPE int 5036 #define SORTTPL_FIELD1TYPE int 5037 #define SORTTPL_FIELD2TYPE int 5038 #define SORTTPL_FIELD3TYPE void* 5042 #define SORTTPL_NAMEEXT IntIntIntReal 5043 #define SORTTPL_KEYTYPE int 5044 #define SORTTPL_FIELD1TYPE int 5045 #define SORTTPL_FIELD2TYPE int 5046 #define SORTTPL_FIELD3TYPE SCIP_Real 5050 #define SORTTPL_NAMEEXT IntPtrIntReal 5051 #define SORTTPL_KEYTYPE int 5052 #define SORTTPL_FIELD1TYPE void* 5053 #define SORTTPL_FIELD2TYPE int 5054 #define SORTTPL_FIELD3TYPE SCIP_Real 5059 #define SORTTPL_NAMEEXT Long 5060 #define SORTTPL_KEYTYPE SCIP_Longint 5065 #define SORTTPL_NAMEEXT LongPtr 5066 #define SORTTPL_KEYTYPE SCIP_Longint 5067 #define SORTTPL_FIELD1TYPE void* 5072 #define SORTTPL_NAMEEXT LongPtrInt 5073 #define SORTTPL_KEYTYPE SCIP_Longint 5074 #define SORTTPL_FIELD1TYPE void* 5075 #define SORTTPL_FIELD2TYPE int 5080 #define SORTTPL_NAMEEXT LongPtrRealBool 5081 #define SORTTPL_KEYTYPE SCIP_Longint 5082 #define SORTTPL_FIELD1TYPE void* 5083 #define SORTTPL_FIELD2TYPE SCIP_Real 5084 #define SORTTPL_FIELD3TYPE SCIP_Bool 5089 #define SORTTPL_NAMEEXT LongPtrRealRealBool 5090 #define SORTTPL_KEYTYPE SCIP_Longint 5091 #define SORTTPL_FIELD1TYPE void* 5092 #define SORTTPL_FIELD2TYPE SCIP_Real 5093 #define SORTTPL_FIELD3TYPE SCIP_Real 5094 #define SORTTPL_FIELD4TYPE SCIP_Bool 5099 #define SORTTPL_NAMEEXT LongPtrRealRealIntBool 5100 #define SORTTPL_KEYTYPE SCIP_Longint 5101 #define SORTTPL_FIELD1TYPE void* 5102 #define SORTTPL_FIELD2TYPE SCIP_Real 5103 #define SORTTPL_FIELD3TYPE SCIP_Real 5104 #define SORTTPL_FIELD4TYPE int 5105 #define SORTTPL_FIELD5TYPE SCIP_Bool 5110 #define SORTTPL_NAMEEXT LongPtrPtrInt 5111 #define SORTTPL_KEYTYPE SCIP_Longint 5112 #define SORTTPL_FIELD1TYPE void* 5113 #define SORTTPL_FIELD2TYPE void* 5114 #define SORTTPL_FIELD3TYPE int 5119 #define SORTTPL_NAMEEXT LongPtrPtrIntInt 5120 #define SORTTPL_KEYTYPE SCIP_Longint 5121 #define SORTTPL_FIELD1TYPE void* 5122 #define SORTTPL_FIELD2TYPE void* 5123 #define SORTTPL_FIELD3TYPE int 5124 #define SORTTPL_FIELD4TYPE int 5129 #define SORTTPL_NAMEEXT LongPtrPtrBoolInt 5130 #define SORTTPL_KEYTYPE SCIP_Longint 5131 #define SORTTPL_FIELD1TYPE void* 5132 #define SORTTPL_FIELD2TYPE void* 5133 #define SORTTPL_FIELD3TYPE SCIP_Bool 5134 #define SORTTPL_FIELD4TYPE int 5139 #define SORTTPL_NAMEEXT PtrIntIntBoolBool 5140 #define SORTTPL_KEYTYPE void* 5141 #define SORTTPL_FIELD1TYPE int 5142 #define SORTTPL_FIELD2TYPE int 5143 #define SORTTPL_FIELD3TYPE SCIP_Bool 5144 #define SORTTPL_FIELD4TYPE SCIP_Bool 5145 #define SORTTPL_PTRCOMP 5150 #define SORTTPL_NAMEEXT IntPtrIntIntBoolBool 5151 #define SORTTPL_KEYTYPE int 5152 #define SORTTPL_FIELD1TYPE void* 5153 #define SORTTPL_FIELD2TYPE int 5154 #define SORTTPL_FIELD3TYPE int 5155 #define SORTTPL_FIELD4TYPE SCIP_Bool 5156 #define SORTTPL_FIELD5TYPE SCIP_Bool 5173 assert(indcomp !=
NULL);
5174 assert(len == 0 || perm !=
NULL);
5177 for( pos = 0; pos < len; ++pos )
5185 #define SORTTPL_NAMEEXT DownInd 5186 #define SORTTPL_KEYTYPE int 5187 #define SORTTPL_INDCOMP 5188 #define SORTTPL_BACKWARDS 5193 #define SORTTPL_NAMEEXT DownPtr 5194 #define SORTTPL_KEYTYPE void* 5195 #define SORTTPL_PTRCOMP 5196 #define SORTTPL_BACKWARDS 5201 #define SORTTPL_NAMEEXT DownPtrPtr 5202 #define SORTTPL_KEYTYPE void* 5203 #define SORTTPL_FIELD1TYPE void* 5204 #define SORTTPL_PTRCOMP 5205 #define SORTTPL_BACKWARDS 5210 #define SORTTPL_NAMEEXT DownPtrReal 5211 #define SORTTPL_KEYTYPE void* 5212 #define SORTTPL_FIELD1TYPE SCIP_Real 5213 #define SORTTPL_PTRCOMP 5214 #define SORTTPL_BACKWARDS 5219 #define SORTTPL_NAMEEXT DownPtrInt 5220 #define SORTTPL_KEYTYPE void* 5221 #define SORTTPL_FIELD1TYPE int 5222 #define SORTTPL_PTRCOMP 5223 #define SORTTPL_BACKWARDS 5227 #define SORTTPL_NAMEEXT DownPtrBool 5228 #define SORTTPL_KEYTYPE void* 5229 #define SORTTPL_FIELD1TYPE SCIP_Bool 5230 #define SORTTPL_PTRCOMP 5231 #define SORTTPL_BACKWARDS 5235 #define SORTTPL_NAMEEXT DownPtrIntInt 5236 #define SORTTPL_KEYTYPE void* 5237 #define SORTTPL_FIELD1TYPE int 5238 #define SORTTPL_FIELD2TYPE int 5239 #define SORTTPL_PTRCOMP 5240 #define SORTTPL_BACKWARDS 5245 #define SORTTPL_NAMEEXT DownPtrRealInt 5246 #define SORTTPL_KEYTYPE void* 5247 #define SORTTPL_FIELD1TYPE SCIP_Real 5248 #define SORTTPL_FIELD2TYPE int 5249 #define SORTTPL_PTRCOMP 5250 #define SORTTPL_BACKWARDS 5255 #define SORTTPL_NAMEEXT DownPtrRealBool 5256 #define SORTTPL_KEYTYPE void* 5257 #define SORTTPL_FIELD1TYPE SCIP_Real 5258 #define SORTTPL_FIELD2TYPE SCIP_Bool 5259 #define SORTTPL_PTRCOMP 5260 #define SORTTPL_BACKWARDS 5265 #define SORTTPL_NAMEEXT DownPtrPtrInt 5266 #define SORTTPL_KEYTYPE void* 5267 #define SORTTPL_FIELD1TYPE void* 5268 #define SORTTPL_FIELD2TYPE int 5269 #define SORTTPL_PTRCOMP 5270 #define SORTTPL_BACKWARDS 5275 #define SORTTPL_NAMEEXT DownPtrPtrReal 5276 #define SORTTPL_KEYTYPE void* 5277 #define SORTTPL_FIELD1TYPE void* 5278 #define SORTTPL_FIELD2TYPE SCIP_Real 5279 #define SORTTPL_PTRCOMP 5280 #define SORTTPL_BACKWARDS 5285 #define SORTTPL_NAMEEXT DownPtrRealIntInt 5286 #define SORTTPL_KEYTYPE void* 5287 #define SORTTPL_FIELD1TYPE SCIP_Real 5288 #define SORTTPL_FIELD2TYPE int 5289 #define SORTTPL_FIELD3TYPE int 5290 #define SORTTPL_PTRCOMP 5291 #define SORTTPL_BACKWARDS 5296 #define SORTTPL_NAMEEXT DownPtrPtrIntInt 5297 #define SORTTPL_KEYTYPE void* 5298 #define SORTTPL_FIELD1TYPE void* 5299 #define SORTTPL_FIELD2TYPE int 5300 #define SORTTPL_FIELD3TYPE int 5301 #define SORTTPL_PTRCOMP 5302 #define SORTTPL_BACKWARDS 5307 #define SORTTPL_NAMEEXT DownPtrPtrRealInt 5308 #define SORTTPL_KEYTYPE void* 5309 #define SORTTPL_FIELD1TYPE void* 5310 #define SORTTPL_FIELD2TYPE SCIP_Real 5311 #define SORTTPL_FIELD3TYPE int 5312 #define SORTTPL_PTRCOMP 5313 #define SORTTPL_BACKWARDS 5318 #define SORTTPL_NAMEEXT DownPtrPtrRealBool 5319 #define SORTTPL_KEYTYPE void* 5320 #define SORTTPL_FIELD1TYPE void* 5321 #define SORTTPL_FIELD2TYPE SCIP_Real 5322 #define SORTTPL_FIELD3TYPE SCIP_Bool 5323 #define SORTTPL_PTRCOMP 5324 #define SORTTPL_BACKWARDS 5329 #define SORTTPL_NAMEEXT DownPtrPtrLongInt 5330 #define SORTTPL_KEYTYPE void* 5331 #define SORTTPL_FIELD1TYPE void* 5332 #define SORTTPL_FIELD2TYPE SCIP_Longint 5333 #define SORTTPL_FIELD3TYPE int 5334 #define SORTTPL_PTRCOMP 5335 #define SORTTPL_BACKWARDS 5340 #define SORTTPL_NAMEEXT DownPtrPtrLongIntInt 5341 #define SORTTPL_KEYTYPE void* 5342 #define SORTTPL_FIELD1TYPE void* 5343 #define SORTTPL_FIELD2TYPE SCIP_Longint 5344 #define SORTTPL_FIELD3TYPE int 5345 #define SORTTPL_FIELD4TYPE int 5346 #define SORTTPL_PTRCOMP 5347 #define SORTTPL_BACKWARDS 5352 #define SORTTPL_NAMEEXT DownReal 5353 #define SORTTPL_KEYTYPE SCIP_Real 5354 #define SORTTPL_BACKWARDS 5359 #define SORTTPL_NAMEEXT DownRealBoolPtr 5360 #define SORTTPL_KEYTYPE SCIP_Real 5361 #define SORTTPL_FIELD1TYPE SCIP_Bool 5362 #define SORTTPL_FIELD2TYPE void* 5363 #define SORTTPL_BACKWARDS 5368 #define SORTTPL_NAMEEXT DownRealPtr 5369 #define SORTTPL_KEYTYPE SCIP_Real 5370 #define SORTTPL_FIELD1TYPE void* 5371 #define SORTTPL_BACKWARDS 5376 #define SORTTPL_NAMEEXT DownRealInt 5377 #define SORTTPL_KEYTYPE SCIP_Real 5378 #define SORTTPL_FIELD1TYPE int 5379 #define SORTTPL_BACKWARDS 5384 #define SORTTPL_NAMEEXT DownRealIntLong 5385 #define SORTTPL_KEYTYPE SCIP_Real 5386 #define SORTTPL_FIELD1TYPE int 5387 #define SORTTPL_FIELD2TYPE SCIP_Longint 5388 #define SORTTPL_BACKWARDS 5393 #define SORTTPL_NAMEEXT DownRealIntPtr 5394 #define SORTTPL_KEYTYPE SCIP_Real 5395 #define SORTTPL_FIELD1TYPE int 5396 #define SORTTPL_FIELD2TYPE void* 5397 #define SORTTPL_BACKWARDS 5402 #define SORTTPL_NAMEEXT DownRealPtrPtr 5403 #define SORTTPL_KEYTYPE SCIP_Real 5404 #define SORTTPL_FIELD1TYPE void* 5405 #define SORTTPL_FIELD2TYPE void* 5406 #define SORTTPL_BACKWARDS 5410 #define SORTTPL_NAMEEXT DownRealRealInt 5411 #define SORTTPL_KEYTYPE SCIP_Real 5412 #define SORTTPL_FIELD1TYPE SCIP_Real 5413 #define SORTTPL_FIELD2TYPE int 5414 #define SORTTPL_BACKWARDS 5418 #define SORTTPL_NAMEEXT DownRealRealPtr 5419 #define SORTTPL_KEYTYPE SCIP_Real 5420 #define SORTTPL_FIELD1TYPE SCIP_Real 5421 #define SORTTPL_FIELD2TYPE void* 5422 #define SORTTPL_BACKWARDS 5426 #define SORTTPL_NAMEEXT DownRealRealPtrPtr 5427 #define SORTTPL_KEYTYPE SCIP_Real 5428 #define SORTTPL_FIELD1TYPE SCIP_Real 5429 #define SORTTPL_FIELD2TYPE void* 5430 #define SORTTPL_FIELD3TYPE void* 5431 #define SORTTPL_BACKWARDS 5436 #define SORTTPL_NAMEEXT DownRealLongRealInt 5437 #define SORTTPL_KEYTYPE SCIP_Real 5438 #define SORTTPL_FIELD1TYPE SCIP_Longint 5439 #define SORTTPL_FIELD2TYPE SCIP_Real 5440 #define SORTTPL_FIELD3TYPE int 5441 #define SORTTPL_BACKWARDS 5446 #define SORTTPL_NAMEEXT DownRealRealIntInt 5447 #define SORTTPL_KEYTYPE SCIP_Real 5448 #define SORTTPL_FIELD1TYPE SCIP_Real 5449 #define SORTTPL_FIELD2TYPE int 5450 #define SORTTPL_FIELD3TYPE int 5451 #define SORTTPL_BACKWARDS 5456 #define SORTTPL_NAMEEXT DownRealRealRealInt 5457 #define SORTTPL_KEYTYPE SCIP_Real 5458 #define SORTTPL_FIELD1TYPE SCIP_Real 5459 #define SORTTPL_FIELD2TYPE SCIP_Real 5460 #define SORTTPL_FIELD3TYPE int 5461 #define SORTTPL_BACKWARDS 5466 #define SORTTPL_NAMEEXT DownRealRealRealPtr 5467 #define SORTTPL_KEYTYPE SCIP_Real 5468 #define SORTTPL_FIELD1TYPE SCIP_Real 5469 #define SORTTPL_FIELD2TYPE SCIP_Real 5470 #define SORTTPL_FIELD3TYPE void* 5471 #define SORTTPL_BACKWARDS 5476 #define SORTTPL_NAMEEXT DownRealPtrPtrInt 5477 #define SORTTPL_KEYTYPE SCIP_Real 5478 #define SORTTPL_FIELD1TYPE void* 5479 #define SORTTPL_FIELD2TYPE void* 5480 #define SORTTPL_FIELD3TYPE int 5481 #define SORTTPL_BACKWARDS 5485 #define SORTTPL_NAMEEXT DownRealPtrPtrIntInt 5486 #define SORTTPL_KEYTYPE SCIP_Real 5487 #define SORTTPL_FIELD1TYPE void* 5488 #define SORTTPL_FIELD2TYPE void* 5489 #define SORTTPL_FIELD3TYPE int 5490 #define SORTTPL_FIELD4TYPE int 5491 #define SORTTPL_BACKWARDS 5496 #define SORTTPL_NAMEEXT DownRealRealRealBoolPtr 5497 #define SORTTPL_KEYTYPE SCIP_Real 5498 #define SORTTPL_FIELD1TYPE SCIP_Real 5499 #define SORTTPL_FIELD2TYPE SCIP_Real 5500 #define SORTTPL_FIELD3TYPE SCIP_Bool 5501 #define SORTTPL_FIELD4TYPE void* 5502 #define SORTTPL_BACKWARDS 5507 #define SORTTPL_NAMEEXT DownRealRealRealBoolBoolPtr 5508 #define SORTTPL_KEYTYPE SCIP_Real 5509 #define SORTTPL_FIELD1TYPE SCIP_Real 5510 #define SORTTPL_FIELD2TYPE SCIP_Real 5511 #define SORTTPL_FIELD3TYPE SCIP_Bool 5512 #define SORTTPL_FIELD4TYPE SCIP_Bool 5513 #define SORTTPL_FIELD5TYPE void* 5518 #define SORTTPL_NAMEEXT DownInt 5519 #define SORTTPL_KEYTYPE int 5520 #define SORTTPL_BACKWARDS 5525 #define SORTTPL_NAMEEXT DownIntInt 5526 #define SORTTPL_KEYTYPE int 5527 #define SORTTPL_FIELD1TYPE int 5528 #define SORTTPL_BACKWARDS 5533 #define SORTTPL_NAMEEXT DownIntIntReal 5534 #define SORTTPL_KEYTYPE int 5535 #define SORTTPL_FIELD1TYPE int 5536 #define SORTTPL_FIELD2TYPE SCIP_Real 5537 #define SORTTPL_BACKWARDS 5542 #define SORTTPL_NAMEEXT DownIntReal 5543 #define SORTTPL_KEYTYPE int 5544 #define SORTTPL_FIELD1TYPE SCIP_Real 5545 #define SORTTPL_BACKWARDS 5550 #define SORTTPL_NAMEEXT DownIntPtr 5551 #define SORTTPL_KEYTYPE int 5552 #define SORTTPL_FIELD1TYPE void* 5553 #define SORTTPL_BACKWARDS 5558 #define SORTTPL_NAMEEXT DownIntIntInt 5559 #define SORTTPL_KEYTYPE int 5560 #define SORTTPL_FIELD1TYPE int 5561 #define SORTTPL_FIELD2TYPE int 5562 #define SORTTPL_BACKWARDS 5567 #define SORTTPL_NAMEEXT DownIntIntLong 5568 #define SORTTPL_KEYTYPE int 5569 #define SORTTPL_FIELD1TYPE int 5570 #define SORTTPL_FIELD2TYPE SCIP_Longint 5571 #define SORTTPL_BACKWARDS 5576 #define SORTTPL_NAMEEXT DownIntIntPtr 5577 #define SORTTPL_KEYTYPE int 5578 #define SORTTPL_FIELD1TYPE int 5579 #define SORTTPL_FIELD2TYPE void* 5580 #define SORTTPL_BACKWARDS 5585 #define SORTTPL_NAMEEXT DownIntIntIntPtr 5586 #define SORTTPL_KEYTYPE int 5587 #define SORTTPL_FIELD1TYPE int 5588 #define SORTTPL_FIELD2TYPE int 5589 #define SORTTPL_FIELD3TYPE void* 5590 #define SORTTPL_BACKWARDS 5595 #define SORTTPL_NAMEEXT DownIntPtrIntReal 5596 #define SORTTPL_KEYTYPE int 5597 #define SORTTPL_FIELD1TYPE void* 5598 #define SORTTPL_FIELD2TYPE int 5599 #define SORTTPL_FIELD3TYPE SCIP_Real 5600 #define SORTTPL_BACKWARDS 5605 #define SORTTPL_NAMEEXT DownLong 5606 #define SORTTPL_KEYTYPE SCIP_Longint 5607 #define SORTTPL_BACKWARDS 5612 #define SORTTPL_NAMEEXT DownLongPtr 5613 #define SORTTPL_KEYTYPE SCIP_Longint 5614 #define SORTTPL_FIELD1TYPE void* 5615 #define SORTTPL_BACKWARDS 5620 #define SORTTPL_NAMEEXT DownLongPtrInt 5621 #define SORTTPL_KEYTYPE SCIP_Longint 5622 #define SORTTPL_FIELD1TYPE void* 5623 #define SORTTPL_FIELD2TYPE int 5624 #define SORTTPL_BACKWARDS 5629 #define SORTTPL_NAMEEXT DownLongPtrRealBool 5630 #define SORTTPL_KEYTYPE SCIP_Longint 5631 #define SORTTPL_FIELD1TYPE void* 5632 #define SORTTPL_FIELD2TYPE SCIP_Real 5633 #define SORTTPL_FIELD3TYPE SCIP_Bool 5634 #define SORTTPL_BACKWARDS 5639 #define SORTTPL_NAMEEXT DownLongPtrRealRealBool 5640 #define SORTTPL_KEYTYPE SCIP_Longint 5641 #define SORTTPL_FIELD1TYPE void* 5642 #define SORTTPL_FIELD2TYPE SCIP_Real 5643 #define SORTTPL_FIELD3TYPE SCIP_Real 5644 #define SORTTPL_FIELD4TYPE SCIP_Bool 5645 #define SORTTPL_BACKWARDS 5650 #define SORTTPL_NAMEEXT DownLongPtrRealRealIntBool 5651 #define SORTTPL_KEYTYPE SCIP_Longint 5652 #define SORTTPL_FIELD1TYPE void* 5653 #define SORTTPL_FIELD2TYPE SCIP_Real 5654 #define SORTTPL_FIELD3TYPE SCIP_Real 5655 #define SORTTPL_FIELD4TYPE int 5656 #define SORTTPL_FIELD5TYPE SCIP_Bool 5657 #define SORTTPL_BACKWARDS 5662 #define SORTTPL_NAMEEXT DownLongPtrPtrInt 5663 #define SORTTPL_KEYTYPE SCIP_Longint 5664 #define SORTTPL_FIELD1TYPE void* 5665 #define SORTTPL_FIELD2TYPE void* 5666 #define SORTTPL_FIELD3TYPE int 5667 #define SORTTPL_BACKWARDS 5672 #define SORTTPL_NAMEEXT DownLongPtrPtrIntInt 5673 #define SORTTPL_KEYTYPE SCIP_Longint 5674 #define SORTTPL_FIELD1TYPE void* 5675 #define SORTTPL_FIELD2TYPE void* 5676 #define SORTTPL_FIELD3TYPE int 5677 #define SORTTPL_FIELD4TYPE int 5678 #define SORTTPL_BACKWARDS 5683 #define SORTTPL_NAMEEXT DownLongPtrPtrBoolInt 5684 #define SORTTPL_KEYTYPE SCIP_Longint 5685 #define SORTTPL_FIELD1TYPE void* 5686 #define SORTTPL_FIELD2TYPE void* 5687 #define SORTTPL_FIELD3TYPE SCIP_Bool 5688 #define SORTTPL_FIELD4TYPE int 5689 #define SORTTPL_BACKWARDS 5694 #define SORTTPL_NAMEEXT DownPtrIntIntBoolBool 5695 #define SORTTPL_KEYTYPE void* 5696 #define SORTTPL_FIELD1TYPE int 5697 #define SORTTPL_FIELD2TYPE int 5698 #define SORTTPL_FIELD3TYPE SCIP_Bool 5699 #define SORTTPL_FIELD4TYPE SCIP_Bool 5700 #define SORTTPL_PTRCOMP 5701 #define SORTTPL_BACKWARDS 5706 #define SORTTPL_NAMEEXT DownIntPtrIntIntBoolBool 5707 #define SORTTPL_KEYTYPE int 5708 #define SORTTPL_FIELD1TYPE void* 5709 #define SORTTPL_FIELD2TYPE int 5710 #define SORTTPL_FIELD3TYPE int 5711 #define SORTTPL_FIELD4TYPE SCIP_Bool 5712 #define SORTTPL_FIELD5TYPE SCIP_Bool 5713 #define SORTTPL_BACKWARDS 5728 assert(activity !=
NULL);
5732 (*activity)->var = var;
5733 (*activity)->duration = duration;
5734 (*activity)->demand = demand;
5744 assert(activity !=
NULL);
5745 assert(*activity !=
NULL);
5760 #undef SCIPactivityGetVar 5761 #undef SCIPactivityGetDuration 5762 #undef SCIPactivityGetDemand 5763 #undef SCIPactivityGetEnergy 5770 assert(activity !=
NULL);
5772 return activity->
var;
5780 assert(activity !=
NULL);
5790 assert(activity !=
NULL);
5800 assert(activity !=
NULL);
5817 assert(profile !=
NULL);
5818 assert(capacity > 0);
5822 (*profile)->arraysize = 10;
5827 (*profile)->ntimepoints = 1;
5828 (*profile)->timepoints[0] = 0;
5829 (*profile)->loads[0] = 0;
5830 (*profile)->capacity = capacity;
5840 assert(profile !=
NULL);
5841 assert(*profile !=
NULL);
5876 assert(profile !=
NULL);
5886 assert(profile !=
NULL);
5896 assert(profile !=
NULL);
5906 assert(profile !=
NULL);
5908 return profile->
loads;
5917 assert(profile !=
NULL);
5918 assert(pos >= 0 && pos < profile->ntimepoints);
5929 assert(profile !=
NULL);
5930 assert(pos >= 0 && pos < profile->ntimepoints);
5932 return profile->
loads[pos];
5944 assert(profile !=
NULL);
5945 assert(timepoint >= 0);
5969 if( neededsize <= profile->arraysize )
5990 assert(profile !=
NULL);
5991 assert(timepoint >= 0);
5999 assert(*pos >= 0 && *pos < profile->ntimepoints);
6000 assert(timepoint >= profile->
timepoints[*pos]);
6038 assert(profile !=
NULL);
6041 assert(left < right);
6042 assert(infeasible !=
NULL);
6044 (*infeasible) =
FALSE;
6049 assert(profile->
timepoints[startpos] == left);
6053 assert(profile->
timepoints[endpos] == right);
6055 assert(startpos < endpos);
6059 for( i = startpos; i < endpos; ++i )
6061 profile->
loads[i] += demand;
6068 (*infeasible) =
TRUE;
6072 for( ; i >= startpos; --i )
6073 profile->
loads[i] -= demand;
6094 assert(profile !=
NULL);
6095 assert(left < right);
6096 assert(demand >= 0);
6097 assert(infeasible !=
NULL);
6099 (*infeasible) =
FALSE;
6103 SCIPdebugMessage(
"insert core [%d,%d] with demand %d\n", left, right, demand);
6125 assert(left < right);
6137 SCIPdebugMessage(
"delete core [%d,%d] with demand %d\n", left, right, demand);
6140 assert(!infeasible);
6156 int remainingduration;
6159 assert(profile !=
NULL);
6161 assert(pos < profile->ntimepoints);
6162 assert(duration > 0);
6166 remainingduration = duration;
6168 (*infeasible) =
FALSE;
6172 (*infeasible) =
TRUE;
6176 while( pos < profile->ntimepoints - 1 )
6180 SCIPdebugMessage(
"profile <%p>: core does not fit at time point %d (pos %d)\n", (
void*)profile, profile->
timepoints[pos], pos);
6182 remainingduration = duration;
6184 if( profile->timepoints[startpos] > lst )
6186 (*infeasible) =
TRUE;
6193 if( remainingduration <= 0 )
6217 assert(profile !=
NULL);
6220 assert(duration >= 0);
6221 assert(demand >= 0);
6222 assert(infeasible !=
NULL);
6226 SCIPdebugMessage(
"profile <%p>: find earliest start time (demad %d, duration %d) [%d,%d]\n", (
void*)profile, demand, duration, est, lst);
6228 if( duration == 0 || demand == 0 )
6230 *infeasible =
FALSE;
6235 SCIPdebugMessage(
"profile <%p>: earliest start time does %s exist as time point (pos %d)\n", (
void*)profile, found ?
"" :
"not", pos);
6238 if( pos == profile->ntimepoints - 1 )
6240 (*infeasible) =
FALSE;
6247 assert(profile->timepoints[pos] == est);
6250 assert(pos < profile->ntimepoints);
6251 est = profile->timepoints[pos];
6253 else if( profile->loads[pos] + demand > profile->capacity )
6258 assert(profile->timepoints[pos] <= est);
6261 assert(pos < profile->ntimepoints);
6262 est = profile->timepoints[pos];
6266 int remainingduration;
6270 assert(pos < profile->ntimepoints - 1);
6272 remainingduration = duration - (profile->timepoints[pos+1] - est);
6276 if( remainingduration <= 0 )
6277 (*infeasible) =
FALSE;
6281 SCIPdebugMessage(
"remaining duration can%s be processed\n", *infeasible ?
"not" :
"");
6287 assert(pos < profile->ntimepoints);
6288 est = profile->timepoints[pos];
6307 int remainingduration;
6310 assert(profile !=
NULL);
6312 assert(pos < profile->ntimepoints);
6313 assert(duration > 0);
6318 remainingduration = duration;
6320 (*infeasible) =
TRUE;
6322 if( profile->
timepoints[endpos] < ect - duration )
6329 SCIPdebugMessage(
"profile <%p>: core does not fit at time point %d (pos %d)\n", (
void*)profile, profile->
timepoints[pos-1], pos-1);
6332 remainingduration = duration;
6334 if( profile->timepoints[endpos] < ect - duration )
6340 if( remainingduration <= 0 )
6342 *infeasible =
FALSE;
6369 assert(profile !=
NULL);
6372 assert(duration >= 0);
6373 assert(demand >= 0);
6374 assert(infeasible !=
NULL);
6378 if( duration == 0 || demand == 0 )
6380 *infeasible =
FALSE;
6384 ect = est + duration;
6385 lct = lst + duration;
6388 SCIPdebugMessage(
"profile <%p>: latest completion time %d does %s exist as time point (pos %d)\n", (
void*)profile, lct, found ?
"" :
"not", pos);
6393 assert(profile->timepoints[pos] == lct);
6396 assert(pos < profile->ntimepoints && pos >= 0);
6397 lct = profile->timepoints[pos];
6399 else if( profile->loads[pos] + demand > profile->capacity )
6404 assert(profile->timepoints[pos] < lct);
6407 assert(pos < profile->ntimepoints && pos >= 0);
6408 lct = profile->timepoints[pos];
6412 int remainingduration;
6415 assert(profile->timepoints[pos] < lct);
6417 remainingduration = duration - (lct - profile->timepoints[pos]);
6419 if( remainingduration <= 0 )
6420 (*infeasible) =
FALSE;
6429 assert(pos < profile->ntimepoints && pos >= 0);
6430 lct = profile->timepoints[pos];
6435 return lct - duration;
6448 assert(digraph !=
NULL);
6460 (*digraph)->nnodes =
nnodes;
6463 (*digraph)->ncomponents = 0;
6464 (*digraph)->componentstartsize = 0;
6465 (*digraph)->components =
NULL;
6466 (*digraph)->componentstarts =
NULL;
6480 if( nnodes <= digraph->nnodes )
6491 for( n = digraph->
nnodes; n < nnodes; ++n )
6519 nnodes = sourcedigraph->
nnodes;
6521 (*targetdigraph)->nnodes =
nnodes;
6522 (*targetdigraph)->ncomponents = ncomponents;
6530 for( i = 0; i <
nnodes; ++i )
6542 (*targetdigraph)->nodedata[i] = sourcedigraph->
nodedata[i];
6548 if( ncomponents > 0 )
6554 (*targetdigraph)->componentstartsize = ncomponents + 1;
6558 (*targetdigraph)->components =
NULL;
6559 (*targetdigraph)->componentstarts =
NULL;
6560 (*targetdigraph)->componentstartsize = 0;
6574 assert(digraph !=
NULL);
6575 assert(digraph->
nnodes > 0);
6577 for( i = 0; i < digraph->
nnodes; ++i )
6595 assert(digraph !=
NULL);
6596 assert(*digraph !=
NULL);
6599 for( i = (*digraph)->nnodes - 1; i >= 0; --i )
6604 (*digraph)->nnodes = 0;
6608 assert((*digraph)->ncomponents == 0);
6609 assert((*digraph)->componentstartsize == 0);
6610 assert((*digraph)->components ==
NULL);
6611 assert((*digraph)->componentstarts ==
NULL);
6623 #define STARTSUCCESSORSSIZE 5 6633 assert(digraph !=
NULL);
6635 assert(idx < digraph->
nnodes);
6636 assert(newsize > 0);
6673 assert(digraph !=
NULL);
6674 assert(startnode >= 0);
6675 assert(endnode >= 0);
6676 assert(startnode < digraph->
nnodes);
6677 assert(endnode < digraph->nnodes);
6704 assert(digraph !=
NULL);
6705 assert(startnode >= 0);
6706 assert(endnode >= 0);
6707 assert(startnode < digraph->
nnodes);
6708 assert(endnode < digraph->nnodes);
6713 for( i = 0; i < nsuccessors; ++i )
6714 if( digraph->
successors[startnode][i] == endnode )
6720 digraph->
successors[startnode][nsuccessors] = endnode;
6721 digraph->
arcdata[startnode][nsuccessors] = data;
6734 assert(digraph !=
NULL);
6736 assert(node < digraph->
nnodes);
6748 assert(digraph !=
NULL);
6759 assert(digraph !=
NULL);
6761 assert(node < digraph->
nnodes);
6776 assert(digraph !=
NULL);
6778 assert(node < digraph->
nnodes);
6791 assert(digraph !=
NULL);
6795 for( i = 0; i < digraph->
nnodes; ++i )
6807 assert(digraph !=
NULL);
6809 assert(node < digraph->
nnodes);
6822 assert(digraph !=
NULL);
6824 assert(node < digraph->
nnodes);
6840 assert(digraph !=
NULL);
6842 assert(node < digraph->
nnodes);
6847 return digraph->
arcdata[node];
6858 int* stackadjvisited,
6866 assert(digraph !=
NULL);
6867 assert(startnode >= 0);
6868 assert(startnode < digraph->
nnodes);
6869 assert(visited !=
NULL);
6870 assert(visited[startnode] ==
FALSE);
6871 assert(dfsstack !=
NULL);
6872 assert(dfsnodes !=
NULL);
6873 assert(ndfsnodes !=
NULL);
6876 dfsstack[0] = startnode;
6877 stackadjvisited[0] = 0;
6880 while( stackidx >= 0 )
6886 currnode = dfsstack[stackidx];
6888 sadv = stackadjvisited[stackidx];
6889 assert( 0 <= sadv && sadv <= digraph->nsuccessors[currnode] );
6892 assert( visited[currnode] == (sadv > 0) );
6893 visited[currnode] =
TRUE;
6896 while( sadv < digraph->nsuccessors[currnode] && visited[digraph->
successors[currnode][sadv]] )
6905 dfsnodes[(*ndfsnodes)++] = currnode;
6910 assert( ! visited[digraph->
successors[currnode][sadv]] );
6913 stackadjvisited[stackidx] = sadv + 1;
6917 dfsstack[stackidx] = digraph->
successors[currnode][sadv];
6918 stackadjvisited[stackidx] = 0;
6919 assert( stackidx < digraph->nnodes );
6941 int* ndirectedsuccessors;
6942 int* stackadjvisited;
6952 assert(digraph !=
NULL);
6953 assert(digraph->
nnodes > 0);
6977 for( i = digraph->
nnodes - 1; i >= 0; --i )
6979 for( j = 0; j < ndirectedsuccessors[i]; ++j )
6985 for( v = 0; v < digraph->
nnodes; ++v )
6993 &digraph->
components[compstart], &ndfsnodes);
6996 if( ndfsnodes >= minsize )
7011 if( components !=
NULL )
7026 if( ncomponents !=
NULL )
7056 int* stackadjvisited;
7066 assert(digraph !=
NULL);
7078 for( i = 0; i < ncomps; ++i )
7080 endidx = compstarts[i+1] - 1;
7082 for( j = compstarts[i]; j < compstarts[i+1]; ++j )
7084 if( visited[comps[j]] )
7091 depthFirstSearch(digraph, comps[j], visited, dfsstack, stackadjvisited, dfsnodes, &ndfsnodes);
7093 assert(endidx - ndfsnodes == compstarts[i] - 1);
7098 for( k = 0; k < ndfsnodes; ++k )
7100 digraph->
components[endidx - k] = dfsnodes[k];
7117 assert(digraph !=
NULL);
7134 assert(digraph !=
NULL);
7135 assert(compidx >= 0);
7136 assert(compidx < digraph->ncomponents);
7137 assert(nodes !=
NULL || nnodes !=
NULL);
7141 if( nnodes !=
NULL )
7159 int* strongcomponents,
7162 int* nstrongcomponents,
7163 int* strongcompstartidx,
7169 assert(digraph !=
NULL);
7171 assert(v < digraph->
nnodes);
7172 assert(lowlink !=
NULL);
7173 assert(dfsidx !=
NULL);
7174 assert(stack !=
NULL);
7175 assert(stacksize !=
NULL);
7176 assert(*stacksize >= 0);
7177 assert(*stacksize < digraph->nnodes);
7178 assert(unprocessed !=
NULL);
7179 assert(nodeinstack !=
NULL);
7180 assert(maxdfs !=
NULL);
7181 assert(strongcomponents !=
NULL);
7182 assert(nstrongcomponents !=
NULL);
7183 assert(strongcompstartidx !=
NULL);
7184 assert(nstorednodes !=
NULL);
7185 assert(*nstorednodes >= 0 && *nstorednodes < digraph->nnodes);
7187 dfsidx[v] = *maxdfs;
7188 lowlink[v] = *maxdfs;
7192 stack[*stacksize] = v;
7194 nodeinstack[v] =
TRUE;
7197 unprocessed[v] =
FALSE;
7206 if( unprocessed[w] )
7208 tarjan(digraph, w, lowlink, dfsidx, stack, stacksize, unprocessed, nodeinstack, maxdfs, strongcomponents,
7209 nstrongcomponents, strongcompstartidx, nstorednodes);
7211 assert(lowlink[v] >= 0 && lowlink[v] < digraph->
nnodes);
7212 assert(lowlink[w] >= 0 && lowlink[w] < digraph->
nnodes);
7215 lowlink[v] =
MIN(lowlink[v], lowlink[w]);
7217 else if( nodeinstack[w] )
7219 assert(lowlink[v] >= 0 && lowlink[v] < digraph->
nnodes);
7220 assert(dfsidx[w] >= 0 && dfsidx[w] < digraph->
nnodes);
7223 lowlink[v] =
MIN(lowlink[v], dfsidx[w]);
7228 if( lowlink[v] == dfsidx[v] )
7232 strongcompstartidx[*nstrongcomponents] = *nstorednodes;
7233 *nstrongcomponents += 1;
7237 assert(*stacksize > 0);
7240 w = stack[*stacksize - 1];
7242 nodeinstack[w] =
FALSE;
7245 strongcomponents[*nstorednodes] = w;
7261 int* strongcomponents,
7263 int* strongcompstartidx,
7265 int* nstrongcomponents
7280 assert(digraph !=
NULL);
7281 assert(compidx >= 0);
7282 assert(compidx < digraph->ncomponents);
7283 assert(strongcomponents !=
NULL);
7284 assert(strongcompstartidx !=
NULL);
7285 assert(nstrongcomponents !=
NULL);
7295 for( i = 0; i < digraph->
nnodes; ++i )
7300 unprocessed[i] =
TRUE;
7301 nodeinstack[i] =
FALSE;
7307 *nstrongcomponents = 0;
7310 for( i = digraph->
componentstarts[compidx]; i < digraph->componentstarts[compidx + 1]; ++i )
7315 assert(v >= 0 && v < digraph->
nnodes);
7318 if( unprocessed[v] )
7321 tarjan(digraph, v, lowlink, dfsidx, stack, &stacksize, unprocessed, nodeinstack, &maxdfs,
7322 strongcomponents, nstrongcomponents, strongcompstartidx, &nstorednodes);
7330 assert(*nstrongcomponents < digraph->
nnodes + 1);
7331 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)
#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)
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)
static void * multihashlistRetrieve(SCIP_MULTIHASHLIST *multihashlist, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr, unsigned int keyval, void *key)
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)
static void * multihashlistRetrieveNext(SCIP_MULTIHASHLIST **multihashlist, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr, unsigned int keyval, void *key)
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)
static SCIP_MULTIHASHLIST * multihashlistFind(SCIP_MULTIHASHLIST *multihashlist, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr, unsigned int keyval, void *key)
#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)
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)