1.000, 2.414, 3.078, 6.314, 12.706,
820.816, 1.604, 1.886, 2.920, 4.303,
830.765, 1.423, 1.638, 2.353, 3.182,
840.741, 1.344, 1.533, 2.132, 2.776,
850.727, 1.301, 1.476, 2.015, 2.571,
860.718, 1.273, 1.440, 1.943, 2.447,
870.711, 1.254, 1.415, 1.895, 2.365,
880.706, 1.240, 1.397, 1.860, 2.306,
890.703, 1.230, 1.383, 1.833, 2.262,
900.700, 1.221, 1.372, 1.812, 2.228,
910.697, 1.214, 1.363, 1.796, 2.201,
920.695, 1.209, 1.356, 1.782, 2.179,
930.694, 1.204, 1.350, 1.771, 2.160,
940.692, 1.200, 1.345, 1.761, 2.145,
950.691, 1.197, 1.341, 1.753, 2.131
1020.674, 1.150, 1.282, 1.645, 1.960
139 if( countx < 1.9 || county < 1.9 )
143pooledvariance = (countx - 1) * variancex + (county - 1) * variancey;
144pooledvariance /= (countx + county - 2);
147pooledvariance =
MAX(pooledvariance, 1e-9);
152tresult = (meanx - meany) / sqrt(pooledvariance);
153tresult *= sqrt(countx * county / (countx + county));
163#if defined(_WIN32) || defined(_WIN64) 174sign = (
x>= 0) ? 1 : -1;
177t = 1.0/(1.0 + p*
x);
178 y= 1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-
x*
x);
209assert(variance >= -1e-9);
210 if( variance < 1e-9 )
213 std= sqrt(variance);
218 if( value < mean + 1e-9 )
223assert(
std!= 0.0 );
228 SCIPdebugMessage(
" Normalized value %g = ( %g - %g ) / (%g * 1.4142136)\n", normvalue, value, mean,
std);
233 if( normvalue < 1e-9 && normvalue > -1e-9 )
235 else if( normvalue > 0 )
239erfresult =
SCIPerf(normvalue);
240 returnerfresult / 2.0 + 0.5;
246erfresult =
SCIPerf(-normvalue);
248 return0.5 - erfresult / 2.0;
261assert(regression !=
NULL);
271assert(regression !=
NULL);
273 returnregression->
slope;
281assert(regression !=
NULL);
302regression->
slope= 0.0;
336assert(meanptr !=
NULL);
337assert(sumvarptr !=
NULL);
338assert(nobservations > 0 || add);
340addfactor = add ? 1.0 : -1.0;
343*meanptr = oldmean + addfactor * (value - oldmean)/(
SCIP_Real)nobservations;
344*sumvarptr += addfactor * (value - oldmean) * (value - (*meanptr));
347assert(*sumvarptr >= -1e-4);
348*sumvarptr =
MAX(0.0, *sumvarptr);
358assert(regression !=
NULL);
376regression->
sumxy-= (
x*
y);
391assert(regression !=
NULL);
410regression->
meanx= 0;
412regression->
sumxy= 0;
413regression->
meany= 0;
423assert(regression !=
NULL);
452assert(initsize >= 0);
453assert(growfac >= 1.0);
456 if( growfac == 1.0 )
457size =
MAX(initsize, num);
463initsize =
MAX(initsize, 4);
468 while( size < num && size > oldsize )
471size = (int)(growfac * size + initsize);
475 if( size <= oldsize )
479assert(size >= initsize);
490#define GMLNODEWIDTH 120.0 491#define GMLNODEHEIGTH 30.0 492#define GMLFONTSIZE 13 493#define GMLNODETYPE "rectangle" 494#define GMLNODEFILLCOLOR "#ff0000" 495#define GMLEDGECOLOR "black" 496#define GMLNODEBORDERCOLOR "#000000" 504 const char* nodetype,
505 const char* fillcolor,
506 const char* bordercolor
509assert(file !=
NULL);
510assert(label !=
NULL);
512fprintf(file,
" node\n");
513fprintf(file,
" [\n");
514fprintf(file,
" id %u\n",
id);
515fprintf(file,
" label \"%s\"\n", label);
516fprintf(file,
" graphics\n");
517fprintf(file,
" [\n");
521 if( nodetype !=
NULL)
522fprintf(file,
" type \"%s\"\n", nodetype);
526 if( fillcolor !=
NULL)
527fprintf(file,
" fill \"%s\"\n", fillcolor);
531 if( bordercolor !=
NULL)
532fprintf(file,
" outline \"%s\"\n", bordercolor);
536fprintf(file,
" ]\n");
537fprintf(file,
" LabelGraphics\n");
538fprintf(file,
" [\n");
539fprintf(file,
" text \"%s\"\n", label);
541fprintf(file,
" fontName \"Dialog\"\n");
542fprintf(file,
" anchor \"c\"\n");
543fprintf(file,
" ]\n");
544fprintf(file,
" ]\n");
552 const char* nodetype,
553 const char* fillcolor,
554 const char* bordercolor,
558assert(file !=
NULL);
559assert(label !=
NULL);
561fprintf(file,
" node\n");
562fprintf(file,
" [\n");
563fprintf(file,
" id %u\n",
id);
564fprintf(file,
" label \"%s\"\n", label);
565fprintf(file,
" weight %g\n", weight);
566fprintf(file,
" graphics\n");
567fprintf(file,
" [\n");
571 if( nodetype !=
NULL)
572fprintf(file,
" type \"%s\"\n", nodetype);
576 if( fillcolor !=
NULL)
577fprintf(file,
" fill \"%s\"\n", fillcolor);
581 if( bordercolor !=
NULL)
582fprintf(file,
" outline \"%s\"\n", bordercolor);
586fprintf(file,
" ]\n");
587fprintf(file,
" LabelGraphics\n");
588fprintf(file,
" [\n");
589fprintf(file,
" text \"%s\"\n", label);
591fprintf(file,
" fontName \"Dialog\"\n");
592fprintf(file,
" anchor \"c\"\n");
593fprintf(file,
" ]\n");
594fprintf(file,
" ]\n");
606assert(file !=
NULL);
608fprintf(file,
" edge\n");
609fprintf(file,
" [\n");
610fprintf(file,
" source %u\n", source);
611fprintf(file,
" target %u\n", target);
614fprintf(file,
" label \"%s\"\n", label);
616fprintf(file,
" graphics\n");
617fprintf(file,
" [\n");
620fprintf(file,
" fill \"%s\"\n", color);
625fprintf(file,
" ]\n");
629fprintf(file,
" LabelGraphics\n");
630fprintf(file,
" [\n");
631fprintf(file,
" text \"%s\"\n", label);
633fprintf(file,
" fontName \"Dialog\"\n");
634fprintf(file,
" anchor \"c\"\n");
635fprintf(file,
" ]\n");
638fprintf(file,
" ]\n");
650assert(file !=
NULL);
652fprintf(file,
" edge\n");
653fprintf(file,
" [\n");
654fprintf(file,
" source %u\n", source);
655fprintf(file,
" target %u\n", target);
658fprintf(file,
" label \"%s\"\n", label);
660fprintf(file,
" graphics\n");
661fprintf(file,
" [\n");
664fprintf(file,
" fill \"%s\"\n", color);
668fprintf(file,
" targetArrow \"standard\"\n");
669fprintf(file,
" ]\n");
673fprintf(file,
" LabelGraphics\n");
674fprintf(file,
" [\n");
675fprintf(file,
" text \"%s\"\n", label);
677fprintf(file,
" fontName \"Dialog\"\n");
678fprintf(file,
" anchor \"c\"\n");
679fprintf(file,
" ]\n");
682fprintf(file,
" ]\n");
691assert(file !=
NULL);
693fprintf(file,
"graph\n");
694fprintf(file,
"[\n");
695fprintf(file,
" hierarchic 1\n");
698fprintf(file,
" directed 1\n");
706assert(file !=
NULL);
708fprintf(file,
"]\n");
718assert(file !=
NULL);
720fprintf(file,
"digraph G {\n");
728 const char* nodetype,
729 const char* fillcolor,
730 const char* bordercolor
733assert(file !=
NULL);
735fprintf(file,
"\t%d [shape=\"%s\", label=\"%s\", style=\"filled\", fillcolor=\"%s\", color=\"%s\"];\n", node, nodetype, label, fillcolor, bordercolor);
746assert(file !=
NULL);
748fprintf(file,
"\t%d -> %d [color=\"%s\"];\n", source, target, color);
756assert(file !=
NULL);
758fprintf(file,
"}\n");
779assert(sparsesol !=
NULL);
780assert(vars !=
NULL);
789 for( v = nvars - 1; v >= 0; --v )
791assert(vars[v] !=
NULL);
812(*sparsesol)->nvars = nvars;
822assert(sparsesol !=
NULL);
823assert(*sparsesol !=
NULL);
836assert(sparsesol !=
NULL);
838 returnsparsesol->
vars;
846assert(sparsesol !=
NULL);
848 returnsparsesol->
nvars;
856assert(sparsesol !=
NULL);
866assert(sparsesol !=
NULL);
881assert(sparsesol !=
NULL);
882assert(sol !=
NULL);
886assert(lbvalues !=
NULL);
889 for( v = 0; v < nvars; ++v )
890sol[v] = lbvalues[v];
909assert(sparsesol !=
NULL);
910assert(sol !=
NULL);
920assert(lbvalues !=
NULL);
921assert(ubvalues !=
NULL);
926 for( v = 0; v < nvars; ++v )
928lbvalue = lbvalues[v];
929ubvalue = ubvalues[v];
931 if( lbvalue < ubvalue )
935 if( carryflag ==
FALSE)
937 if( sol[v] < ubvalue )
945assert(sol[v] == ubvalue);
952 if( sol[v] < ubvalue )
960assert(sol[v] == ubvalue);
967 return(!carryflag && !singular);
982assert(queue !=
NULL);
985 if( minsize <= queue->size )
1002assert(queue !=
NULL);
1004initsize =
MAX(1, initsize);
1005sizefac =
MAX(1.0, sizefac);
1008(*queue)->firstfree = 0;
1009(*queue)->firstused = -1;
1011(*queue)->sizefac = sizefac;
1012(*queue)->slots =
NULL;
1024assert(queue !=
NULL);
1035assert(queue !=
NULL);
1050 intoldsize = queue->
size;
1053assert(oldsize < queue->size);
1055sizediff = queue->
size- oldsize;
1087assert(queue !=
NULL);
1092assert(elem !=
NULL);
1113assert(queue !=
NULL);
1139assert(queue !=
NULL);
1163 return(queue->
slots[pos].
ptr);
1173assert(queue !=
NULL);
1205assert(queue !=
NULL);
1223assert(queue !=
NULL);
1241assert(queue !=
NULL);
1254assert(queue !=
NULL);
1264 returnqueue->
size;
1274#define PQ_PARENT(q) (((q)+1)/2-1) 1275#define PQ_LEFTCHILD(p) (2*(p)+1) 1276#define PQ_RIGHTCHILD(p) (2*(p)+2) 1286assert(pqueue !=
NULL);
1288 if( minsize <= pqueue->size )
1306assert(pqueue !=
NULL);
1307assert(ptrcomp !=
NULL);
1309initsize =
MAX(1, initsize);
1310sizefac =
MAX(1.0, sizefac);
1314(*pqueue)->size = 0;
1315(*pqueue)->sizefac = sizefac;
1316(*pqueue)->slots =
NULL;
1317(*pqueue)->ptrcomp = ptrcomp;
1318(*pqueue)->elemchgpos = elemchgpos;
1329assert(pqueue !=
NULL);
1340assert(pqueue !=
NULL);
1354pqueue->
slots[newpos] = elem;
1357 if( pqueue->elemchgpos !=
NULL)
1359pqueue->elemchgpos(elem, oldpos, newpos);
1363#ifdef SCIP_MORE_DEBUG 1386 if( pqueue->ptrcomp(pqueue->
slots[i], pqueue->
slots[leftchild]) > 0 )
1405assert(pqueue !=
NULL);
1406assert(pqueue->
len>= 0);
1407assert(elem !=
NULL);
1412pos = pqueue->
len;
1415 while( pos > 0 && (*pqueue->ptrcomp)(elem, pqueue->
slots[parentpos]) < 0 )
1417assert((*pqueue->ptrcomp)(pqueue->
slots[parentpos], elem) >= 0);
1427#ifdef SCIP_MORE_DEBUG 1428assert(pqueueHasHeapProperty(pqueue));
1443assert(pqueue !=
NULL);
1453 if( pos == pqueue->
len)
1456last = pqueue->
slots[pqueue->
len];
1461 while( pos > 0 && (*pqueue->ptrcomp)(last, pqueue->
slots[
PQ_PARENT(pos)]) < 0 )
1473 if( brotherpos < pqueue->len && (*pqueue->ptrcomp)(pqueue->
slots[brotherpos], pqueue->
slots[childpos]) < 0 )
1474childpos = brotherpos;
1476 if( (*pqueue->ptrcomp)(last, pqueue->
slots[childpos]) <= 0 )
1486assert(pos <= pqueue->len - 1);
1490#ifdef SCIP_MORE_DEBUG 1491assert(pqueueHasHeapProperty(pqueue));
1502assert(pqueue !=
NULL);
1503assert(pqueue->
len>= 0);
1505 if( pqueue->
len== 0 )
1508root = pqueue->
slots[0];
1520assert(pqueue !=
NULL);
1521assert(pqueue->
len>= 0);
1523 if( pqueue->
len== 0 )
1526 returnpqueue->
slots[0];
1534assert(pqueue !=
NULL);
1535assert(pqueue->
len>= 0);
1537 returnpqueue->
len;
1545assert(pqueue !=
NULL);
1546assert(pqueue->
len>= 0);
1548 returnpqueue->
slots;
1561 if( pqueue->
slots[pos] == elem )
1636 return( (uint32_t) ((UINT64_C(0x9e3779b97f4a7c15) * input)>>32) ) | 1u;
1662assert(multihashlist !=
NULL);
1663assert(blkmem !=
NULL);
1664assert(element !=
NULL);
1668newlist->
next= *multihashlist;
1669*multihashlist = newlist;
1684assert(multihashlist !=
NULL);
1685assert(blkmem !=
NULL);
1687list = *multihashlist;
1688 while( list !=
NULL)
1690nextlist = list->
next;
1695*multihashlist =
NULL;
1710uint64_t currentkeyval;
1713assert(hashkeyeq !=
NULL);
1714assert(key !=
NULL);
1716 while( multihashlist !=
NULL)
1718currentkey = hashgetkey(userptr, multihashlist->
element);
1719currentkeyval = hashkeyval(userptr, currentkey);
1720 if( currentkeyval == keyval && hashkeyeq(userptr, currentkey, key) )
1721 returnmultihashlist;
1723multihashlist = multihashlist->
next;
1744 h=
multihashlistFind(multihashlist, hashgetkey, hashkeyeq, hashkeyval, userptr, keyval, key);
1752h2 =
multihashlistFind(
h->next, hashgetkey, hashkeyeq, hashkeyval, userptr, keyval, key);
1759key1 = hashgetkey(userptr,
h->element);
1760key2 = hashgetkey(userptr, h2->
element);
1761assert(hashkeyval(userptr, key1) == hashkeyval(userptr, key2));
1763 if( hashkeyeq(userptr, key1, key2) )
1765 SCIPerrorMessage(
"WARNING: hashkey with same value exists multiple times (e.g. duplicate constraint/variable names), so the return value is maybe not correct\n");
1794assert(multihashlist !=
NULL);
1797 h=
multihashlistFind(*multihashlist, hashgetkey, hashkeyeq, hashkeyval, userptr, keyval, key);
1802*multihashlist =
h->next;
1807*multihashlist =
NULL;
1822assert(multihashlist !=
NULL);
1823assert(blkmem !=
NULL);
1824assert(element !=
NULL);
1826 while( *multihashlist !=
NULL&& (*multihashlist)->element != element )
1827multihashlist = &(*multihashlist)->
next;
1829 if( *multihashlist !=
NULL)
1831nextlist = (*multihashlist)->
next;
1833*multihashlist = nextlist;
1841#define SCIP_MULTIHASH_MAXSIZE 33554431 1842#define SCIP_MULTIHASH_RESIZE_PERCENTAGE 65 1843#define SCIP_MULTIHASH_GROW_FACTOR 1.31 1857assert(multihash !=
NULL);
1859assert(multihash->
nlists> 0);
1860assert(multihash->hashgetkey !=
NULL);
1861assert(multihash->hashkeyeq !=
NULL);
1862assert(multihash->hashkeyval !=
NULL);
1866nnewlists =
MAX(nnewlists, multihash->
nlists);
1870 if( nnewlists > multihash->
nlists)
1875 unsigned inthashval;
1880 for( l = multihash->
nlists- 1; l >= 0; --l )
1882multihashlist = multihash->
lists[l];
1886 while( multihashlist !=
NULL)
1889key = multihash->hashgetkey(multihash->
userptr, multihashlist->
element);
1890keyval = multihash->hashkeyval(multihash->
userptr, key);
1891hashval = (
unsignedint) (keyval % (
unsigned) nnewlists);
1896 if( multihashlist->
next==
NULL&& onlyone )
1899 if( newlists[hashval] ==
NULL)
1900newlists[hashval] = multihashlist;
1907 while( next !=
NULL)
1910next = next->
next;
1913lastnext->
next= multihashlist;
1925multihashlist = multihashlist->
next;
1937multihash->
lists= newlists;
1938multihash->
nlists= nnewlists;
1941#ifdef SCIP_MORE_DEBUG 1945 for( l = 0; l < multihash->
nlists; ++l )
1947multihashlist = multihash->
lists[l];
1948 while( multihashlist !=
NULL)
1951multihashlist = multihashlist->
next;
1954assert(sumslotsize == multihash->
nelements);
1976assert(tablesize >= 0);
1977assert(multihash !=
NULL);
1978assert(hashgetkey !=
NULL);
1979assert(hashkeyeq !=
NULL);
1980assert(hashkeyval !=
NULL);
1984(*multihash)->blkmem = blkmem;
1985(*multihash)->nlists = tablesize;
1986(*multihash)->hashgetkey = hashgetkey;
1987(*multihash)->hashkeyeq = hashkeyeq;
1988(*multihash)->hashkeyval = hashkeyval;
1989(*multihash)->userptr = userptr;
1990(*multihash)->nelements = 0;
2005assert(multihash !=
NULL);
2006assert(*multihash !=
NULL);
2008table = (*multihash);
2009blkmem = table->
blkmem;
2010lists = table->
lists;
2013 for( i = table->
nlists- 1; i >= 0; --i )
2034 unsigned inthashval;
2036assert(multihash !=
NULL);
2038assert(multihash->
nlists> 0);
2039assert(multihash->hashgetkey !=
NULL);
2040assert(multihash->hashkeyeq !=
NULL);
2041assert(multihash->hashkeyval !=
NULL);
2042assert(element !=
NULL);
2051key = multihash->hashgetkey(multihash->
userptr, element);
2052keyval = multihash->hashkeyval(multihash->
userptr, key);
2053hashval = (
unsignedint) (keyval % (
unsigned) multihash->
nlists);
2073assert(multihash !=
NULL);
2074assert(multihash->hashgetkey !=
NULL);
2093 unsigned inthashval;
2095assert(multihash !=
NULL);
2097assert(multihash->
nlists> 0);
2098assert(multihash->hashgetkey !=
NULL);
2099assert(multihash->hashkeyeq !=
NULL);
2100assert(multihash->hashkeyval !=
NULL);
2101assert(key !=
NULL);
2104keyval = multihash->hashkeyval(multihash->
userptr, key);
2105hashval = (
unsignedint) (keyval % (
unsigned) multihash->
nlists);
2108multihash->hashkeyval, multihash->
userptr, keyval, key);
2126assert(multihash !=
NULL);
2128assert(multihash->
nlists> 0);
2129assert(multihash->hashgetkey !=
NULL);
2130assert(multihash->hashkeyeq !=
NULL);
2131assert(multihash->hashkeyval !=
NULL);
2132assert(multihashlist !=
NULL);
2133assert(key !=
NULL);
2135keyval = multihash->hashkeyval(multihash->
userptr, key);
2137 if( *multihashlist ==
NULL)
2139 unsigned inthashval;
2142hashval = (
unsignedint) (keyval % (
unsigned) multihash->
nlists);
2144*multihashlist = multihash->
lists[hashval];
2148multihash->hashkeyval, multihash->
userptr, keyval, key);
2159 unsigned inthashval;
2161assert(multihash !=
NULL);
2163assert(multihash->
nlists> 0);
2164assert(multihash->hashgetkey !=
NULL);
2165assert(multihash->hashkeyeq !=
NULL);
2166assert(multihash->hashkeyval !=
NULL);
2167assert(element !=
NULL);
2170key = multihash->hashgetkey(multihash->
userptr, element);
2171keyval = multihash->hashkeyval(multihash->
userptr, key);
2172hashval = (
unsignedint) (keyval % (
unsigned) multihash->
nlists);
2175multihash->hashkeyval, multihash->
userptr, keyval, key) !=
NULL);
2186 unsigned inthashval;
2188assert(multihash !=
NULL);
2190assert(multihash->
nlists> 0);
2191assert(multihash->hashgetkey !=
NULL);
2192assert(multihash->hashkeyeq !=
NULL);
2193assert(multihash->hashkeyval !=
NULL);
2194assert(element !=
NULL);
2197key = multihash->hashgetkey(multihash->
userptr, element);
2198keyval = multihash->hashkeyval(multihash->
userptr, key);
2199hashval = (
unsignedint) (keyval % (
unsigned) multihash->
nlists);
2221assert(multihash !=
NULL);
2223blkmem = multihash->
blkmem;
2224lists = multihash->
lists;
2227 for( i = multihash->
nlists- 1; i >= 0; --i )
2238assert(multihash !=
NULL);
2248assert(multihash !=
NULL);
2266assert(multihash !=
NULL);
2271 for( i = 0; i < multihash->
nlists; ++i )
2273multihashlist = multihash->
lists[i];
2274 if( multihashlist !=
NULL)
2278 while( multihashlist !=
NULL)
2281multihashlist = multihashlist->
next;
2283maxslotsize =
MAX(maxslotsize, slotsize);
2284sumslotsize += slotsize;
2287assert(sumslotsize == multihash->
nelements);
2292 if( usedslots > 0 )
2309 unsigned intnslots;
2314assert(tablesize >= 0);
2315assert(hashtable !=
NULL);
2316assert(hashgetkey !=
NULL);
2317assert(hashkeyeq !=
NULL);
2318assert(hashkeyval !=
NULL);
2319assert(blkmem !=
NULL);
2328(*hashtable)->shift = 32;
2329(*hashtable)->shift -= (
unsignedint)ceil(
LOG2(
MAX(32.0, tablesize / 0.9)));
2332nslots = 1u << (32 - (*hashtable)->shift);
2335(*hashtable)->mask = nslots - 1;
2338(*hashtable)->blkmem = blkmem;
2339(*hashtable)->hashgetkey = hashgetkey;
2340(*hashtable)->hashkeyeq = hashkeyeq;
2341(*hashtable)->hashkeyval = hashkeyval;
2342(*hashtable)->userptr = userptr;
2343(*hashtable)->nelements = 0;
2356assert(hashtable !=
NULL);
2357assert(*hashtable !=
NULL);
2359nslots = (*hashtable)->
mask+ 1;
2362uint32_t maxprobelen = 0;
2363uint64_t probelensum = 0;
2366assert(table !=
NULL);
2368 for( i = 0; i < nslots; ++i )
2370 if( table->
hashes[i] != 0 )
2372uint32_t probelen = ((i + table->
mask+ 1 - (table->
hashes[i]>>(table->
shift))) & table->
mask) + 1;
2373probelensum += probelen;
2374maxprobelen =
MAX(probelen, maxprobelen);
2379(
unsigned int)table->
nelements, (
unsigned int)table->
nelements, (
unsigned int)nslots,
2382 SCIPdebugMessage(
", avg. probe length is %.1f, max. probe length is %u",
2409#define ELEM_DISTANCE(pos) (((pos) + hashtable->mask + 1 - (hashtable->hashes[(pos)]>>(hashtable->shift))) & hashtable->mask) 2421uint32_t elemdistance;
2427assert(hashtable !=
NULL);
2430assert(hashtable->
mask> 0);
2431assert(hashtable->hashgetkey !=
NULL);
2432assert(hashtable->hashkeyeq !=
NULL);
2433assert(hashtable->hashkeyval !=
NULL);
2434assert(element !=
NULL);
2436pos = hashval>>(hashtable->
shift);
2443 if( hashtable->
hashes[pos] == 0 )
2445hashtable->
slots[pos] = element;
2446hashtable->
hashes[pos] = hashval;
2451 if( hashtable->
hashes[pos] == hashval && hashtable->hashkeyeq(hashtable->
userptr,
2452hashtable->hashgetkey(hashtable->
userptr, hashtable->
slots[pos]), key) )
2459hashtable->
slots[pos] = element;
2460hashtable->
hashes[pos] = hashval;
2471 if( distance < elemdistance )
2476elemdistance = distance;
2479hashval = hashtable->
hashes[pos];
2480hashtable->
hashes[pos] = tmp;
2481key = hashtable->hashgetkey(hashtable->
userptr, element);
2490pos = (pos + 1) & hashtable->
mask;
2501assert(hashtable !=
NULL);
2502assert(hashtable->
shift< 32);
2505 if( ((((uint64_t)hashtable->
nelements)<<10)>>(32-hashtable->
shift) > 921) )
2514nslots = hashtable->
mask+ 1;
2515newnslots = 2*nslots;
2516hashtable->
mask= newnslots-1;
2517--hashtable->
shift;
2528 for( i = 0; i < nslots; ++i )
2533 if( hashes[i] != 0 )
2559assert(hashtable !=
NULL);
2562assert(hashtable->
mask> 0);
2563assert(hashtable->hashgetkey !=
NULL);
2564assert(hashtable->hashkeyeq !=
NULL);
2565assert(hashtable->hashkeyval !=
NULL);
2566assert(element !=
NULL);
2571key = hashtable->hashgetkey(hashtable->
userptr, element);
2572keyval = hashtable->hashkeyval(hashtable->
userptr, key);
2591assert(hashtable !=
NULL);
2594assert(hashtable->
mask> 0);
2595assert(hashtable->hashgetkey !=
NULL);
2596assert(hashtable->hashkeyeq !=
NULL);
2597assert(hashtable->hashkeyval !=
NULL);
2598assert(element !=
NULL);
2603key = hashtable->hashgetkey(hashtable->
userptr, element);
2604keyval = hashtable->hashkeyval(hashtable->
userptr, key);
2619uint32_t elemdistance;
2621assert(hashtable !=
NULL);
2624assert(hashtable->
mask> 0);
2625assert(hashtable->hashgetkey !=
NULL);
2626assert(hashtable->hashkeyeq !=
NULL);
2627assert(hashtable->hashkeyval !=
NULL);
2628assert(key !=
NULL);
2631keyval = hashtable->hashkeyval(hashtable->
userptr, key);
2634pos = hashval>>(hashtable->
shift);
2642 if( hashtable->
hashes[pos] == 0 )
2648 if( elemdistance > distance )
2652 if( hashtable->
hashes[pos] == hashval && hashtable->hashkeyeq(hashtable->
userptr,
2653hashtable->hashgetkey(hashtable->
userptr, hashtable->
slots[pos]), key) )
2654 returnhashtable->
slots[pos];
2656pos = (pos + 1) & hashtable->
mask;
2667assert(hashtable !=
NULL);
2670assert(hashtable->
mask> 0);
2671assert(hashtable->hashgetkey !=
NULL);
2672assert(hashtable->hashkeyeq !=
NULL);
2673assert(hashtable->hashkeyval !=
NULL);
2674assert(element !=
NULL);
2688uint32_t elemdistance;
2692assert(hashtable !=
NULL);
2695assert(hashtable->
mask> 0);
2696assert(hashtable->hashgetkey !=
NULL);
2697assert(hashtable->hashkeyeq !=
NULL);
2698assert(hashtable->hashkeyval !=
NULL);
2699assert(element !=
NULL);
2702key = hashtable->hashgetkey(hashtable->
userptr, element);
2703keyval = hashtable->hashkeyval(hashtable->
userptr, key);
2707pos = hashval>>(hashtable->
shift);
2711 if( hashtable->
hashes[pos] == 0 )
2717 if( elemdistance > distance )
2720 if( hashtable->
hashes[pos] == hashval && hashtable->hashkeyeq(hashtable->
userptr,
2721hashtable->hashgetkey(hashtable->
userptr, hashtable->
slots[pos]), key) )
2727pos = (pos + 1) & hashtable->
mask;
2732hashtable->
hashes[pos] = 0;
2736uint32_t nextpos = (pos + 1) & hashtable->
mask;
2739 if( hashtable->
hashes[nextpos] == 0 )
2743 if( (hashtable->
hashes[nextpos]>>(hashtable->
shift)) == nextpos )
2747hashtable->
slots[pos] = hashtable->
slots[nextpos];
2748hashtable->
hashes[pos] = hashtable->
hashes[nextpos];
2749hashtable->
hashes[nextpos] = 0;
2762assert(hashtable !=
NULL);
2774assert(hashtable !=
NULL);
2784 return(
int) hashtable->
mask+ 1;
2793 returnhashtable->
hashes[entryidx] == 0 ?
NULL: hashtable->
slots[entryidx];
2801assert(hashtable !=
NULL);
2812uint32_t maxprobelen = 0;
2813uint64_t probelensum = 0;
2817assert(hashtable !=
NULL);
2819nslots = hashtable->
mask+ 1;
2822 for( i = 0; i < nslots; ++i )
2824 if( hashtable->
hashes[i] != 0 )
2827probelensum += probelen;
2828maxprobelen =
MAX(probelen, maxprobelen);
2847 const char* string1 = (
const char*)key1;
2848 const char* string2 = (
const char*)key2;
2850 return(strcmp(string1, string2) == 0);
2859str = (
const char*)key;
2861 while( *str !=
'\0')
2864hash += (
unsignedint)(*str);
2882 return(key1 == key2);
2889 return(uint64_t) (uintptr_t) key;
2901#define ELEM_DISTANCE(pos) (((pos) + hashmap->mask + 1 - (hashmap->hashes[(pos)]>>(hashmap->shift))) & hashmap->mask) 2913uint32_t elemdistance;
2916assert(hashmap !=
NULL);
2919assert(hashmap->
mask> 0);
2920assert(hashval != 0);
2922pos = hashval>>(hashmap->
shift);
2929 if( hashmap->
hashes[pos] == 0 )
2933hashmap->
hashes[pos] = hashval;
2938 if( hashval == hashmap->
hashes[pos] && origin == hashmap->
slots[pos].
origin)
2944hashmap->
hashes[pos] = hashval;
2955 if( distance < elemdistance )
2961elemdistance = distance;
2963hashval = hashmap->
hashes[pos];
2964hashmap->
hashes[pos] = tmphash;
2972pos = (pos + 1) & hashmap->
mask;
2988uint32_t elemdistance;
2990assert(hashmap !=
NULL);
2993assert(hashmap->
mask> 0);
2997assert(hashval != 0);
2999*pos = hashval>>(hashmap->
shift);
3007 if( hashmap->
hashes[*pos] == 0 )
3012 if( elemdistance > distance )
3016 if( hashmap->
hashes[*pos] == hashval && hashmap->
slots[*pos].
origin== origin )
3019*pos = (*pos + 1) & hashmap->
mask;
3030assert(hashmap !=
NULL);
3031assert(hashmap->
shift< 32);
3034 if( ((((uint64_t)hashmap->
nelements)<<10)>>(32-hashmap->
shift) > 921) )
3043nslots = hashmap->
mask+ 1;
3045newnslots = 2*nslots;
3046hashmap->
mask= newnslots-1;
3057 for( i = 0; i < nslots; ++i )
3062 if( hashes[i] != 0 )
3085assert(hashmap !=
NULL);
3086assert(mapsize >= 0);
3087assert(blkmem !=
NULL);
3096(*hashmap)->shift = 32;
3097(*hashmap)->shift -= (
unsignedint)ceil(log(
MAX(32, mapsize / 0.9)) / log(2.0));
3098nslots = 1u << (32 - (*hashmap)->shift);
3099(*hashmap)->mask = nslots - 1;
3100(*hashmap)->blkmem = blkmem;
3101(*hashmap)->nelements = 0;
3117assert(hashmap !=
NULL);
3118assert(*hashmap !=
NULL);
3120nslots = (*hashmap)->mask + 1;
3123uint32_t maxprobelen = 0;
3124uint64_t probelensum = 0;
3127assert(hashmap !=
NULL);
3129 for( i = 0; i < nslots; ++i )
3131 if( (*hashmap)->hashes[i] != 0 )
3133uint32_t probelen = ((i + (*hashmap)->mask + 1 - ((*hashmap)->hashes[i]>>((*hashmap)->shift))) & (*hashmap)->mask) + 1;
3134probelensum += probelen;
3135maxprobelen =
MAX(probelen, maxprobelen);
3140(
unsigned int)(*hashmap)->nelements, (
unsigned int)(*hashmap)->nelements, (
unsigned int)nslots,
3142 if( (*hashmap)->nelements > 0 )
3143 SCIPdebugPrintf(
", avg. probe length is %.1f, max. probe length is %u",
3144(
SCIP_Real)(probelensum)/(
SCIP_Real)(*hashmap)->nelements, (
unsigned int)maxprobelen);
3168assert(hashmap !=
NULL);
3171assert(hashmap->
mask> 0);
3204assert(hashmap !=
NULL);
3207assert(hashmap->
mask> 0);
3240assert(hashmap !=
NULL);
3243assert(hashmap->
mask> 0);
3271assert(hashmap !=
NULL);
3274assert(hashmap->
mask> 0);
3291assert(hashmap !=
NULL);
3294assert(hashmap->
mask> 0);
3311assert(hashmap !=
NULL);
3314assert(hashmap->
mask> 0);
3335assert(hashmap !=
NULL);
3337assert(hashmap->
mask> 0);
3369assert(hashmap !=
NULL);
3371assert(hashmap->
mask> 0);
3403assert(hashmap !=
NULL);
3405assert(hashmap->
mask> 0);
3433assert(hashmap !=
NULL);
3436assert(hashmap->
mask> 0);
3449assert(hashmap !=
NULL);
3451assert(hashmap->
mask> 0);
3453assert(origin !=
NULL);
3458hashmap->
hashes[pos] = 0;
3464uint32_t nextpos = (pos + 1) & hashmap->
mask;
3467 if( hashmap->
hashes[nextpos] == 0 )
3471 if( (hashmap->
hashes[nextpos]>>(hashmap->
shift)) == nextpos )
3478hashmap->
hashes[nextpos] = 0;
3493uint32_t maxprobelen = 0;
3494uint64_t probelensum = 0;
3498assert(hashmap !=
NULL);
3500nslots = hashmap->
mask+ 1;
3503 for( i = 0; i < nslots; ++i )
3505 if( hashmap->
hashes[i] != 0 )
3508probelensum += probelen;
3509maxprobelen =
MAX(probelen, maxprobelen);
3530assert(hashmap !=
NULL);
3548 return(
int) hashmap->
mask+ 1;
3557assert(hashmap !=
NULL);
3559 returnhashmap->
hashes[entryidx] == 0 ?
NULL: &hashmap->
slots[entryidx];
3567assert(entry !=
NULL);
3577assert(entry !=
NULL);
3587assert(entry !=
NULL);
3597assert(entry !=
NULL);
3608assert(entry !=
NULL);
3619assert(entry !=
NULL);
3630assert(entry !=
NULL);
3640assert(hashmap !=
NULL);
3657#define ELEM_DISTANCE(pos) (((pos) + nslots - hashSetDesiredPos(hashset, hashset->slots[(pos)])) & mask) 3666 return(uint32_t)((UINT64_C(0x9e3779b97f4a7c15) * (uintptr_t)element)>>(hashset->
shift));
3675uint32_t elemdistance;
3680assert(hashset !=
NULL);
3682assert(element !=
NULL);
3696hashset->
slots[pos] = element;
3701 if( hashset->
slots[pos] == element )
3706 if( distance < elemdistance )
3709elemdistance = distance;
3714pos = (pos + 1) & mask;
3726assert(hashset !=
NULL);
3727assert(hashset->
shift< 64);
3730 if( ((((uint64_t)hashset->
nelements)<<10)>>(64-hashset->
shift) > 921) )
3739newnslots = 2*nslots;
3749 for( i = 0; i < nslots; ++i )
3751 if( slots[i] !=
NULL)
3771assert(hashset !=
NULL);
3773assert(blkmem !=
NULL);
3782(*hashset)->shift = 64;
3783(*hashset)->shift -= (
unsignedint)ceil(log(
MAX(8.0, size / 0.9)) / log(2.0));
3785(*hashset)->nelements = 0;
3809assert(hashset !=
NULL);
3828uint32_t elemdistance;
3830assert(hashset !=
NULL);
3843 if( hashset->
slots[pos] == element )
3852 if( elemdistance > distance )
3855pos = (pos + 1) & mask;
3869uint32_t elemdistance;
3871assert(hashset !=
NULL);
3873assert(element !=
NULL);
3885 if( hashset->
slots[pos] == element )
3894 if( elemdistance > distance )
3897pos = (pos + 1) & mask;
3901assert(hashset->
slots[pos] == element);
3910uint32_t nextpos = (pos + 1) & mask;
3913 if( hashset->
slots[nextpos] ==
NULL)
3929hashset->
slots[pos] = hashset->
slots[nextpos];
3941uint32_t maxprobelen = 0;
3942uint64_t probelensum = 0;
3947assert(hashset !=
NULL);
3953 for( i = 0; i < nslots; ++i )
3958probelensum += probelen;
3959maxprobelen =
MAX(probelen, maxprobelen);
3981#undef SCIPhashsetIsEmpty 3982#undef SCIPhashsetGetNElements 3983#undef SCIPhashsetGetNSlots 3984#undef SCIPhashsetGetSlots 4007 return(
int) (1u << (64 - hashset->
shift));
4015 returnhashset->
slots;
4038assert(realarray !=
NULL);
4039assert(blkmem !=
NULL);
4042(*realarray)->blkmem = blkmem;
4043(*realarray)->vals =
NULL;
4044(*realarray)->valssize = 0;
4045(*realarray)->firstidx = -1;
4046(*realarray)->minusedidx = INT_MAX;
4047(*realarray)->maxusedidx = INT_MIN;
4059assert(realarray !=
NULL);
4060assert(sourcerealarray !=
NULL);
4063 if( sourcerealarray->
valssize> 0 )
4068(*realarray)->valssize = sourcerealarray->
valssize;
4069(*realarray)->firstidx = sourcerealarray->
firstidx;
4070(*realarray)->minusedidx = sourcerealarray->
minusedidx;
4071(*realarray)->maxusedidx = sourcerealarray->
maxusedidx;
4081assert(realarray !=
NULL);
4082assert(*realarray !=
NULL);
4104assert(realarray !=
NULL);
4109assert(0 <= minidx);
4110assert(minidx <= maxidx);
4114assert(0 <= minidx);
4115assert(minidx <= maxidx);
4117 SCIPdebugMessage(
"extending realarray %p (firstidx=%d, size=%d, range=[%d,%d]) to range [%d,%d]\n",
4121nused = maxidx - minidx + 1;
4122 if( nused > realarray->
valssize)
4128newvalssize =
calcGrowSize(arraygrowinit, arraygrowfac, nused);
4130nfree = newvalssize - nused;
4131newfirstidx = minidx - nfree/2;
4132newfirstidx =
MAX(newfirstidx, 0);
4133assert(newfirstidx <= minidx);
4134assert(maxidx < newfirstidx + newvalssize);
4139 for( i = 0; i < realarray->
minusedidx- newfirstidx; ++i )
4148 for( i = realarray->
maxusedidx- newfirstidx + 1; i < newvalssize; ++i )
4153 for( i = 0; i < newvalssize; ++i )
4159realarray->
vals= newvals;
4160realarray->
valssize= newvalssize;
4161realarray->
firstidx= newfirstidx;
4163 else if( realarray->
firstidx== -1 )
4166nfree = realarray->
valssize- nused;
4168realarray->
firstidx= minidx - nfree/2;
4169assert(realarray->
firstidx<= minidx);
4170assert(maxidx < realarray->firstidx + realarray->
valssize);
4172 for( i = 0; i < realarray->
valssize; ++i )
4173assert(realarray->
vals[i] == 0.0);
4176 else if( minidx < realarray->firstidx )
4179nfree = realarray->
valssize- nused;
4181newfirstidx = minidx - nfree/2;
4182newfirstidx =
MAX(newfirstidx, 0);
4183assert(newfirstidx <= minidx);
4184assert(maxidx < newfirstidx + realarray->valssize);
4194shift = realarray->
firstidx- newfirstidx;
4198assert(0 <= i + shift && i + shift < realarray->valssize);
4199realarray->
vals[i + shift] = realarray->
vals[i];
4202 for( i = 0; i < shift; ++i )
4205realarray->
firstidx= newfirstidx;
4210nfree = realarray->
valssize- nused;
4212newfirstidx = minidx - nfree/2;
4213newfirstidx =
MAX(newfirstidx, 0);
4214assert(newfirstidx <= minidx);
4215assert(maxidx < newfirstidx + realarray->valssize);
4225shift = newfirstidx - realarray->
firstidx;
4229assert(0 <= i - shift && i - shift < realarray->valssize);
4230realarray->
vals[i - shift] = realarray->
vals[i];
4233 for( i = 0; i < shift; ++i )
4236realarray->
firstidx= newfirstidx;
4239assert(minidx >= realarray->
firstidx);
4240assert(maxidx < realarray->firstidx + realarray->
valssize);
4250assert(realarray !=
NULL);
4252 SCIPdebugMessage(
"clearing realarray %p (firstidx=%d, size=%d, range=[%d,%d])\n",
4259assert(realarray->
firstidx!= -1);
4282assert(realarray !=
NULL);
4285 if( idx < realarray->minusedidx || idx > realarray->
maxusedidx)
4290assert(idx - realarray->
firstidx>= 0);
4306assert(realarray !=
NULL);
4309 SCIPdebugMessage(
"setting realarray %p (firstidx=%d, size=%d, range=[%d,%d]) index %d to %g\n",
4316assert(idx >= realarray->
firstidx);
4317assert(idx < realarray->firstidx + realarray->
valssize);
4326 else if( idx >= realarray->
firstidx&& idx < realarray->firstidx + realarray->
valssize)
4379 return SCIPrealarraySetVal(realarray, arraygrowinit, arraygrowfac, idx, oldval + incval);
4389assert(realarray !=
NULL);
4399assert(realarray !=
NULL);
4410assert(intarray !=
NULL);
4411assert(blkmem !=
NULL);
4414(*intarray)->blkmem = blkmem;
4415(*intarray)->vals =
NULL;
4416(*intarray)->valssize = 0;
4417(*intarray)->firstidx = -1;
4418(*intarray)->minusedidx = INT_MAX;
4419(*intarray)->maxusedidx = INT_MIN;
4431assert(intarray !=
NULL);
4432assert(sourceintarray !=
NULL);
4435 if( sourceintarray->
valssize> 0 )
4439(*intarray)->valssize = sourceintarray->
valssize;
4440(*intarray)->firstidx = sourceintarray->
firstidx;
4441(*intarray)->minusedidx = sourceintarray->
minusedidx;
4442(*intarray)->maxusedidx = sourceintarray->
maxusedidx;
4452assert(intarray !=
NULL);
4453assert(*intarray !=
NULL);
4475assert(intarray !=
NULL);
4480assert(0 <= minidx);
4481assert(minidx <= maxidx);
4485assert(0 <= minidx);
4486assert(minidx <= maxidx);
4488 SCIPdebugMessage(
"extending intarray %p (firstidx=%d, size=%d, range=[%d,%d]) to range [%d,%d]\n",
4492nused = maxidx - minidx + 1;
4499newvalssize =
calcGrowSize(arraygrowinit, arraygrowfac, nused);
4501nfree = newvalssize - nused;
4502newfirstidx = minidx - nfree/2;
4503newfirstidx =
MAX(newfirstidx, 0);
4504assert(newfirstidx <= minidx);
4505assert(maxidx < newfirstidx + newvalssize);
4510 for( i = 0; i < intarray->
minusedidx- newfirstidx; ++i )
4519 for( i = intarray->
maxusedidx- newfirstidx + 1; i < newvalssize; ++i )
4524 for( i = 0; i < newvalssize; ++i )
4530intarray->
vals= newvals;
4534 else if( intarray->
firstidx== -1 )
4537nfree = intarray->
valssize- nused;
4539intarray->
firstidx= minidx - nfree/2;
4540assert(intarray->
firstidx<= minidx);
4541assert(maxidx < intarray->firstidx + intarray->
valssize);
4543 for( i = 0; i < intarray->
valssize; ++i )
4544assert(intarray->
vals[i] == 0);
4547 else if( minidx < intarray->firstidx )
4550nfree = intarray->
valssize- nused;
4552newfirstidx = minidx - nfree/2;
4553newfirstidx =
MAX(newfirstidx, 0);
4554assert(newfirstidx <= minidx);
4555assert(maxidx < newfirstidx + intarray->valssize);
4565shift = intarray->
firstidx- newfirstidx;
4569assert(0 <= i + shift && i + shift < intarray->valssize);
4570intarray->
vals[i + shift] = intarray->
vals[i];
4573 for( i = 0; i < shift; ++i )
4581nfree = intarray->
valssize- nused;
4583newfirstidx = minidx - nfree/2;
4584newfirstidx =
MAX(newfirstidx, 0);
4585assert(newfirstidx <= minidx);
4586assert(maxidx < newfirstidx + intarray->valssize);
4596shift = newfirstidx - intarray->
firstidx;
4600assert(0 <= i - shift && i - shift < intarray->valssize);
4601intarray->
vals[i - shift] = intarray->
vals[i];
4604 for( i = 0; i < shift; ++i )
4610assert(minidx >= intarray->
firstidx);
4611assert(maxidx < intarray->firstidx + intarray->
valssize);
4621assert(intarray !=
NULL);
4623 SCIPdebugMessage(
"clearing intarray %p (firstidx=%d, size=%d, range=[%d,%d])\n",
4653assert(intarray !=
NULL);
4656 if( idx < intarray->minusedidx || idx > intarray->
maxusedidx)
4661assert(idx - intarray->
firstidx>= 0);
4677assert(intarray !=
NULL);
4680 SCIPdebugMessage(
"setting intarray %p (firstidx=%d, size=%d, range=[%d,%d]) index %d to %d\n",
4687assert(idx >= intarray->
firstidx);
4688assert(idx < intarray->firstidx + intarray->
valssize);
4697 else if( idx >= intarray->
firstidx&& idx < intarray->firstidx + intarray->
valssize)
4753assert(intarray !=
NULL);
4763assert(intarray !=
NULL);
4775assert(boolarray !=
NULL);
4776assert(blkmem !=
NULL);
4779(*boolarray)->blkmem = blkmem;
4780(*boolarray)->vals =
NULL;
4781(*boolarray)->valssize = 0;
4782(*boolarray)->firstidx = -1;
4783(*boolarray)->minusedidx = INT_MAX;
4784(*boolarray)->maxusedidx = INT_MIN;
4796assert(boolarray !=
NULL);
4797assert(sourceboolarray !=
NULL);
4800 if( sourceboolarray->
valssize> 0 )
4805(*boolarray)->valssize = sourceboolarray->
valssize;
4806(*boolarray)->firstidx = sourceboolarray->
firstidx;
4807(*boolarray)->minusedidx = sourceboolarray->
minusedidx;
4808(*boolarray)->maxusedidx = sourceboolarray->
maxusedidx;
4818assert(boolarray !=
NULL);
4819assert(*boolarray !=
NULL);
4841assert(boolarray !=
NULL);
4846assert(0 <= minidx);
4847assert(minidx <= maxidx);
4851assert(0 <= minidx);
4852assert(minidx <= maxidx);
4854 SCIPdebugMessage(
"extending boolarray %p (firstidx=%d, size=%d, range=[%d,%d]) to range [%d,%d]\n",
4858nused = maxidx - minidx + 1;
4859 if( nused > boolarray->
valssize)
4865newvalssize =
calcGrowSize(arraygrowinit, arraygrowfac, nused);
4867nfree = newvalssize - nused;
4868newfirstidx = minidx - nfree/2;
4869newfirstidx =
MAX(newfirstidx, 0);
4870assert(newfirstidx <= minidx);
4871assert(maxidx < newfirstidx + newvalssize);
4876 for( i = 0; i < boolarray->
minusedidx- newfirstidx; ++i )
4877newvals[i] =
FALSE;
4885 for( i = boolarray->
maxusedidx- newfirstidx + 1; i < newvalssize; ++i )
4886newvals[i] =
FALSE;
4890 for( i = 0; i < newvalssize; ++i )
4891newvals[i] =
FALSE;
4896boolarray->
vals= newvals;
4897boolarray->
valssize= newvalssize;
4898boolarray->
firstidx= newfirstidx;
4900 else if( boolarray->
firstidx== -1 )
4903nfree = boolarray->
valssize- nused;
4905boolarray->
firstidx= minidx - nfree/2;
4906assert(boolarray->
firstidx<= minidx);
4907assert(maxidx < boolarray->firstidx + boolarray->
valssize);
4909 for( i = 0; i < boolarray->
valssize; ++i )
4913 else if( minidx < boolarray->firstidx )
4916nfree = boolarray->
valssize- nused;
4918newfirstidx = minidx - nfree/2;
4919newfirstidx =
MAX(newfirstidx, 0);
4920assert(newfirstidx <= minidx);
4921assert(maxidx < newfirstidx + boolarray->valssize);
4931shift = boolarray->
firstidx- newfirstidx;
4935assert(0 <= i + shift && i + shift < boolarray->valssize);
4936boolarray->
vals[i + shift] = boolarray->
vals[i];
4939 for( i = 0; i < shift; ++i )
4942boolarray->
firstidx= newfirstidx;
4947nfree = boolarray->
valssize- nused;
4949newfirstidx = minidx - nfree/2;
4950newfirstidx =
MAX(newfirstidx, 0);
4951assert(newfirstidx <= minidx);
4952assert(maxidx < newfirstidx + boolarray->valssize);
4962shift = newfirstidx - boolarray->
firstidx;
4972 for( i = 0; i < shift; ++i )
4975boolarray->
firstidx= newfirstidx;
4978assert(minidx >= boolarray->
firstidx);
4979assert(maxidx < boolarray->firstidx + boolarray->
valssize);
4989assert(boolarray !=
NULL);
4991 SCIPdebugMessage(
"clearing boolarray %p (firstidx=%d, size=%d, range=[%d,%d])\n",
4998assert(boolarray->
firstidx!= -1);
5021assert(boolarray !=
NULL);
5024 if( idx < boolarray->minusedidx || idx > boolarray->
maxusedidx)
5029assert(idx - boolarray->
firstidx>= 0);
5045assert(boolarray !=
NULL);
5048 SCIPdebugMessage(
"setting boolarray %p (firstidx=%d, size=%d, range=[%d,%d]) index %d to %u\n",
5055assert(idx >= boolarray->
firstidx);
5056assert(idx < boolarray->firstidx + boolarray->
valssize);
5065 else if( idx >= boolarray->
firstidx&& idx < boolarray->firstidx + boolarray->
valssize)
5109assert(boolarray !=
NULL);
5119assert(boolarray !=
NULL);
5131assert(ptrarray !=
NULL);
5132assert(blkmem !=
NULL);
5135(*ptrarray)->blkmem = blkmem;
5136(*ptrarray)->vals =
NULL;
5137(*ptrarray)->valssize = 0;
5138(*ptrarray)->firstidx = -1;
5139(*ptrarray)->minusedidx = INT_MAX;
5140(*ptrarray)->maxusedidx = INT_MIN;
5152assert(ptrarray !=
NULL);
5153assert(sourceptrarray !=
NULL);
5156 if( sourceptrarray->
valssize> 0 )
5160(*ptrarray)->valssize = sourceptrarray->
valssize;
5161(*ptrarray)->firstidx = sourceptrarray->
firstidx;
5162(*ptrarray)->minusedidx = sourceptrarray->
minusedidx;
5163(*ptrarray)->maxusedidx = sourceptrarray->
maxusedidx;
5173assert(ptrarray !=
NULL);
5174assert(*ptrarray !=
NULL);
5196assert(ptrarray !=
NULL);
5201assert(0 <= minidx);
5202assert(minidx <= maxidx);
5206assert(0 <= minidx);
5207assert(minidx <= maxidx);
5209 SCIPdebugMessage(
"extending ptrarray %p (firstidx=%d, size=%d, range=[%d,%d]) to range [%d,%d]\n",
5213nused = maxidx - minidx + 1;
5220newvalssize =
calcGrowSize(arraygrowinit, arraygrowfac, nused);
5222nfree = newvalssize - nused;
5223newfirstidx = minidx - nfree/2;
5224newfirstidx =
MAX(newfirstidx, 0);
5225assert(newfirstidx <= minidx);
5226assert(maxidx < newfirstidx + newvalssize);
5231 for( i = 0; i < ptrarray->
minusedidx- newfirstidx; ++i )
5240 for( i = ptrarray->
maxusedidx- newfirstidx + 1; i < newvalssize; ++i )
5245 for( i = 0; i < newvalssize; ++i )
5251ptrarray->
vals= newvals;
5255 else if( ptrarray->
firstidx== -1 )
5258nfree = ptrarray->
valssize- nused;
5260ptrarray->
firstidx= minidx - nfree/2;
5261assert(ptrarray->
firstidx<= minidx);
5262assert(maxidx < ptrarray->firstidx + ptrarray->
valssize);
5264 for( i = 0; i < ptrarray->
valssize; ++i )
5265assert(ptrarray->
vals[i] ==
NULL);
5268 else if( minidx < ptrarray->firstidx )
5271nfree = ptrarray->
valssize- nused;
5273newfirstidx = minidx - nfree/2;
5274newfirstidx =
MAX(newfirstidx, 0);
5275assert(newfirstidx <= minidx);
5276assert(maxidx < newfirstidx + ptrarray->valssize);
5286shift = ptrarray->
firstidx- newfirstidx;
5290assert(0 <= i + shift && i + shift < ptrarray->valssize);
5291ptrarray->
vals[i + shift] = ptrarray->
vals[i];
5294 for( i = 0; i < shift; ++i )
5302nfree = ptrarray->
valssize- nused;
5304newfirstidx = minidx - nfree/2;
5305newfirstidx =
MAX(newfirstidx, 0);
5306assert(newfirstidx <= minidx);
5307assert(maxidx < newfirstidx + ptrarray->valssize);
5317shift = newfirstidx - ptrarray->
firstidx;
5321assert(0 <= i - shift && i - shift < ptrarray->valssize);
5322ptrarray->
vals[i - shift] = ptrarray->
vals[i];
5325 for( i = 0; i < shift; ++i )
5331assert(minidx >= ptrarray->
firstidx);
5332assert(maxidx < ptrarray->firstidx + ptrarray->
valssize);
5342assert(ptrarray !=
NULL);
5344 SCIPdebugMessage(
"clearing ptrarray %p (firstidx=%d, size=%d, range=[%d,%d])\n",
5374assert(ptrarray !=
NULL);
5377 if( idx < ptrarray->minusedidx || idx > ptrarray->
maxusedidx)
5382assert(idx - ptrarray->
firstidx>= 0);
5398assert(ptrarray !=
NULL);
5401 SCIPdebugMessage(
"setting ptrarray %p (firstidx=%d, size=%d, range=[%d,%d]) index %d to %p\n",
5408assert(idx >= ptrarray->
firstidx);
5409assert(idx < ptrarray->firstidx + ptrarray->
valssize);
5418 else if( idx >= ptrarray->
firstidx&& idx < ptrarray->firstidx + ptrarray->
valssize)
5462assert(ptrarray !=
NULL);
5472assert(ptrarray !=
NULL);
5488value1 = (int)(
size_t)elem1;
5489value2 = (int)(
size_t)elem2;
5491 if( value1 < value2 )
5494 if( value2 < value1 )
5507args = (
int*) dataptr;
5509 if( args[ind1] < args[ind2] )
5512 if( args[ind1] > args[ind2] )
5526args = (
void*) dataptr;
5528 if( args[ind1] < args[ind2] )
5531 if( args[ind1] > args[ind2] )
5550assert(indcomp !=
NULL);
5551assert(len == 0 || perm !=
NULL);
5554 for( pos = 0; pos < len; ++pos )
5561#define SORTTPL_NAMEEXT Ind 5562#define SORTTPL_KEYTYPE int 5563#define SORTTPL_INDCOMP 5568#define SORTTPL_NAMEEXT Ptr 5569#define SORTTPL_KEYTYPE void* 5570#define SORTTPL_PTRCOMP 5575#define SORTTPL_NAMEEXT PtrPtr 5576#define SORTTPL_KEYTYPE void* 5577#define SORTTPL_FIELD1TYPE void* 5578#define SORTTPL_PTRCOMP 5583#define SORTTPL_NAMEEXT PtrReal 5584#define SORTTPL_KEYTYPE void* 5585#define SORTTPL_FIELD1TYPE SCIP_Real 5586#define SORTTPL_PTRCOMP 5591#define SORTTPL_NAMEEXT PtrInt 5592#define SORTTPL_KEYTYPE void* 5593#define SORTTPL_FIELD1TYPE int 5594#define SORTTPL_PTRCOMP 5599#define SORTTPL_NAMEEXT PtrBool 5600#define SORTTPL_KEYTYPE void* 5601#define SORTTPL_FIELD1TYPE SCIP_Bool 5602#define SORTTPL_PTRCOMP 5607#define SORTTPL_NAMEEXT PtrIntInt 5608#define SORTTPL_KEYTYPE void* 5609#define SORTTPL_FIELD1TYPE int 5610#define SORTTPL_FIELD2TYPE int 5611#define SORTTPL_PTRCOMP 5616#define SORTTPL_NAMEEXT PtrRealInt 5617#define SORTTPL_KEYTYPE void* 5618#define SORTTPL_FIELD1TYPE SCIP_Real 5619#define SORTTPL_FIELD2TYPE int 5620#define SORTTPL_PTRCOMP 5624#define SORTTPL_NAMEEXT PtrRealRealInt 5625#define SORTTPL_KEYTYPE void* 5626#define SORTTPL_FIELD1TYPE SCIP_Real 5627#define SORTTPL_FIELD2TYPE SCIP_Real 5628#define SORTTPL_FIELD3TYPE int 5629#define SORTTPL_PTRCOMP 5633#define SORTTPL_NAMEEXT PtrRealRealBoolBool 5634#define SORTTPL_KEYTYPE void* 5635#define SORTTPL_FIELD1TYPE SCIP_Real 5636#define SORTTPL_FIELD2TYPE SCIP_Real 5637#define SORTTPL_FIELD3TYPE SCIP_Bool 5638#define SORTTPL_FIELD4TYPE SCIP_Bool 5639#define SORTTPL_PTRCOMP 5643#define SORTTPL_NAMEEXT PtrRealRealIntBool 5644#define SORTTPL_KEYTYPE void* 5645#define SORTTPL_FIELD1TYPE SCIP_Real 5646#define SORTTPL_FIELD2TYPE SCIP_Real 5647#define SORTTPL_FIELD3TYPE int 5648#define SORTTPL_FIELD4TYPE SCIP_Bool 5649#define SORTTPL_PTRCOMP 5653#define SORTTPL_NAMEEXT PtrRealBool 5654#define SORTTPL_KEYTYPE void* 5655#define SORTTPL_FIELD1TYPE SCIP_Real 5656#define SORTTPL_FIELD2TYPE SCIP_Bool 5657#define SORTTPL_PTRCOMP 5662#define SORTTPL_NAMEEXT PtrPtrInt 5663#define SORTTPL_KEYTYPE void* 5664#define SORTTPL_FIELD1TYPE void* 5665#define SORTTPL_FIELD2TYPE int 5666#define SORTTPL_PTRCOMP 5671#define SORTTPL_NAMEEXT PtrPtrReal 5672#define SORTTPL_KEYTYPE void* 5673#define SORTTPL_FIELD1TYPE void* 5674#define SORTTPL_FIELD2TYPE SCIP_Real 5675#define SORTTPL_PTRCOMP 5680#define SORTTPL_NAMEEXT PtrRealIntInt 5681#define SORTTPL_KEYTYPE void* 5682#define SORTTPL_FIELD1TYPE SCIP_Real 5683#define SORTTPL_FIELD2TYPE int 5684#define SORTTPL_FIELD3TYPE int 5685#define SORTTPL_PTRCOMP 5690#define SORTTPL_NAMEEXT PtrPtrIntInt 5691#define SORTTPL_KEYTYPE void* 5692#define SORTTPL_FIELD1TYPE void* 5693#define SORTTPL_FIELD2TYPE int 5694#define SORTTPL_FIELD3TYPE int 5695#define SORTTPL_PTRCOMP 5700#define SORTTPL_NAMEEXT PtrPtrRealInt 5701#define SORTTPL_KEYTYPE void* 5702#define SORTTPL_FIELD1TYPE void* 5703#define SORTTPL_FIELD2TYPE SCIP_Real 5704#define SORTTPL_FIELD3TYPE int 5705#define SORTTPL_PTRCOMP 5710#define SORTTPL_NAMEEXT PtrPtrRealBool 5711#define SORTTPL_KEYTYPE void* 5712#define SORTTPL_FIELD1TYPE void* 5713#define SORTTPL_FIELD2TYPE SCIP_Real 5714#define SORTTPL_FIELD3TYPE SCIP_Bool 5715#define SORTTPL_PTRCOMP 5720#define SORTTPL_NAMEEXT PtrPtrLongInt 5721#define SORTTPL_KEYTYPE void* 5722#define SORTTPL_FIELD1TYPE void* 5723#define SORTTPL_FIELD2TYPE SCIP_Longint 5724#define SORTTPL_FIELD3TYPE int 5725#define SORTTPL_PTRCOMP 5730#define SORTTPL_NAMEEXT PtrPtrLongIntInt 5731#define SORTTPL_KEYTYPE void* 5732#define SORTTPL_FIELD1TYPE void* 5733#define SORTTPL_FIELD2TYPE SCIP_Longint 5734#define SORTTPL_FIELD3TYPE int 5735#define SORTTPL_FIELD4TYPE int 5736#define SORTTPL_PTRCOMP 5741#define SORTTPL_NAMEEXT Real 5742#define SORTTPL_KEYTYPE SCIP_Real 5747#define SORTTPL_NAMEEXT RealBoolPtr 5748#define SORTTPL_KEYTYPE SCIP_Real 5749#define SORTTPL_FIELD1TYPE SCIP_Bool 5750#define SORTTPL_FIELD2TYPE void* 5755#define SORTTPL_NAMEEXT RealPtr 5756#define SORTTPL_KEYTYPE SCIP_Real 5757#define SORTTPL_FIELD1TYPE void* 5762#define SORTTPL_NAMEEXT RealInt 5763#define SORTTPL_KEYTYPE SCIP_Real 5764#define SORTTPL_FIELD1TYPE int 5769#define SORTTPL_NAMEEXT RealIntInt 5770#define SORTTPL_KEYTYPE SCIP_Real 5771#define SORTTPL_FIELD1TYPE int 5772#define SORTTPL_FIELD2TYPE int 5777#define SORTTPL_NAMEEXT RealIntLong 5778#define SORTTPL_KEYTYPE SCIP_Real 5779#define SORTTPL_FIELD1TYPE int 5780#define SORTTPL_FIELD2TYPE SCIP_Longint 5785#define SORTTPL_NAMEEXT RealIntPtr 5786#define SORTTPL_KEYTYPE SCIP_Real 5787#define SORTTPL_FIELD1TYPE int 5788#define SORTTPL_FIELD2TYPE void* 5793#define SORTTPL_NAMEEXT RealRealPtr 5794#define SORTTPL_KEYTYPE SCIP_Real 5795#define SORTTPL_FIELD1TYPE SCIP_Real 5796#define SORTTPL_FIELD2TYPE void* 5801#define SORTTPL_NAMEEXT RealLongRealInt 5802#define SORTTPL_KEYTYPE SCIP_Real 5803#define SORTTPL_FIELD1TYPE SCIP_Longint 5804#define SORTTPL_FIELD2TYPE SCIP_Real 5805#define SORTTPL_FIELD3TYPE int 5809#define SORTTPL_NAMEEXT RealRealIntInt 5810#define SORTTPL_KEYTYPE SCIP_Real 5811#define SORTTPL_FIELD1TYPE SCIP_Real 5812#define SORTTPL_FIELD2TYPE int 5813#define SORTTPL_FIELD3TYPE int 5818#define SORTTPL_NAMEEXT RealRealRealInt 5819#define SORTTPL_KEYTYPE SCIP_Real 5820#define SORTTPL_FIELD1TYPE SCIP_Real 5821#define SORTTPL_FIELD2TYPE SCIP_Real 5822#define SORTTPL_FIELD3TYPE int 5827#define SORTTPL_NAMEEXT RealRealRealPtr 5828#define SORTTPL_KEYTYPE SCIP_Real 5829#define SORTTPL_FIELD1TYPE SCIP_Real 5830#define SORTTPL_FIELD2TYPE SCIP_Real 5831#define SORTTPL_FIELD3TYPE void* 5836#define SORTTPL_NAMEEXT RealPtrPtrInt 5837#define SORTTPL_KEYTYPE SCIP_Real 5838#define SORTTPL_FIELD1TYPE void* 5839#define SORTTPL_FIELD2TYPE void* 5840#define SORTTPL_FIELD3TYPE int 5845#define SORTTPL_NAMEEXT RealPtrPtrIntInt 5846#define SORTTPL_KEYTYPE SCIP_Real 5847#define SORTTPL_FIELD1TYPE void* 5848#define SORTTPL_FIELD2TYPE void* 5849#define SORTTPL_FIELD3TYPE int 5850#define SORTTPL_FIELD4TYPE int 5855#define SORTTPL_NAMEEXT RealRealRealBoolPtr 5856#define SORTTPL_KEYTYPE SCIP_Real 5857#define SORTTPL_FIELD1TYPE SCIP_Real 5858#define SORTTPL_FIELD2TYPE SCIP_Real 5859#define SORTTPL_FIELD3TYPE SCIP_Bool 5860#define SORTTPL_FIELD4TYPE void* 5865#define SORTTPL_NAMEEXT RealRealRealBoolBoolPtr 5866#define SORTTPL_KEYTYPE SCIP_Real 5867#define SORTTPL_FIELD1TYPE SCIP_Real 5868#define SORTTPL_FIELD2TYPE SCIP_Real 5869#define SORTTPL_FIELD3TYPE SCIP_Bool 5870#define SORTTPL_FIELD4TYPE SCIP_Bool 5871#define SORTTPL_FIELD5TYPE void* 5876#define SORTTPL_NAMEEXT Int 5877#define SORTTPL_KEYTYPE int 5882#define SORTTPL_NAMEEXT IntInt 5883#define SORTTPL_KEYTYPE int 5884#define SORTTPL_FIELD1TYPE int 5889#define SORTTPL_NAMEEXT IntReal 5890#define SORTTPL_KEYTYPE int 5891#define SORTTPL_FIELD1TYPE SCIP_Real 5896#define SORTTPL_NAMEEXT IntPtr 5897#define SORTTPL_KEYTYPE int 5898#define SORTTPL_FIELD1TYPE void* 5903#define SORTTPL_NAMEEXT IntIntInt 5904#define SORTTPL_KEYTYPE int 5905#define SORTTPL_FIELD1TYPE int 5906#define SORTTPL_FIELD2TYPE int 5911#define SORTTPL_NAMEEXT IntIntLong 5912#define SORTTPL_KEYTYPE int 5913#define SORTTPL_FIELD1TYPE int 5914#define SORTTPL_FIELD2TYPE SCIP_Longint 5918#define SORTTPL_NAMEEXT IntRealLong 5919#define SORTTPL_KEYTYPE int 5920#define SORTTPL_FIELD1TYPE SCIP_Real 5921#define SORTTPL_FIELD2TYPE SCIP_Longint 5926#define SORTTPL_NAMEEXT IntIntPtr 5927#define SORTTPL_KEYTYPE int 5928#define SORTTPL_FIELD1TYPE int 5929#define SORTTPL_FIELD2TYPE void* 5934#define SORTTPL_NAMEEXT IntIntReal 5935#define SORTTPL_KEYTYPE int 5936#define SORTTPL_FIELD1TYPE int 5937#define SORTTPL_FIELD2TYPE SCIP_Real 5942#define SORTTPL_NAMEEXT IntPtrReal 5943#define SORTTPL_KEYTYPE int 5944#define SORTTPL_FIELD1TYPE void* 5945#define SORTTPL_FIELD2TYPE SCIP_Real 5950#define SORTTPL_NAMEEXT IntIntIntPtr 5951#define SORTTPL_KEYTYPE int 5952#define SORTTPL_FIELD1TYPE int 5953#define SORTTPL_FIELD2TYPE int 5954#define SORTTPL_FIELD3TYPE void* 5958#define SORTTPL_NAMEEXT IntIntIntReal 5959#define SORTTPL_KEYTYPE int 5960#define SORTTPL_FIELD1TYPE int 5961#define SORTTPL_FIELD2TYPE int 5962#define SORTTPL_FIELD3TYPE SCIP_Real 5966#define SORTTPL_NAMEEXT IntPtrIntReal 5967#define SORTTPL_KEYTYPE int 5968#define SORTTPL_FIELD1TYPE void* 5969#define SORTTPL_FIELD2TYPE int 5970#define SORTTPL_FIELD3TYPE SCIP_Real 5975#define SORTTPL_NAMEEXT Long 5976#define SORTTPL_KEYTYPE SCIP_Longint 5981#define SORTTPL_NAMEEXT LongPtr 5982#define SORTTPL_KEYTYPE SCIP_Longint 5983#define SORTTPL_FIELD1TYPE void* 5988#define SORTTPL_NAMEEXT LongPtrInt 5989#define SORTTPL_KEYTYPE SCIP_Longint 5990#define SORTTPL_FIELD1TYPE void* 5991#define SORTTPL_FIELD2TYPE int 5996#define SORTTPL_NAMEEXT LongPtrRealBool 5997#define SORTTPL_KEYTYPE SCIP_Longint 5998#define SORTTPL_FIELD1TYPE void* 5999#define SORTTPL_FIELD2TYPE SCIP_Real 6000#define SORTTPL_FIELD3TYPE SCIP_Bool 6005#define SORTTPL_NAMEEXT LongPtrRealRealBool 6006#define SORTTPL_KEYTYPE SCIP_Longint 6007#define SORTTPL_FIELD1TYPE void* 6008#define SORTTPL_FIELD2TYPE SCIP_Real 6009#define SORTTPL_FIELD3TYPE SCIP_Real 6010#define SORTTPL_FIELD4TYPE SCIP_Bool 6015#define SORTTPL_NAMEEXT LongPtrRealRealIntBool 6016#define SORTTPL_KEYTYPE SCIP_Longint 6017#define SORTTPL_FIELD1TYPE void* 6018#define SORTTPL_FIELD2TYPE SCIP_Real 6019#define SORTTPL_FIELD3TYPE SCIP_Real 6020#define SORTTPL_FIELD4TYPE int 6021#define SORTTPL_FIELD5TYPE SCIP_Bool 6026#define SORTTPL_NAMEEXT LongPtrPtrInt 6027#define SORTTPL_KEYTYPE SCIP_Longint 6028#define SORTTPL_FIELD1TYPE void* 6029#define SORTTPL_FIELD2TYPE void* 6030#define SORTTPL_FIELD3TYPE int 6035#define SORTTPL_NAMEEXT LongPtrPtrIntInt 6036#define SORTTPL_KEYTYPE SCIP_Longint 6037#define SORTTPL_FIELD1TYPE void* 6038#define SORTTPL_FIELD2TYPE void* 6039#define SORTTPL_FIELD3TYPE int 6040#define SORTTPL_FIELD4TYPE int 6045#define SORTTPL_NAMEEXT LongPtrPtrBoolInt 6046#define SORTTPL_KEYTYPE SCIP_Longint 6047#define SORTTPL_FIELD1TYPE void* 6048#define SORTTPL_FIELD2TYPE void* 6049#define SORTTPL_FIELD3TYPE SCIP_Bool 6050#define SORTTPL_FIELD4TYPE int 6055#define SORTTPL_NAMEEXT PtrIntIntBoolBool 6056#define SORTTPL_KEYTYPE void* 6057#define SORTTPL_FIELD1TYPE int 6058#define SORTTPL_FIELD2TYPE int 6059#define SORTTPL_FIELD3TYPE SCIP_Bool 6060#define SORTTPL_FIELD4TYPE SCIP_Bool 6061#define SORTTPL_PTRCOMP 6066#define SORTTPL_NAMEEXT IntPtrIntIntBoolBool 6067#define SORTTPL_KEYTYPE int 6068#define SORTTPL_FIELD1TYPE void* 6069#define SORTTPL_FIELD2TYPE int 6070#define SORTTPL_FIELD3TYPE int 6071#define SORTTPL_FIELD4TYPE SCIP_Bool 6072#define SORTTPL_FIELD5TYPE SCIP_Bool 6089assert(indcomp !=
NULL);
6090assert(len == 0 || perm !=
NULL);
6093 for( pos = 0; pos < len; ++pos )
6101#define SORTTPL_NAMEEXT DownInd 6102#define SORTTPL_KEYTYPE int 6103#define SORTTPL_INDCOMP 6104#define SORTTPL_BACKWARDS 6109#define SORTTPL_NAMEEXT DownPtr 6110#define SORTTPL_KEYTYPE void* 6111#define SORTTPL_PTRCOMP 6112#define SORTTPL_BACKWARDS 6117#define SORTTPL_NAMEEXT DownPtrPtr 6118#define SORTTPL_KEYTYPE void* 6119#define SORTTPL_FIELD1TYPE void* 6120#define SORTTPL_PTRCOMP 6121#define SORTTPL_BACKWARDS 6126#define SORTTPL_NAMEEXT DownPtrReal 6127#define SORTTPL_KEYTYPE void* 6128#define SORTTPL_FIELD1TYPE SCIP_Real 6129#define SORTTPL_PTRCOMP 6130#define SORTTPL_BACKWARDS 6135#define SORTTPL_NAMEEXT DownPtrInt 6136#define SORTTPL_KEYTYPE void* 6137#define SORTTPL_FIELD1TYPE int 6138#define SORTTPL_PTRCOMP 6139#define SORTTPL_BACKWARDS 6143#define SORTTPL_NAMEEXT DownPtrBool 6144#define SORTTPL_KEYTYPE void* 6145#define SORTTPL_FIELD1TYPE SCIP_Bool 6146#define SORTTPL_PTRCOMP 6147#define SORTTPL_BACKWARDS 6151#define SORTTPL_NAMEEXT DownPtrIntInt 6152#define SORTTPL_KEYTYPE void* 6153#define SORTTPL_FIELD1TYPE int 6154#define SORTTPL_FIELD2TYPE int 6155#define SORTTPL_PTRCOMP 6156#define SORTTPL_BACKWARDS 6161#define SORTTPL_NAMEEXT DownPtrRealInt 6162#define SORTTPL_KEYTYPE void* 6163#define SORTTPL_FIELD1TYPE SCIP_Real 6164#define SORTTPL_FIELD2TYPE int 6165#define SORTTPL_PTRCOMP 6166#define SORTTPL_BACKWARDS 6171#define SORTTPL_NAMEEXT DownPtrRealBool 6172#define SORTTPL_KEYTYPE void* 6173#define SORTTPL_FIELD1TYPE SCIP_Real 6174#define SORTTPL_FIELD2TYPE SCIP_Bool 6175#define SORTTPL_PTRCOMP 6176#define SORTTPL_BACKWARDS 6181#define SORTTPL_NAMEEXT DownPtrPtrInt 6182#define SORTTPL_KEYTYPE void* 6183#define SORTTPL_FIELD1TYPE void* 6184#define SORTTPL_FIELD2TYPE int 6185#define SORTTPL_PTRCOMP 6186#define SORTTPL_BACKWARDS 6191#define SORTTPL_NAMEEXT DownPtrPtrReal 6192#define SORTTPL_KEYTYPE void* 6193#define SORTTPL_FIELD1TYPE void* 6194#define SORTTPL_FIELD2TYPE SCIP_Real 6195#define SORTTPL_PTRCOMP 6196#define SORTTPL_BACKWARDS 6201#define SORTTPL_NAMEEXT DownPtrRealIntInt 6202#define SORTTPL_KEYTYPE void* 6203#define SORTTPL_FIELD1TYPE SCIP_Real 6204#define SORTTPL_FIELD2TYPE int 6205#define SORTTPL_FIELD3TYPE int 6206#define SORTTPL_PTRCOMP 6207#define SORTTPL_BACKWARDS 6212#define SORTTPL_NAMEEXT DownPtrPtrIntInt 6213#define SORTTPL_KEYTYPE void* 6214#define SORTTPL_FIELD1TYPE void* 6215#define SORTTPL_FIELD2TYPE int 6216#define SORTTPL_FIELD3TYPE int 6217#define SORTTPL_PTRCOMP 6218#define SORTTPL_BACKWARDS 6223#define SORTTPL_NAMEEXT DownPtrPtrRealInt 6224#define SORTTPL_KEYTYPE void* 6225#define SORTTPL_FIELD1TYPE void* 6226#define SORTTPL_FIELD2TYPE SCIP_Real 6227#define SORTTPL_FIELD3TYPE int 6228#define SORTTPL_PTRCOMP 6229#define SORTTPL_BACKWARDS 6234#define SORTTPL_NAMEEXT DownPtrPtrRealBool 6235#define SORTTPL_KEYTYPE void* 6236#define SORTTPL_FIELD1TYPE void* 6237#define SORTTPL_FIELD2TYPE SCIP_Real 6238#define SORTTPL_FIELD3TYPE SCIP_Bool 6239#define SORTTPL_PTRCOMP 6240#define SORTTPL_BACKWARDS 6245#define SORTTPL_NAMEEXT DownPtrPtrLongInt 6246#define SORTTPL_KEYTYPE void* 6247#define SORTTPL_FIELD1TYPE void* 6248#define SORTTPL_FIELD2TYPE SCIP_Longint 6249#define SORTTPL_FIELD3TYPE int 6250#define SORTTPL_PTRCOMP 6251#define SORTTPL_BACKWARDS 6256#define SORTTPL_NAMEEXT DownPtrPtrLongIntInt 6257#define SORTTPL_KEYTYPE void* 6258#define SORTTPL_FIELD1TYPE void* 6259#define SORTTPL_FIELD2TYPE SCIP_Longint 6260#define SORTTPL_FIELD3TYPE int 6261#define SORTTPL_FIELD4TYPE int 6262#define SORTTPL_PTRCOMP 6263#define SORTTPL_BACKWARDS 6268#define SORTTPL_NAMEEXT DownReal 6269#define SORTTPL_KEYTYPE SCIP_Real 6270#define SORTTPL_BACKWARDS 6275#define SORTTPL_NAMEEXT DownRealBoolPtr 6276#define SORTTPL_KEYTYPE SCIP_Real 6277#define SORTTPL_FIELD1TYPE SCIP_Bool 6278#define SORTTPL_FIELD2TYPE void* 6279#define SORTTPL_BACKWARDS 6284#define SORTTPL_NAMEEXT DownRealPtr 6285#define SORTTPL_KEYTYPE SCIP_Real 6286#define SORTTPL_FIELD1TYPE void* 6287#define SORTTPL_BACKWARDS 6292#define SORTTPL_NAMEEXT DownRealInt 6293#define SORTTPL_KEYTYPE SCIP_Real 6294#define SORTTPL_FIELD1TYPE int 6295#define SORTTPL_BACKWARDS 6299#define SORTTPL_NAMEEXT DownRealIntInt 6300#define SORTTPL_KEYTYPE SCIP_Real 6301#define SORTTPL_FIELD1TYPE int 6302#define SORTTPL_FIELD2TYPE int 6303#define SORTTPL_BACKWARDS 6307#define SORTTPL_NAMEEXT DownRealIntLong 6308#define SORTTPL_KEYTYPE SCIP_Real 6309#define SORTTPL_FIELD1TYPE int 6310#define SORTTPL_FIELD2TYPE SCIP_Longint 6311#define SORTTPL_BACKWARDS 6316#define SORTTPL_NAMEEXT DownRealIntPtr 6317#define SORTTPL_KEYTYPE SCIP_Real 6318#define SORTTPL_FIELD1TYPE int 6319#define SORTTPL_FIELD2TYPE void* 6320#define SORTTPL_BACKWARDS 6325#define SORTTPL_NAMEEXT DownRealPtrPtr 6326#define SORTTPL_KEYTYPE SCIP_Real 6327#define SORTTPL_FIELD1TYPE void* 6328#define SORTTPL_FIELD2TYPE void* 6329#define SORTTPL_BACKWARDS 6333#define SORTTPL_NAMEEXT DownRealRealInt 6334#define SORTTPL_KEYTYPE SCIP_Real 6335#define SORTTPL_FIELD1TYPE SCIP_Real 6336#define SORTTPL_FIELD2TYPE int 6337#define SORTTPL_BACKWARDS 6341#define SORTTPL_NAMEEXT DownRealRealPtr 6342#define SORTTPL_KEYTYPE SCIP_Real 6343#define SORTTPL_FIELD1TYPE SCIP_Real 6344#define SORTTPL_FIELD2TYPE void* 6345#define SORTTPL_BACKWARDS 6349#define SORTTPL_NAMEEXT DownRealRealPtrPtr 6350#define SORTTPL_KEYTYPE SCIP_Real 6351#define SORTTPL_FIELD1TYPE SCIP_Real 6352#define SORTTPL_FIELD2TYPE void* 6353#define SORTTPL_FIELD3TYPE void* 6354#define SORTTPL_BACKWARDS 6359#define SORTTPL_NAMEEXT DownRealLongRealInt 6360#define SORTTPL_KEYTYPE SCIP_Real 6361#define SORTTPL_FIELD1TYPE SCIP_Longint 6362#define SORTTPL_FIELD2TYPE SCIP_Real 6363#define SORTTPL_FIELD3TYPE int 6364#define SORTTPL_BACKWARDS 6369#define SORTTPL_NAMEEXT DownRealRealIntInt 6370#define SORTTPL_KEYTYPE SCIP_Real 6371#define SORTTPL_FIELD1TYPE SCIP_Real 6372#define SORTTPL_FIELD2TYPE int 6373#define SORTTPL_FIELD3TYPE int 6374#define SORTTPL_BACKWARDS 6379#define SORTTPL_NAMEEXT DownRealRealRealInt 6380#define SORTTPL_KEYTYPE SCIP_Real 6381#define SORTTPL_FIELD1TYPE SCIP_Real 6382#define SORTTPL_FIELD2TYPE SCIP_Real 6383#define SORTTPL_FIELD3TYPE int 6384#define SORTTPL_BACKWARDS 6389#define SORTTPL_NAMEEXT DownRealRealRealPtr 6390#define SORTTPL_KEYTYPE SCIP_Real 6391#define SORTTPL_FIELD1TYPE SCIP_Real 6392#define SORTTPL_FIELD2TYPE SCIP_Real 6393#define SORTTPL_FIELD3TYPE void* 6394#define SORTTPL_BACKWARDS 6399#define SORTTPL_NAMEEXT DownRealPtrPtrInt 6400#define SORTTPL_KEYTYPE SCIP_Real 6401#define SORTTPL_FIELD1TYPE void* 6402#define SORTTPL_FIELD2TYPE void* 6403#define SORTTPL_FIELD3TYPE int 6404#define SORTTPL_BACKWARDS 6408#define SORTTPL_NAMEEXT DownRealPtrPtrIntInt 6409#define SORTTPL_KEYTYPE SCIP_Real 6410#define SORTTPL_FIELD1TYPE void* 6411#define SORTTPL_FIELD2TYPE void* 6412#define SORTTPL_FIELD3TYPE int 6413#define SORTTPL_FIELD4TYPE int 6414#define SORTTPL_BACKWARDS 6419#define SORTTPL_NAMEEXT DownRealRealRealBoolPtr 6420#define SORTTPL_KEYTYPE SCIP_Real 6421#define SORTTPL_FIELD1TYPE SCIP_Real 6422#define SORTTPL_FIELD2TYPE SCIP_Real 6423#define SORTTPL_FIELD3TYPE SCIP_Bool 6424#define SORTTPL_FIELD4TYPE void* 6425#define SORTTPL_BACKWARDS 6430#define SORTTPL_NAMEEXT DownRealRealRealBoolBoolPtr 6431#define SORTTPL_KEYTYPE SCIP_Real 6432#define SORTTPL_FIELD1TYPE SCIP_Real 6433#define SORTTPL_FIELD2TYPE SCIP_Real 6434#define SORTTPL_FIELD3TYPE SCIP_Bool 6435#define SORTTPL_FIELD4TYPE SCIP_Bool 6436#define SORTTPL_FIELD5TYPE void* 6441#define SORTTPL_NAMEEXT DownInt 6442#define SORTTPL_KEYTYPE int 6443#define SORTTPL_BACKWARDS 6448#define SORTTPL_NAMEEXT DownIntInt 6449#define SORTTPL_KEYTYPE int 6450#define SORTTPL_FIELD1TYPE int 6451#define SORTTPL_BACKWARDS 6456#define SORTTPL_NAMEEXT DownIntIntReal 6457#define SORTTPL_KEYTYPE int 6458#define SORTTPL_FIELD1TYPE int 6459#define SORTTPL_FIELD2TYPE SCIP_Real 6460#define SORTTPL_BACKWARDS 6465#define SORTTPL_NAMEEXT DownIntReal 6466#define SORTTPL_KEYTYPE int 6467#define SORTTPL_FIELD1TYPE SCIP_Real 6468#define SORTTPL_BACKWARDS 6473#define SORTTPL_NAMEEXT DownIntPtr 6474#define SORTTPL_KEYTYPE int 6475#define SORTTPL_FIELD1TYPE void* 6476#define SORTTPL_BACKWARDS 6481#define SORTTPL_NAMEEXT DownIntIntInt 6482#define SORTTPL_KEYTYPE int 6483#define SORTTPL_FIELD1TYPE int 6484#define SORTTPL_FIELD2TYPE int 6485#define SORTTPL_BACKWARDS 6490#define SORTTPL_NAMEEXT DownIntIntLong 6491#define SORTTPL_KEYTYPE int 6492#define SORTTPL_FIELD1TYPE int 6493#define SORTTPL_FIELD2TYPE SCIP_Longint 6494#define SORTTPL_BACKWARDS 6499#define SORTTPL_NAMEEXT DownIntIntPtr 6500#define SORTTPL_KEYTYPE int 6501#define SORTTPL_FIELD1TYPE int 6502#define SORTTPL_FIELD2TYPE void* 6503#define SORTTPL_BACKWARDS 6508#define SORTTPL_NAMEEXT DownIntIntIntPtr 6509#define SORTTPL_KEYTYPE int 6510#define SORTTPL_FIELD1TYPE int 6511#define SORTTPL_FIELD2TYPE int 6512#define SORTTPL_FIELD3TYPE void* 6513#define SORTTPL_BACKWARDS 6518#define SORTTPL_NAMEEXT DownIntPtrIntReal 6519#define SORTTPL_KEYTYPE int 6520#define SORTTPL_FIELD1TYPE void* 6521#define SORTTPL_FIELD2TYPE int 6522#define SORTTPL_FIELD3TYPE SCIP_Real 6523#define SORTTPL_BACKWARDS 6528#define SORTTPL_NAMEEXT DownLong 6529#define SORTTPL_KEYTYPE SCIP_Longint 6530#define SORTTPL_BACKWARDS 6535#define SORTTPL_NAMEEXT DownLongPtr 6536#define SORTTPL_KEYTYPE SCIP_Longint 6537#define SORTTPL_FIELD1TYPE void* 6538#define SORTTPL_BACKWARDS 6543#define SORTTPL_NAMEEXT DownLongPtrInt 6544#define SORTTPL_KEYTYPE SCIP_Longint 6545#define SORTTPL_FIELD1TYPE void* 6546#define SORTTPL_FIELD2TYPE int 6547#define SORTTPL_BACKWARDS 6552#define SORTTPL_NAMEEXT DownLongPtrRealBool 6553#define SORTTPL_KEYTYPE SCIP_Longint 6554#define SORTTPL_FIELD1TYPE void* 6555#define SORTTPL_FIELD2TYPE SCIP_Real 6556#define SORTTPL_FIELD3TYPE SCIP_Bool 6557#define SORTTPL_BACKWARDS 6562#define SORTTPL_NAMEEXT DownLongPtrRealRealBool 6563#define SORTTPL_KEYTYPE SCIP_Longint 6564#define SORTTPL_FIELD1TYPE void* 6565#define SORTTPL_FIELD2TYPE SCIP_Real 6566#define SORTTPL_FIELD3TYPE SCIP_Real 6567#define SORTTPL_FIELD4TYPE SCIP_Bool 6568#define SORTTPL_BACKWARDS 6573#define SORTTPL_NAMEEXT DownLongPtrRealRealIntBool 6574#define SORTTPL_KEYTYPE SCIP_Longint 6575#define SORTTPL_FIELD1TYPE void* 6576#define SORTTPL_FIELD2TYPE SCIP_Real 6577#define SORTTPL_FIELD3TYPE SCIP_Real 6578#define SORTTPL_FIELD4TYPE int 6579#define SORTTPL_FIELD5TYPE SCIP_Bool 6580#define SORTTPL_BACKWARDS 6585#define SORTTPL_NAMEEXT DownLongPtrPtrInt 6586#define SORTTPL_KEYTYPE SCIP_Longint 6587#define SORTTPL_FIELD1TYPE void* 6588#define SORTTPL_FIELD2TYPE void* 6589#define SORTTPL_FIELD3TYPE int 6590#define SORTTPL_BACKWARDS 6595#define SORTTPL_NAMEEXT DownLongPtrPtrIntInt 6596#define SORTTPL_KEYTYPE SCIP_Longint 6597#define SORTTPL_FIELD1TYPE void* 6598#define SORTTPL_FIELD2TYPE void* 6599#define SORTTPL_FIELD3TYPE int 6600#define SORTTPL_FIELD4TYPE int 6601#define SORTTPL_BACKWARDS 6606#define SORTTPL_NAMEEXT DownLongPtrPtrBoolInt 6607#define SORTTPL_KEYTYPE SCIP_Longint 6608#define SORTTPL_FIELD1TYPE void* 6609#define SORTTPL_FIELD2TYPE void* 6610#define SORTTPL_FIELD3TYPE SCIP_Bool 6611#define SORTTPL_FIELD4TYPE int 6612#define SORTTPL_BACKWARDS 6617#define SORTTPL_NAMEEXT DownPtrIntIntBoolBool 6618#define SORTTPL_KEYTYPE void* 6619#define SORTTPL_FIELD1TYPE int 6620#define SORTTPL_FIELD2TYPE int 6621#define SORTTPL_FIELD3TYPE SCIP_Bool 6622#define SORTTPL_FIELD4TYPE SCIP_Bool 6623#define SORTTPL_PTRCOMP 6624#define SORTTPL_BACKWARDS 6629#define SORTTPL_NAMEEXT DownIntPtrIntIntBoolBool 6630#define SORTTPL_KEYTYPE int 6631#define SORTTPL_FIELD1TYPE void* 6632#define SORTTPL_FIELD2TYPE int 6633#define SORTTPL_FIELD3TYPE int 6634#define SORTTPL_FIELD4TYPE SCIP_Bool 6635#define SORTTPL_FIELD5TYPE SCIP_Bool 6636#define SORTTPL_BACKWARDS 6651assert(activity !=
NULL);
6655(*activity)->var = var;
6656(*activity)->duration = duration;
6657(*activity)->demand = demand;
6667assert(activity !=
NULL);
6668assert(*activity !=
NULL);
6683#undef SCIPactivityGetVar 6684#undef SCIPactivityGetDuration 6685#undef SCIPactivityGetDemand 6686#undef SCIPactivityGetEnergy 6693assert(activity !=
NULL);
6695 returnactivity->
var;
6703assert(activity !=
NULL);
6713assert(activity !=
NULL);
6715 returnactivity->
demand;
6723assert(activity !=
NULL);
6744(*profile)->arraysize = 10;
6749(*profile)->ntimepoints = 1;
6750(*profile)->timepoints[0] = 0;
6751(*profile)->loads[0] = 0;
6752(*profile)->capacity = capacity;
6763assert(profile !=
NULL);
6764assert(capacity > 0);
6776assert(profile !=
NULL);
6779 if( *profile !=
NULL)
6814assert(profile !=
NULL);
6824assert(profile !=
NULL);
6834assert(profile !=
NULL);
6844assert(profile !=
NULL);
6846 returnprofile->
loads;
6855assert(profile !=
NULL);
6856assert(pos >= 0 && pos < profile->ntimepoints);
6867assert(profile !=
NULL);
6868assert(pos >= 0 && pos < profile->ntimepoints);
6870 returnprofile->
loads[pos];
6882assert(profile !=
NULL);
6883assert(timepoint >= 0);
6907 if( neededsize <= profile->arraysize )
6928assert(profile !=
NULL);
6929assert(timepoint >= 0);
6937assert(*pos >= 0 && *pos < profile->ntimepoints);
6938assert(timepoint >= profile->
timepoints[*pos]);
6976assert(profile !=
NULL);
6979assert(left < right);
6980assert(infeasible !=
NULL);
6982(*infeasible) =
FALSE;
6987assert(profile->
timepoints[startpos] == left);
6991assert(profile->
timepoints[endpos] == right);
6993assert(startpos < endpos);
6997 for( i = startpos; i < endpos; ++i )
6999profile->
loads[i] += demand;
7004 SCIPdebugMessage(
"core insertion detected infeasibility (pos %d)\n", i);
7006(*infeasible) =
TRUE;
7010 for( ; i >= startpos; --i )
7011profile->
loads[i] -= demand;
7032assert(profile !=
NULL);
7033assert(left < right);
7034assert(demand >= 0);
7035assert(infeasible !=
NULL);
7037(*infeasible) =
FALSE;
7041 SCIPdebugMessage(
"insert core [%d,%d] with demand %d\n", left, right, demand);
7063assert(left < right);
7075 SCIPdebugMessage(
"delete core [%d,%d] with demand %d\n", left, right, demand);
7078assert(!infeasible);
7094 intremainingduration;
7097assert(profile !=
NULL);
7099assert(pos < profile->ntimepoints);
7100assert(duration > 0);
7104remainingduration = duration;
7106(*infeasible) =
FALSE;
7110(*infeasible) =
TRUE;
7114 while( pos < profile->ntimepoints - 1 )
7118 SCIPdebugMessage(
"profile <%p>: core does not fit at time point %d (pos %d)\n", (
void*)profile, profile->
timepoints[pos], pos);
7120remainingduration = duration;
7122 if( profile->timepoints[startpos] > lst )
7124(*infeasible) =
TRUE;
7131 if( remainingduration <= 0 )
7155assert(profile !=
NULL);
7158assert(duration >= 0);
7159assert(demand >= 0);
7160assert(infeasible !=
NULL);
7164 SCIPdebugMessage(
"profile <%p>: find earliest start time (demad %d, duration %d) [%d,%d]\n", (
void*)profile, demand, duration, est, lst);
7166 if( duration == 0 || demand == 0 )
7168*infeasible =
FALSE;
7173 SCIPdebugMessage(
"profile <%p>: earliest start time does %s exist as time point (pos %d)\n", (
void*)profile, found ?
"":
"not", pos);
7178(*infeasible) =
FALSE;
7188assert(pos < profile->ntimepoints);
7191 else if( profile->
loads[pos] + demand > profile->
capacity)
7199assert(pos < profile->ntimepoints);
7204 intremainingduration;
7208assert(pos < profile->ntimepoints - 1);
7210remainingduration = duration - (profile->
timepoints[pos+1] - est);
7213 if( remainingduration <= 0 )
7214(*infeasible) =
FALSE;
7218 SCIPdebugMessage(
"remaining duration can%s be processed\n", *infeasible ?
"not":
"");
7224assert(pos < profile->ntimepoints);
7244 intremainingduration;
7247assert(profile !=
NULL);
7249assert(pos < profile->ntimepoints);
7250assert(duration > 0);
7255remainingduration = duration;
7257(*infeasible) =
TRUE;
7259 if( profile->
timepoints[endpos] < ect - duration )
7264 if( profile->
loads[pos-1] + demand > profile->
capacity)
7266 SCIPdebugMessage(
"profile <%p>: core does not fit at time point %d (pos %d)\n", (
void*)profile, profile->
timepoints[pos-1], pos-1);
7269remainingduration = duration;
7271 if( profile->timepoints[endpos] < ect - duration )
7277 if( remainingduration <= 0 )
7279*infeasible =
FALSE;
7306assert(profile !=
NULL);
7309assert(duration >= 0);
7310assert(demand >= 0);
7311assert(infeasible !=
NULL);
7315 if( duration == 0 || demand == 0 )
7317*infeasible =
FALSE;
7321ect = est + duration;
7322lct = lst + duration;
7325 SCIPdebugMessage(
"profile <%p>: latest completion time %d does %s exist as time point (pos %d)\n", (
void*)profile, lct, found ?
"":
"not", pos);
7333assert(pos < profile->ntimepoints && pos >= 0);
7336 else if( profile->
loads[pos] + demand > profile->
capacity)
7344assert(pos < profile->ntimepoints && pos >= 0);
7349 intremainingduration;
7354remainingduration = duration - (lct - profile->
timepoints[pos]);
7356 if( remainingduration <= 0 )
7357(*infeasible) =
FALSE;
7366assert(pos < profile->ntimepoints && pos >= 0);
7372 returnlct - duration;
7386assert(digraph !=
NULL);
7387assert(blkmem !=
NULL);
7399(*digraph)->nnodes =
nnodes;
7402(*digraph)->blkmem = blkmem;
7403(*digraph)->ncomponents = 0;
7404(*digraph)->componentstartsize = 0;
7405(*digraph)->components =
NULL;
7406(*digraph)->componentstarts =
NULL;
7409(*digraph)->narticulations = -1;
7410(*digraph)->articulations =
NULL;
7411(*digraph)->articulationscheck =
FALSE;
7423assert(digraph !=
NULL);
7427 if( nnodes <= digraph->
nnodes)
7469assert(sourcedigraph !=
NULL);
7470assert(targetdigraph !=
NULL);
7473 if( targetblkmem ==
NULL)
7474targetblkmem = sourcedigraph->
blkmem;
7476assert(targetblkmem !=
NULL);
7483(*targetdigraph)->nnodes =
nnodes;
7484(*targetdigraph)->ncomponents = ncomponents;
7485(*targetdigraph)->blkmem = targetblkmem;
7493 for( i = 0; i <
nnodes; ++i )
7506(*targetdigraph)->nodedata[i] = sourcedigraph->
nodedata[i];
7514 if( ncomponents > 0 )
7520(*targetdigraph)->componentstartsize = ncomponents + 1;
7524(*targetdigraph)->components =
NULL;
7525(*targetdigraph)->componentstarts =
NULL;
7526(*targetdigraph)->componentstartsize = 0;
7530 if( articulationscheck )
7533(*targetdigraph)->narticulations = sourcedigraph->
narticulations;
7534(*targetdigraph)->articulationscheck =
TRUE;
7538(*targetdigraph)->narticulations = -1;
7539(*targetdigraph)->articulations =
NULL;
7540(*targetdigraph)->articulationscheck =
FALSE;
7555assert(digraph !=
NULL);
7556assert(digraph->
nnodes> 0);
7557blkmem = digraph->
blkmem;
7559 for( i = 0; i < digraph->
nnodes; ++i )
7579assert(digraph !=
NULL);
7580assert(*digraph !=
NULL);
7581assert((*digraph)->blkmem !=
NULL);
7583blkmem = (*digraph)->blkmem;
7584digraphptr = *digraph;
7587 for( i = digraphptr->
nnodes- 1; i >= 0; --i )
7614#define STARTSUCCESSORSSIZE 5 7626assert(digraph !=
NULL);
7629assert(idx < digraph->
nnodes);
7630assert(newsize > 0);
7634blkmem = digraph->
blkmem;
7656assert(newsize <= digraph->successorssize[idx]);
7672assert(digraph !=
NULL);
7673assert(startnode >= 0);
7674assert(endnode >= 0);
7675assert(startnode < digraph->
nnodes);
7676assert(endnode < digraph->
nnodes);
7706assert(digraph !=
NULL);
7707assert(startnode >= 0);
7708assert(endnode >= 0);
7709assert(startnode < digraph->
nnodes);
7710assert(endnode < digraph->
nnodes);
7715 for( i = 0; i < nsuccessors; ++i )
7716 if( digraph->
successors[startnode][i] == endnode )
7722digraph->
successors[startnode][nsuccessors] = endnode;
7723digraph->
arcdata[startnode][nsuccessors] = data;
7739assert(digraph !=
NULL);
7741assert(node < digraph->
nnodes);
7753assert(digraph !=
NULL);
7755 returndigraph->
nnodes;
7764assert(digraph !=
NULL);
7766assert(node < digraph->
nnodes);
7781assert(digraph !=
NULL);
7783assert(node < digraph->
nnodes);
7785digraph->
nodedata[node] = dataptr;
7796assert(digraph !=
NULL);
7800 for( i = 0; i < digraph->
nnodes; ++i )
7812assert(digraph !=
NULL);
7814assert(node < digraph->
nnodes);
7827assert(digraph !=
NULL);
7829assert(node < digraph->
nnodes);
7845assert(digraph !=
NULL);
7847assert(node < digraph->
nnodes);
7852 returndigraph->
arcdata[node];
7863 int* stackadjvisited,
7871assert(digraph !=
NULL);
7872assert(startnode >= 0);
7873assert(startnode < digraph->
nnodes);
7874assert(visited !=
NULL);
7875assert(visited[startnode] ==
FALSE);
7876assert(dfsstack !=
NULL);
7877assert(dfsnodes !=
NULL);
7878assert(ndfsnodes !=
NULL);
7881dfsstack[0] = startnode;
7882stackadjvisited[0] = 0;
7885 while( stackidx >= 0 )
7891currnode = dfsstack[stackidx];
7893sadv = stackadjvisited[stackidx];
7894assert( 0 <= sadv && sadv <= digraph->nsuccessors[currnode] );
7897assert( visited[currnode] == (sadv > 0) );
7898visited[currnode] =
TRUE;
7901 while( sadv < digraph->nsuccessors[currnode] && visited[digraph->
successors[currnode][sadv]] )
7910dfsnodes[(*ndfsnodes)++] = currnode;
7915assert( ! visited[digraph->
successors[currnode][sadv]] );
7918stackadjvisited[stackidx] = sadv + 1;
7922dfsstack[stackidx] = digraph->
successors[currnode][sadv];
7923stackadjvisited[stackidx] = 0;
7924assert( stackidx < digraph->
nnodes);
7953assert(digraph !=
NULL);
7954assert(startnode >= 0);
7955assert(startnode < digraph->
nnodes);
7956assert(visited !=
NULL);
7957assert(visited[startnode] ==
FALSE);
7958assert(tdisc !=
NULL);
7959assert(mindisc !=
NULL);
7960assert(parent !=
NULL);
7961assert(articulationflag !=
NULL);
7966visited[startnode] =
TRUE;
7967tdisc[startnode] = time + 1;
7968mindisc[startnode] = time + 1;
7971 for( n = 0; n < nsucc; ++n)
7973 if( !visited[succnodes[n]] )
7975parent[succnodes[n]] = startnode;
7979mindisc[startnode] =
MIN(mindisc[startnode], mindisc[succnodes[n]]);
7982 if( parent[startnode] == -1 && nchildren > 1 )
7983articulationflag[startnode] =
TRUE;
7986 if( parent[startnode] > -1 && mindisc[succnodes[n]] >= tdisc[startnode] )
7987articulationflag[startnode] =
TRUE;
7991 if( parent[startnode] != succnodes[n] )
7992mindisc[startnode] =
MIN(mindisc[startnode], tdisc[succnodes[n]]);
7996 if( articulationflag[startnode] )
8005 int** articulations,
8006 int* narticulations
8013 int* tdisc =
NULL;
8014 int* mindisc =
NULL;
8015 int* parent =
NULL;
8017 intarticulationidx = 0;
8020assert(digraph !=
NULL);
8021assert(digraph->
nnodes> 0);
8033blkmem = digraph->
blkmem;
8041 for( n = 0; n < digraph->
nnodes; ++n )
8043visited[n] =
FALSE;
8045articulationflag[n] =
FALSE;
8049 for( n = 0; n < digraph->
nnodes; ++n )
8058 for( n = 0; n < digraph->
nnodes; ++n )
8060 if( articulationflag[n] )
8068 if( articulations !=
NULL)
8070 if( narticulations !=
NULL)
8105 int* ndirectedsuccessors;
8106 int* stackadjvisited;
8116assert(digraph !=
NULL);
8117assert(digraph->
nnodes> 0);
8120blkmem = digraph->
blkmem;
8147 for( i = digraph->
nnodes- 1; i >= 0; --i )
8149 for( j = 0; j < ndirectedsuccessors[i]; ++j )
8155 for( v = 0; v < digraph->
nnodes; ++v )
8163&digraph->
components[compstart], &ndfsnodes);
8166 if( ndfsnodes >= minsize )
8184 if( components !=
NULL)
8199 if( ncomponents !=
NULL)
8229 int* stackadjvisited =
NULL;
8230 int* dfsstack =
NULL;
8231 int* dfsnodes =
NULL;
8240assert(digraph !=
NULL);
8252 for( i = 0; i < ncomps; ++i )
8254endidx = compstarts[i+1] - 1;
8256 for( j = compstarts[i]; j < compstarts[i+1]; ++j )
8258 if( visited[comps[j]] )
8265 depthFirstSearch(digraph, comps[j], visited, dfsstack, stackadjvisited, dfsnodes, &ndfsnodes);
8267assert(endidx - ndfsnodes == compstarts[i] - 1);
8272 for( k = 0; k < ndfsnodes; ++k )
8274digraph->
components[endidx - k] = dfsnodes[k];
8292assert(digraph !=
NULL);
8309assert(digraph !=
NULL);
8310assert(compidx >= 0);
8311assert(compidx < digraph->ncomponents);
8314 if( nodes !=
NULL)
8334 int* strongcomponents,
8337 int* nstrongcomponents,
8338 int* strongcompstartidx,
8344assert(digraph !=
NULL);
8346assert(v < digraph->
nnodes);
8347assert(lowlink !=
NULL);
8348assert(dfsidx !=
NULL);
8349assert(stack !=
NULL);
8350assert(stacksize !=
NULL);
8351assert(*stacksize >= 0);
8352assert(*stacksize < digraph->
nnodes);
8353assert(unprocessed !=
NULL);
8354assert(nodeinstack !=
NULL);
8355assert(maxdfs !=
NULL);
8356assert(strongcomponents !=
NULL);
8357assert(nstrongcomponents !=
NULL);
8358assert(strongcompstartidx !=
NULL);
8359assert(nstorednodes !=
NULL);
8360assert(*nstorednodes >= 0 && *nstorednodes < digraph->
nnodes);
8362dfsidx[v] = *maxdfs;
8363lowlink[v] = *maxdfs;
8367stack[*stacksize] = v;
8369nodeinstack[v] =
TRUE;
8372unprocessed[v] =
FALSE;
8381 if( unprocessed[
w] )
8383 tarjan(digraph,
w, lowlink, dfsidx, stack, stacksize, unprocessed, nodeinstack, maxdfs, strongcomponents,
8384nstrongcomponents, strongcompstartidx, nstorednodes);
8386assert(lowlink[v] >= 0 && lowlink[v] < digraph->
nnodes);
8387assert(lowlink[
w] >= 0 && lowlink[
w] < digraph->
nnodes);
8390lowlink[v] =
MIN(lowlink[v], lowlink[
w]);
8392 else if( nodeinstack[
w] )
8394assert(lowlink[v] >= 0 && lowlink[v] < digraph->
nnodes);
8395assert(dfsidx[
w] >= 0 && dfsidx[
w] < digraph->
nnodes);
8398lowlink[v] =
MIN(lowlink[v], dfsidx[
w]);
8403 if( lowlink[v] == dfsidx[v] )
8407strongcompstartidx[*nstrongcomponents] = *nstorednodes;
8408*nstrongcomponents += 1;
8412assert(*stacksize > 0);
8415 w= stack[*stacksize - 1];
8417nodeinstack[
w] =
FALSE;
8420strongcomponents[*nstorednodes] =
w;
8436 int* strongcomponents,
8438 int* strongcompstartidx,
8440 int* nstrongcomponents
8444 int* lowlink =
NULL;
8445 int* dfsidx =
NULL;
8446 int* stack =
NULL;
8455assert(digraph !=
NULL);
8456assert(compidx >= 0);
8457assert(compidx < digraph->ncomponents);
8458assert(strongcomponents !=
NULL);
8459assert(strongcompstartidx !=
NULL);
8460assert(nstrongcomponents !=
NULL);
8470 for( i = 0; i < digraph->
nnodes; ++i )
8475unprocessed[i] =
TRUE;
8476nodeinstack[i] =
FALSE;
8482*nstrongcomponents = 0;
8485 for( i = digraph->
componentstarts[compidx]; i < digraph->componentstarts[compidx + 1]; ++i )
8490assert(v >= 0 && v < digraph->
nnodes);
8493 if( unprocessed[v] )
8496 tarjan(digraph, v, lowlink, dfsidx, stack, &stacksize, unprocessed, nodeinstack, &maxdfs,
8497strongcomponents, nstrongcomponents, strongcompstartidx, &nstorednodes);
8505assert(*nstrongcomponents < digraph->
nnodes+ 1);
8506strongcompstartidx[*nstrongcomponents] = nstorednodes;
8527assert(digraph !=
NULL);
8530blkmem = digraph->
blkmem;
8561 for( n = 0; n < digraph->
nnodes; ++n )
8572 for( m = 0; m < nsuccessors ; ++m )
8599 for( n = 0; n < digraph->
nnodes; ++n )
8608 for( n = 0; n < digraph->
nnodes; ++n )
8617 for( m = 0; m < nsuccessors; ++m )
8643 for( i = start; i < end; ++i )
8671(*node)->parent =
NULL;
8672(*node)->left =
NULL;
8673(*node)->right =
NULL;
8674(*node)->dataptr =
NULL;
8686assert(tree !=
NULL);
8687assert(node !=
NULL);
8691assert((*node)->parent ==
NULL);
8692assert((*node)->left ==
NULL);
8693assert((*node)->right ==
NULL);
8696(*node)->dataptr = dataptr;
8708assert(tree !=
NULL);
8709assert(node !=
NULL);
8710assert(*node !=
NULL);
8712assert((*node)->left ==
NULL);
8713assert((*node)->right ==
NULL);
8715#ifdef SCIP_DISABLED_CODE 8717 if( (*node)->parent !=
NULL)
8719assert(*node !=
NULL);
8721assert((*node)->parent->left == *node || ((*node)->parent->right == *node));
8723 if( (*node)->parent->left == *node )
8725(*node)->parent->left =
NULL;
8729assert((*node)->parent->right == *node);
8730(*node)->parent->right =
NULL;
8735assert(*node !=
NULL);
8737assert(*node ==
NULL);
8749assert(tree !=
NULL);
8750assert(node !=
NULL);
8751assert(*node !=
NULL);
8753 if( (*node)->left !=
NULL)
8756assert((*node)->left ==
NULL);
8759 if( (*node)->right !=
NULL)
8762assert((*node)->right ==
NULL);
8766assert(*node ==
NULL);
8777#undef SCIPbtnodeGetData 8778#undef SCIPbtnodeGetKey 8779#undef SCIPbtnodeGetParent 8780#undef SCIPbtnodeGetLeftchild 8781#undef SCIPbtnodeGetRightchild 8782#undef SCIPbtnodeGetSibling 8783#undef SCIPbtnodeIsRoot 8784#undef SCIPbtnodeIsLeaf 8785#undef SCIPbtnodeIsLeftchild 8786#undef SCIPbtnodeIsRightchild 8793assert(node !=
NULL);
8803assert(node !=
NULL);
8813assert(node !=
NULL);
8815 returnnode->
left;
8823assert(node !=
NULL);
8825 returnnode->
right;
8837 if( parent ==
NULL)
8853assert(node !=
NULL);
8863assert(node !=
NULL);
8913assert(node !=
NULL);
8927assert(node !=
NULL);
8941assert(node !=
NULL);
8955assert(node !=
NULL);
8957node->
right= right;
8966assert(tree !=
NULL);
8967assert(blkmem !=
NULL);
8970(*tree)->blkmem = blkmem;
8971(*tree)->root =
NULL;
8984assert(tree !=
NULL);
8986 if( (*tree)->root !=
NULL)
9006assert(node !=
NULL);
9023 if( right !=
NULL)
9046assert(root !=
NULL);
9066assert(tree !=
NULL);
9076assert(tree !=
NULL);
9078 returntree->
root;
9090assert(tree !=
NULL);
9116onepluseps = one +
eps;
9118 while( onepluseps > one );
9136 while( !(val1 & 1) )
9150 while( !(val1 & 1) )
9158 while( !(val2 & 1) )
9171 while( !(val1 & 1) )
9174 else if( val1 < val2 )
9179 while( !(val2 & 1) )
9185 while( val1 != val2 )
9196 if( ((val1 ^ val2) & 2) == 2 )
9201assert((val1 & 3) == 0);
9205 while( !(val1 & 1) )
9217 if( ((val2 ^ val1) & 2) == 2 )
9222assert((val2 & 3) == 0);
9226 while( !(val2 & 1) )
9236#if defined(_MSC_VER) && !defined(NO_NEXTAFTER) 9237#define nextafter(x,y) _nextafter(x,y) 9254#define __HI(x) *(1+(int*)&x) 9255#define __LO(x) *(int*)&x 9256#define __HIp(x) *(1+(int*)x) 9257#define __LOp(x) *(int*)x 9260doublenextafter(
double x,
double y)
9280 if( ((ix>=0x7ff00000) && ((ix-0x7ff00000)|lx) != 0 ) ||
9281( (iy>=0x7ff00000) && ((iy-0x7ff00000)|ly) != 0 ))
9293__HI(
x) = hy&0x80000000;
9306 if( hx > hy || ((hx == hy) && (lx > ly)) )
9323 if( hy >= 0 || hx > hy || ((hx == hy) && (lx > ly)) )
9340 if( hy >= 0x7ff00000 )
9342 if( hy < 0x00100000 )
9372 returnnextafter(from, to);
9388 returnval1/gcd * val2;
9391static 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,
939217.0, 18.0, 19.0, 25.0, -1.0};
9419assert(mindelta <= 0.0);
9420assert(maxdelta >= 0.0);
9421assert(numerator !=
NULL);
9422assert(denominator !=
NULL);
9439 while( dnom <= maxdnom )
9441nom = floor(val * dnom);
9443ratval1 = (nom+1.0)/dnom;
9444 if( mindelta <= val - ratval0 && val - ratval1 <= maxdelta )
9446 if( val - ratval0 <= maxdelta )
9452 if( mindelta <= val - ratval1 )
9464epsilon =
MIN(-mindelta, maxdelta)/2.0;
9472delta0 = val - g0/h0;
9473delta1 = (delta0 < 0.0 ? val - (g0-1.0)/h0 : val - (g0+1.0)/h0);
9475 while( (delta0 < mindelta || delta0 > maxdelta) && (delta1 < mindelta || delta1 > maxdelta) )
9477assert(
EPSGT(
b,
a, epsilon));
9481 b= 1.0 / (
b-
a);
9497delta0 = val - g0/h0;
9498delta1 = (delta0 < 0.0 ? val - (g0-1.0)/h0 : val - (g0+1.0)/h0);
9506 if( delta0 < mindelta )
9508assert(mindelta <= delta1 && delta1 <= maxdelta);
9512 else if( delta0 > maxdelta )
9514assert(mindelta <= delta1 && delta1 <= maxdelta);
9523assert(*denominator >= 1);
9543assert(mindelta <= 0.0);
9544assert(maxdelta >= 0.0);
9546sval = val * scalar;
9547downval = floor(sval);
9586assert(vals !=
NULL);
9588assert(maxdnom >= 1);
9589assert(mindelta < 0.0);
9590assert(maxdelta > 0.0);
9591assert(success !=
NULL);
9593 SCIPdebugMessage(
"trying to find rational representation for given values\n");
9595 if( intscalar !=
NULL)
9601 for( c = 0; c < nvals; ++c )
9604 if( val < mindelta || val > maxdelta )
9607minval =
MIN(minval, absval);
9614 if( intscalar !=
NULL)
9621assert(minval >
MIN(-mindelta, maxdelta));
9625 for( i = 0; i < 2; ++i )
9631scaleval = 1.0/minval;
9636 for( c = 0; c < nvals && scalable; ++c )
9644 while( scaleval <= maxscale
9645&& (absval * scaleval < 0.5 || !
isIntegralScalar(val, scaleval, mindelta, maxdelta)) )
9658scalable = (scaleval <= maxscale);
9659 SCIPdebugMessage(
" -> val=%g, scaleval=%g, val*scaleval=%g, scalable=%u\n",
9660val, scaleval, val*scaleval, scalable);
9665assert(scaleval <= maxscale);
9668 if( scaleval < bestscalar )
9669bestscalar = scaleval;
9671 SCIPdebugMessage(
" -> integrality could be achieved by scaling with %g\n", scaleval);
9676 if( intscalar !=
NULL)
9677*intscalar = bestscalar;
9693 for( c = 0; c < nvals && rational; ++c )
9699rational =
SCIPrealToRational(val, mindelta, maxdelta, maxdnom, &numerator, &denominator);
9700 if( rational && numerator != 0 )
9702assert(denominator > 0);
9703gcd =
ABS(numerator);
9707c, val, numerator, denominator, gcd, scm, rational);
9713 for( ++c; c < nvals && rational; ++c )
9719rational =
SCIPrealToRational(val, mindelta, maxdelta, maxdnom, &numerator, &denominator);
9720 if( rational && numerator != 0 )
9722assert(denominator > 0);
9727c, val, numerator, denominator, gcd, scm, rational);
9731 SCIPdebugMessage(
" -> failed to convert %g into a rational representation\n", val);
9750 if( intscalar !=
NULL)
9751*intscalar = bestscalar;
9754 SCIPdebugMessage(
" -> smallest value to achieve integrality is %g \n", bestscalar);
9764#if defined(__INTEL_COMPILER) || defined(_MSC_VER) 9765#pragma fenv_access (on) 9766#elif defined(__GNUC__) && !defined(__clang__) 9767#pragma STDC FENV_ACCESS ON 9769#if defined(__GNUC__) && !defined(__INTEL_COMPILER) 9770#if defined(__clang__) 9771__attribute__((optnone))
9793center = 0.5*(lb+ub);
9805delta = 0.5*(ub-lb);
9811delta = 0.5*(ub-lb);
9817#if defined(__INTEL_COMPILER) || defined(_MSC_VER) 9818#pragma fenv_access (off) 9819#elif defined(__GNUC__) && !defined(__clang__) 9820#pragma STDC FENV_ACCESS OFF 9850 if( val - lb < 0.0 || val - ub > 0.0 )
9852 SCIPdebugPrintf(
" value is out of interval bounds by %g -> failed\n",
MAX(lb-val, val-ub));
9881assert(function !=
NULL);
9882assert(derivative !=
NULL);
9883assert(params !=
NULL|| nparams == 0);
9888 while( iteration < k )
9890 SCIP_Realderiv = derivative(result, params, nparams);
9896result = result - function(result, params, nparams) / deriv;
9899 if(
REALABS(function(result, params, nparams)) <=
eps)
9905 if( k == iteration )
9916#if defined(NO_RAND_R) || defined(_WIN32) || defined(_WIN64) 9918#define SCIP_RAND_MAX 32767 9922 unsigned int* seedp
9927assert(seedp !=
NULL);
9929nextseed = (*seedp) * (
SCIP_Longint)1103515245 + 12345;
9930*seedp = (
unsignedint)nextseed;
9937#define SCIP_RAND_MAX RAND_MAX 9942 unsigned int* seedp
9945 returnrand_r(seedp);
9955 unsigned int* seedp
9961assert(randnumber >= 0.0);
9962assert(randnumber < 1.0);
9967 return(
int) (minrandval*(1.0 - randnumber) + maxrandval*randnumber + randnumber);
9975 unsigned int* seedp
9981assert(randnumber >= 0.0);
9982assert(randnumber <= 1.0);
9987 returnminrandval*(1.0 - randnumber) + maxrandval*randnumber;
9997 unsigned int* seedp
10010 unsigned int* seedp
10018#define DEFAULT_SEED UINT32_C(123456789) 10019#define DEFAULT_XOR UINT32_C(362436000) 10020#define DEFAULT_MWC UINT32_C(521288629) 10021#define DEFAULT_CST UINT32_C(7654321) 10027 unsigned intinitseed
10030assert(randnumgen !=
NULL);
10038assert(randnumgen->
seed> 0);
10039assert(randnumgen->
xor_seed> 0);
10040assert(randnumgen->
mwc_seed> 0);
10063randnumgen->
seed= (uint32_t) (randnumgen->
seed* UINT64_C(1103515245) + UINT64_C(12345));
10072randnumgen->
cst_seed= (uint32_t) (t >> 32);
10073randnumgen->
mwc_seed= (uint32_t) t;
10082 unsigned intinitialseed
10085assert(randnumgen !=
NULL);
10100assert(randnumgen !=
NULL);
10101assert((*randnumgen) !=
NULL);
10121assert(randnumber >= 0.0);
10122assert(randnumber < 1.0);
10142assert(randnumber >= 0.0);
10143assert(randnumber <= 1.0);
10148 returnminrandval*(1.0 - randnumber) + maxrandval*randnumber;
10167 while( end > begin+1 )
10176array[i] = array[end];
10197 while( end > begin+1 )
10206array[i] = array[end];
10226 if( nelems == nsubelems)
10233 if( nsubelems > nelems )
10235 SCIPerrorMessage(
"Cannot create %d-elementary subset of %d-elementary set.\n", nsubelems, nelems);
10239 for( i = 0; i < nsubelems; i++ )
10240 for( j = 0; j < i; j++ )
10241assert(
set[i] !=
set[j]);
10246 while( i < nsubelems )
10251subset[i] =
set[
r];
10254 for( j = 0; j < i; j++ )
10256 if( subset[i] == subset[j] )
10280 if( m == 0 || m >= n )
10304 if( m > 16 || n > 33 )
10309 return(n*(n-1)*(n-2)/6);
103181166803110, 601080390, 1037158320, 565722720, 300540195, 155117520, 818809200, 471435600, 265182525, 145422675,
1031977558760, 40116600, 573166440, 347373600, 206253075, 119759850, 67863915, 37442160, 20058300, 10400600,
10320354817320, 225792840, 141120525, 86493225, 51895935, 30421755, 17383860, 9657700, 5200300, 2704156, 193536720,
10321129024480, 84672315, 54627300, 34597290, 21474180, 13037895, 7726160, 4457400, 2496144, 1352078, 705432,
1032292561040, 64512240, 44352165, 30045015, 20030010, 13123110, 8436285, 5311735, 3268760, 1961256, 1144066,
10323646646, 352716, 184756, 38567100, 28048800, 20160075, 14307150, 10015005, 6906900, 4686825, 3124550, 2042975,
103241307504, 817190, 497420, 293930, 167960, 92378, 48620, 13884156, 10518300, 7888725, 5852925, 4292145, 3108105,
103252220075, 1562275, 1081575, 735471, 490314, 319770, 203490, 125970, 75582, 43758, 24310, 12870, 4272048, 3365856,
103262629575, 2035800, 1560780, 1184040, 888030, 657800, 480700, 346104, 245157, 170544, 116280, 77520, 50388, 31824,
1032719448, 11440, 6435, 3432, 1107568, 906192, 736281, 593775, 475020, 376740, 296010, 230230, 177100, 134596,
10328100947, 74613, 54264, 38760, 27132, 18564, 12376, 8008, 5005, 3003, 1716, 924, 237336, 201376, 169911, 142506,
10329118755, 98280, 80730, 65780, 53130, 42504, 33649, 26334, 20349, 15504, 11628, 8568, 6188, 4368, 3003, 2002,
103301287, 792, 462, 252, 40920, 35960, 31465, 27405, 23751, 20475, 17550, 14950, 12650, 10626, 8855, 7315, 5985,
103314845, 3876, 3060, 2380, 1820, 1365, 1001, 715, 495, 330, 210, 126, 70};
10334 const intt = 16-m;
10339assert(t*(t+1)+(33-n) < 182);
10341 returnbinoms[t*(t+1)+(33-n)];
10347#if defined(__GNUC__) && __GNUC__ * 100 + __GNUC_MINOR__ * 10 >= 490 && !defined(__INTEL_COMPILER) 10348__attribute__((no_sanitize_undefined))
10355 return((
unsigned long long)(v * 2654435769)) % UINT_MAX;
10356 return((
unsigned long long)(-v * 683565275)) % UINT_MAX;
10407*pointer1 = *pointer2;
10423 unsigned int* randseed
10430 while( end > begin+1 )
10439array[i] = array[end];
10457 unsigned int* randseed
10464 while( end > begin+1 )
10473array[i] = array[end];
10488 unsigned intrandseed
10495 if( nelems == nsubelems)
10502 if( nsubelems > nelems )
10504 SCIPerrorMessage(
"Cannot create %d-elementary subset of %d-elementary set.\n", nsubelems, nelems);
10508 for( i = 0; i < nsubelems; i++ )
10509 for( j = 0; j < i; j++ )
10510assert(
set[i] !=
set[j]);
10515 while( i < nsubelems )
10520subset[i] =
set[
r];
10523 for( j = 0; j < i; j++ )
10525 if( subset[i] == subset[j] )
10550 int* intersectarray,
10552 int* nintersectarray
10567 int* intersectarray,
10569 int* nintersectarray
10578assert( array1 !=
NULL);
10579assert( array2 !=
NULL);
10580assert( intersectarray !=
NULL);
10581assert( nintersectarray !=
NULL);
10584 for(v1 = 0; v1 < narray1; ++v1)
10586assert( v1 == 0 || array1[v1] >= array1[v1-1] );
10589 if( v1+1 < narray1 && array1[v1] == array1[v1+1])
10592 for(v2 = k; v2 < narray2; ++v2)
10594assert( v2 == 0 || array2[v2] >= array2[v2-1] );
10596 if( array2[v2] > array1[v1] )
10601 else if( array2[v2] == array1[v1] )
10603intersectarray[cnt++] = array2[v2];
10611*nintersectarray = cnt;
10621 void** intersectarray,
10623 int* nintersectarray
10632assert( array1 !=
NULL);
10633assert( array2 !=
NULL);
10634assert( ptrcomp !=
NULL);
10635assert( intersectarray !=
NULL);
10636assert( nintersectarray !=
NULL);
10639 for( v1 = 0; v1 < narray1; ++v1 )
10641assert( v1 == 0 || (*ptrcomp)(array1[v1], array1[v1-1]) >= 0 );
10644 if( v1+1 < narray1 && array1[v1] == array1[v1+1] )
10647 for( v2 = k; v2 < narray2; ++v2 )
10649assert( v2 == 0 || (*ptrcomp)(array2[v2], array2[v2-1]) > 0 || array2[v2] == array2[v2-1] );
10651 if( (*ptrcomp)(array2[v2], array1[v1]) > 0 )
10657 if( array2[v2] == array1[v1] )
10659intersectarray[cnt++] = array2[v2];
10667*nintersectarray = cnt;
10680 int* setminusarray,
10682 int* nsetminusarray
10697 int* setminusarray,
10699 int* nsetminusarray
10707assert( array1 !=
NULL);
10708assert( array2 !=
NULL);
10709assert( setminusarray !=
NULL);
10710assert( nsetminusarray !=
NULL);
10712 while( v1 < narray1 )
10716assert( v1 == 0 || array1[v1] >= array1[v1-1] );
10719 while( v1 + 1 < narray1 && array1[v1] == array1[v1 + 1] )
10722entry1 = array1[v1];
10724 while( v2 < narray2 && array2[v2] < entry1 )
10727 if( v2 >= narray2 || entry1 < array2[v2] )
10728setminusarray[cnt++] = entry1;
10733*nsetminusarray = cnt;
10754 if( dest ==
NULL|| src ==
NULL|| cnt == 0 )
10758 char* destination = dest;
10760 while( cnt-- && (*destination++ = *src++) != stop );
10762 return(
int)(destination - dest);
10773 const char* message
10776#ifdef NO_STRERROR_R 10781#if defined(_WIN32) || defined(_WIN64) 10786#elif (_POSIX_C_SOURCE >= 200112L || __DARWIN_C_LEVEL > 200112L || _XOPEN_SOURCE >= 600) && ! defined(_GNU_SOURCE) 10801 if( *buf !=
'\0')
10806 else if( errordescr !=
NULL)
10823 const char* delim,
10827#ifdef SCIP_NO_STRTOK_R 10828 returnstrtok(s, delim);
10830 returnstrtok_r(s, delim, ptrptr);
10845assert(t !=
NULL);
10846assert(bufsize > 0);
10848len = (int)strlen(s);
10849 for( p = 0, i = 0; i <= len && p < bufsize; ++i, ++p )
10851 if( s[i] ==
'\\')
10857 else if( s[i] ==
' '|| s[i] ==
'\"'|| s[i] ==
'\'')
10862 if( i <= len && p < bufsize )
10865t[bufsize-1] =
'\0';
10873 while( isspace(**s) || ( **s ==
'\\'&& *(*s+1) !=
'\0'&& strchr(
SCIP_SPACECONTROL, *(*s+1)) ) )
10874*s += **s ==
'\\'? 2 : 1;
10890assert(t !=
NULL);
10895#if defined(_MSC_VER) && _MSC_VER < 1900 10896n = _vsnprintf(t, (
size_t) len, s, ap);
10898n = vsnprintf(t, (
size_t) len, s, ap);
10902 if( n < 0 || n >= len )
10922 return_stricmp(s1, s2);
10924 returnstrcasecmp(s1, s2);
10935assert(length >= 0);
10937 return_strnicmp(s1, s2, (
size_t)length);
10939 returnstrncasecmp(s1, s2, (
size_t)length);
10963 for( n = 0; n < size && *s !=
'\0'; n++ )
10983assert(str !=
NULL);
10984assert(value !=
NULL);
10985assert(endptr !=
NULL);
10990*value = (int) strtol(str, endptr, 10);
10992 if( *endptr != str && *endptr !=
NULL)
10997*endptr = (
char*)str;
11014assert(str !=
NULL);
11015assert(value !=
NULL);
11016assert(endptr !=
NULL);
11021*value = strtod(str, endptr);
11023 if( *endptr != str && *endptr !=
NULL)
11028*endptr = (
char*)str;
11047 const char* copystr;
11050assert(str !=
NULL);
11051assert(token !=
NULL);
11053assert(endptr !=
NULL);
11060 while( *str !=
'\0'&& *str != startchar )
11064 if( *str ==
'\0')
11066*endptr = (
char*)copystr;
11074 while( *str !=
'\0'&& *str != endchar && nchars < size-1 )
11077token[nchars] = *str;
11083token[nchars] =
'\0';
11086 if( nchars == (size-1) )
11087 while( *str !=
'\0'&& *str != endchar )
11091 if( *str ==
'\0')
11093*endptr = (
char*)copystr;
11102*endptr = (
char*) str;
11111 const char* filename
11116f = fopen(filename,
"r");
11131 char** compression
11135 char* lastbackslash;
11138assert(filename !=
NULL);
11140 if( path !=
NULL)
11142 if( name !=
NULL)
11144 if( extension !=
NULL)
11145*extension =
NULL;
11146 if( compression !=
NULL)
11147*compression =
NULL;
11150lastslash = strrchr(filename,
'/');
11151lastbackslash = strrchr(filename,
'\\');
11152lastslash =
MAX(lastslash, lastbackslash);
11153lastdot = strrchr(filename,
'.');
11154 if( lastslash !=
NULL&& lastdot !=
NULL&& lastdot < lastslash )
11158#ifdef SCIP_WITH_ZLIB 11159 if( lastdot !=
NULL)
11163compext = lastdot+1;
11164 if( strcmp(compext,
"gz") == 0
11165|| strcmp(compext,
"z") == 0
11166|| strcmp(compext,
"Z") == 0 )
11168 if( compression !=
NULL)
11169*compression = compext;
11174lastdot = strrchr(filename,
'.');
11175 if( lastslash !=
NULL&& lastdot !=
NULL&& lastdot < lastslash )
11180 if( lastslash ==
NULL)
11182 if( name !=
NULL)
11187 if( path !=
NULL)
11189 if( name !=
NULL)
11190*name = lastslash+1;
11191*lastslash =
'\0';
11194 if( lastdot !=
NULL)
11196 if( extension !=
NULL)
11197*extension = lastdot+1;
11226quot =
MAX3(1.0, absval1, absval2);
11228 return(val1-val2)/quot;
11240 if(
EPSEQ(primalbound, dualbound,
eps) )
11247 if(
EPSZ(dualbound,
eps) ||
EPSZ(primalbound,
eps) || absprimal >= inf || absdual >= inf ||
11248primalbound * dualbound < 0.0 )
11251 return REALABS((primalbound - dualbound)/
MIN(absdual, absprimal));
11266assert(djset !=
NULL);
11267assert(blkmem !=
NULL);
11270assert(ncomponents > 0);
11274(*djset)->size = ncomponents;
11295djset->
sizes[i] = 1;
11306 introot = element;
11307 int* parents = djset->
parents;
11310 while( root != parents[root] )
11312root = parents[root];
11316 while( element != root )
11318newelement = parents[element];
11319parents[element] = root;
11320element = newelement;
11339assert(djset !=
NULL);
11342assert(djset->
size> p);
11343assert(djset->
size> q);
11352sizes = djset->
sizes;
11357parents[idq] = idp;
11358sizes[idp] += sizes[idq];
11362 if( sizes[idp] < sizes[idq] )
11364parents[idp] = idq;
11365sizes[idq] += sizes[idp];
11369parents[idq] = idp;
11370sizes[idp] += sizes[idq];
11385assert(djset !=
NULL);
11386assert(*djset !=
NULL);
11401assert(djset !=
NULL);
11411assert(djset !=
NULL);
11413 returndjset->
size;
11425assert(s !=
NULL);
11426assert(t !=
NULL);
11429 while( idxctr <
SCIP_MAXSTRLEN&& isspace((
unsigned char)s[idxctr]) )
11431 if( strncmp(&s[idxctr], t, tlen) == 0 )
common defines and data types used in all packages of SCIP
#define SCIP_SPACECONTROL
#define SCIP_DEFAULT_EPSILON
#define SCIP_ALLOC_TERMINATE(retcode, x, TERM)
#define SCIP_CALL_ABORT(x)
#define SCIP_CALL_TERMINATE(retcode, x, TERM)
#define SCIP_LONGINT_FORMAT
#define SCIP_CALL_FINALLY(x, y)
void SCIPcomputeArraysIntersectionPtr(void **array1, int narray1, void **array2, int narray2, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), void **intersectarray, int *nintersectarray)
void SCIPcomputeArraysSetminusInt(int *array1, int narray1, int *array2, int narray2, int *setminusarray, int *nsetminusarray)
SCIP_RETCODE SCIPcomputeArraysIntersection(int *array1, int narray1, int *array2, int narray2, int *intersectarray, int *nintersectarray)
SCIP_RETCODE SCIPcomputeArraysSetminus(int *array1, int narray1, int *array2, int narray2, int *setminusarray, int *nsetminusarray)
void SCIPcomputeArraysIntersectionInt(int *array1, int narray1, int *array2, int narray2, int *intersectarray, int *nintersectarray)
void SCIPbtnodeSetRightchild(SCIP_BTNODE *node, SCIP_BTNODE *right)
SCIP_BTNODE * SCIPbtnodeGetRightchild(SCIP_BTNODE *node)
SCIP_Bool SCIPbtIsEmpty(SCIP_BT *tree)
SCIP_RETCODE SCIPbtCreate(SCIP_BT **tree, BMS_BLKMEM *blkmem)
void SCIPbtnodeFree(SCIP_BT *tree, SCIP_BTNODE **node)
SCIP_Bool SCIPbtnodeIsLeaf(SCIP_BTNODE *node)
void SCIPbtnodeSetData(SCIP_BTNODE *node, void *dataptr)
void * SCIPbtnodeGetData(SCIP_BTNODE *node)
SCIP_RETCODE SCIPbtnodeCreate(SCIP_BT *tree, SCIP_BTNODE **node, void *dataptr)
SCIP_Bool SCIPbtnodeIsRightchild(SCIP_BTNODE *node)
void SCIPbtnodeSetParent(SCIP_BTNODE *node, SCIP_BTNODE *parent)
SCIP_BTNODE * SCIPbtnodeGetSibling(SCIP_BTNODE *node)
SCIP_Bool SCIPbtnodeIsLeftchild(SCIP_BTNODE *node)
void SCIPbtnodeSetLeftchild(SCIP_BTNODE *node, SCIP_BTNODE *left)
SCIP_BTNODE * SCIPbtnodeGetParent(SCIP_BTNODE *node)
void SCIPbtFree(SCIP_BT **tree)
SCIP_BTNODE * SCIPbtnodeGetLeftchild(SCIP_BTNODE *node)
void SCIPbtSetRoot(SCIP_BT *tree, SCIP_BTNODE *root)
SCIP_Bool SCIPbtnodeIsRoot(SCIP_BTNODE *node)
SCIP_BTNODE * SCIPbtGetRoot(SCIP_BT *tree)
void SCIPbtPrintGml(SCIP_BT *tree, FILE *file)
void SCIPdigraphPrintComponents(SCIP_DIGRAPH *digraph, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
void ** SCIPdigraphGetSuccessorsData(SCIP_DIGRAPH *digraph, int node)
void SCIPdigraphFreeComponents(SCIP_DIGRAPH *digraph)
int SCIPdigraphGetNSuccessors(SCIP_DIGRAPH *digraph, int node)
SCIP_RETCODE SCIPdigraphComputeUndirectedComponents(SCIP_DIGRAPH *digraph, int minsize, int *components, int *ncomponents)
int SCIPdigraphGetNNodes(SCIP_DIGRAPH *digraph)
void SCIPdigraphPrintGml(SCIP_DIGRAPH *digraph, FILE *file)
void SCIPdigraphGetComponent(SCIP_DIGRAPH *digraph, int compidx, int **nodes, int *nnodes)
SCIP_RETCODE SCIPdigraphAddArc(SCIP_DIGRAPH *digraph, int startnode, int endnode, void *data)
SCIP_RETCODE SCIPdigraphTopoSortComponents(SCIP_DIGRAPH *digraph)
SCIP_RETCODE SCIPdigraphSetSizes(SCIP_DIGRAPH *digraph, int *sizes)
SCIP_RETCODE SCIPdigraphComputeDirectedComponents(SCIP_DIGRAPH *digraph, int compidx, int *strongcomponents, int *strongcompstartidx, int *nstrongcomponents)
SCIP_RETCODE SCIPdigraphAddArcSafe(SCIP_DIGRAPH *digraph, int startnode, int endnode, void *data)
void SCIPdigraphFree(SCIP_DIGRAPH **digraph)
int SCIPdigraphGetNArcs(SCIP_DIGRAPH *digraph)
void SCIPdigraphPrint(SCIP_DIGRAPH *digraph, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
void * SCIPdigraphGetNodeData(SCIP_DIGRAPH *digraph, int node)
void SCIPdigraphSetNodeData(SCIP_DIGRAPH *digraph, void *dataptr, int node)
SCIP_RETCODE SCIPdigraphSetNSuccessors(SCIP_DIGRAPH *digraph, int node, int nsuccessors)
int * SCIPdigraphGetSuccessors(SCIP_DIGRAPH *digraph, int node)
int SCIPdigraphGetNComponents(SCIP_DIGRAPH *digraph)
SCIP_RETCODE SCIPdigraphResize(SCIP_DIGRAPH *digraph, int nnodes)
SCIP_RETCODE SCIPdigraphGetArticulationPoints(SCIP_DIGRAPH *digraph, int **articulations, int *narticulations)
int SCIPdisjointsetGetSize(SCIP_DISJOINTSET *djset)
void SCIPdisjointsetClear(SCIP_DISJOINTSET *djset)
int SCIPdisjointsetGetComponentCount(SCIP_DISJOINTSET *djset)
int SCIPdisjointsetFind(SCIP_DISJOINTSET *djset, int element)
void SCIPdisjointsetUnion(SCIP_DISJOINTSET *djset, int p, int q, SCIP_Bool forcerepofp)
SCIP_Bool SCIPfileExists(const char *filename)
void SCIPsplitFilename(char *filename, char **path, char **name, char **extension, char **compression)
void SCIPdotWriteOpening(FILE *file)
void SCIPdotWriteClosing(FILE *file)
void SCIPdotWriteArc(FILE *file, int source, int target, const char *color)
void SCIPgmlWriteNodeWeight(FILE *file, unsigned int id, const char *label, const char *nodetype, const char *fillcolor, const char *bordercolor, SCIP_Real weight)
void SCIPgmlWriteNode(FILE *file, unsigned int id, const char *label, const char *nodetype, const char *fillcolor, const char *bordercolor)
void SCIPgmlWriteClosing(FILE *file)
void SCIPdotWriteNode(FILE *file, int node, const char *label, const char *nodetype, const char *fillcolor, const char *bordercolor)
void SCIPgmlWriteOpening(FILE *file, SCIP_Bool directed)
void SCIPgmlWriteEdge(FILE *file, unsigned int source, unsigned int target, const char *label, const char *color)
void SCIPgmlWriteArc(FILE *file, unsigned int source, unsigned int target, const char *label, const char *color)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void * SCIPhashmapEntryGetImage(SCIP_HASHMAPENTRY *entry)
SCIP_Real SCIPhashmapGetImageReal(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapInsertReal(SCIP_HASHMAP *hashmap, void *origin, SCIP_Real image)
void SCIPhashmapPrintStatistics(SCIP_HASHMAP *hashmap, SCIP_MESSAGEHDLR *messagehdlr)
int SCIPhashmapGetImageInt(SCIP_HASHMAP *hashmap, void *origin)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapSetImageReal(SCIP_HASHMAP *hashmap, void *origin, SCIP_Real image)
void SCIPhashmapEntrySetImageInt(SCIP_HASHMAPENTRY *entry, int image)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
SCIP_RETCODE SCIPhashmapSetImage(SCIP_HASHMAP *hashmap, void *origin, void *image)
int SCIPhashmapGetNElements(SCIP_HASHMAP *hashmap)
int SCIPhashmapEntryGetImageInt(SCIP_HASHMAPENTRY *entry)
void SCIPhashmapEntrySetImageReal(SCIP_HASHMAPENTRY *entry, SCIP_Real image)
int SCIPhashmapGetNEntries(SCIP_HASHMAP *hashmap)
SCIP_HASHMAPENTRY * SCIPhashmapGetEntry(SCIP_HASHMAP *hashmap, int entryidx)
void SCIPhashmapEntrySetImage(SCIP_HASHMAPENTRY *entry, void *image)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
void * SCIPhashmapEntryGetOrigin(SCIP_HASHMAPENTRY *entry)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapInsertInt(SCIP_HASHMAP *hashmap, void *origin, int image)
SCIP_Bool SCIPhashmapIsEmpty(SCIP_HASHMAP *hashmap)
SCIP_RETCODE SCIPhashmapRemoveAll(SCIP_HASHMAP *hashmap)
SCIP_Real SCIPhashmapEntryGetImageReal(SCIP_HASHMAPENTRY *entry)
SCIP_RETCODE SCIPhashmapRemove(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapSetImageInt(SCIP_HASHMAP *hashmap, void *origin, int image)
void SCIPhashsetFree(SCIP_HASHSET **hashset, BMS_BLKMEM *blkmem)
void SCIPhashsetPrintStatistics(SCIP_HASHSET *hashset, SCIP_MESSAGEHDLR *messagehdlr)
SCIP_Bool SCIPhashsetExists(SCIP_HASHSET *hashset, void *element)
void ** SCIPhashsetGetSlots(SCIP_HASHSET *hashset)
int SCIPhashsetGetNElements(SCIP_HASHSET *hashset)
int SCIPhashsetGetNSlots(SCIP_HASHSET *hashset)
void SCIPhashsetRemoveAll(SCIP_HASHSET *hashset)
SCIP_Bool SCIPhashsetIsEmpty(SCIP_HASHSET *hashset)
SCIP_RETCODE SCIPhashsetInsert(SCIP_HASHSET *hashset, BMS_BLKMEM *blkmem, void *element)
SCIP_RETCODE SCIPhashsetCreate(SCIP_HASHSET **hashset, BMS_BLKMEM *blkmem, int size)
SCIP_RETCODE SCIPhashsetRemove(SCIP_HASHSET *hashset, void *element)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
SCIP_Bool SCIPhashtableExists(SCIP_HASHTABLE *hashtable, void *element)
#define SCIPhashTwo(a, b)
int SCIPhashtableGetNEntries(SCIP_HASHTABLE *hashtable)
void SCIPhashtableClear(SCIP_HASHTABLE *hashtable)
SCIP_RETCODE SCIPhashtableSafeInsert(SCIP_HASHTABLE *hashtable, void *element)
void * SCIPhashtableGetEntry(SCIP_HASHTABLE *hashtable, int entryidx)
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)
void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)
void SCIPhashtableRemoveAll(SCIP_HASHTABLE *hashtable)
SCIP_Real SCIPhashtableGetLoad(SCIP_HASHTABLE *hashtable)
void SCIPhashtablePrintStatistics(SCIP_HASHTABLE *hashtable, SCIP_MESSAGEHDLR *messagehdlr)
SCIP_RETCODE SCIPhashtableRemove(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
SCIP_Longint SCIPhashtableGetNElements(SCIP_HASHTABLE *hashtable)
SCIP_Longint SCIPmultihashGetNElements(SCIP_MULTIHASH *multihash)
void SCIPmultihashFree(SCIP_MULTIHASH **multihash)
SCIP_RETCODE SCIPmultihashInsert(SCIP_MULTIHASH *multihash, void *element)
SCIP_RETCODE SCIPmultihashRemove(SCIP_MULTIHASH *multihash, void *element)
void SCIPmultihashRemoveAll(SCIP_MULTIHASH *multihash)
SCIP_RETCODE SCIPmultihashSafeInsert(SCIP_MULTIHASH *multihash, void *element)
SCIP_DECL_HASHKEYEQ(SCIPhashKeyEqString)
int SCIPcalcMultihashSize(int minsize)
SCIP_Real SCIPmultihashGetLoad(SCIP_MULTIHASH *multihash)
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)
SCIP_DECL_HASHKEYVAL(SCIPhashKeyValString)
void * SCIPmultihashRetrieve(SCIP_MULTIHASH *multihash, void *key)
void * SCIPmultihashRetrieveNext(SCIP_MULTIHASH *multihash, SCIP_MULTIHASHLIST **multihashlist, void *key)
SCIP_Bool SCIPmultihashExists(SCIP_MULTIHASH *multihash, void *element)
void SCIPmultihashPrintStatistics(SCIP_MULTIHASH *multihash, SCIP_MESSAGEHDLR *messagehdlr)
SCIP_DECL_HASHGETKEY(SCIPhashGetKeyStandard)
SCIP_Longint SCIPcalcGreComDiv(SCIP_Longint val1, SCIP_Longint val2)
SCIP_Longint SCIPcalcBinomCoef(int n, int m)
SCIP_Longint SCIPcalcSmaComMul(SCIP_Longint val1, SCIP_Longint val2)
SCIP_Real SCIPselectSimpleValue(SCIP_Real lb, SCIP_Real ub, SCIP_Longint maxdnom)
SCIP_Real SCIPcomputeGap(SCIP_Real eps, SCIP_Real inf, SCIP_Real primalbound, SCIP_Real dualbound)
SCIP_Bool SCIPfindSimpleRational(SCIP_Real lb, SCIP_Real ub, SCIP_Longint maxdnom, SCIP_Longint *numerator, SCIP_Longint *denominator)
SCIP_Real SCIPcalcRootNewton(SCIP_DECL_NEWTONEVAL((*function)), SCIP_DECL_NEWTONEVAL((*derivative)), SCIP_Real *params, int nparams, SCIP_Real x, SCIP_Real eps, int k)
SCIP_Real SCIPnextafter(SCIP_Real from, SCIP_Real to)
SCIP_Real SCIPcalcMachineEpsilon(void)
unsigned int SCIPcalcFibHash(SCIP_Real v)
SCIP_Bool SCIPrealToRational(SCIP_Real val, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Longint *numerator, SCIP_Longint *denominator)
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)
SCIP_Real SCIPrelDiff(SCIP_Real val1, SCIP_Real val2)
void SCIPswapInts(int *value1, int *value2)
void SCIPswapPointers(void **pointer1, void **pointer2)
void SCIPpermuteArray(void **array, int begin, int end, unsigned int *randseed)
void SCIPswapReals(SCIP_Real *value1, SCIP_Real *value2)
void SCIPrandomPermuteIntArray(SCIP_RANDNUMGEN *randnumgen, int *array, int begin, int end)
void SCIPrandomPermuteArray(SCIP_RANDNUMGEN *randnumgen, void **array, int begin, int end)
void SCIPpermuteIntArray(int *array, int begin, int end, unsigned int *randseed)
void ** SCIPpqueueElems(SCIP_PQUEUE *pqueue)
void SCIPpqueueDelPos(SCIP_PQUEUE *pqueue, int pos)
void SCIPpqueueClear(SCIP_PQUEUE *pqueue)
int SCIPpqueueFind(SCIP_PQUEUE *pqueue, void *elem)
void SCIPpqueueFree(SCIP_PQUEUE **pqueue)
SCIP_RETCODE SCIPpqueueInsert(SCIP_PQUEUE *pqueue, void *elem)
int SCIPpqueueNElems(SCIP_PQUEUE *pqueue)
SCIP_RETCODE SCIPpqueueCreate(SCIP_PQUEUE **pqueue, int initsize, SCIP_Real sizefac, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), SCIP_DECL_PQUEUEELEMCHGPOS((*elemchgpos)))
void * SCIPpqueueRemove(SCIP_PQUEUE *pqueue)
void * SCIPpqueueFirst(SCIP_PQUEUE *pqueue)
void SCIPintervalSetRoundingModeDownwards(void)
SCIP_ROUNDMODE SCIPintervalGetRoundingMode(void)
void SCIPintervalSetRoundingMode(SCIP_ROUNDMODE roundmode)
SCIP_Bool SCIPintervalHasRoundingControl(void)
int SCIPqueueNElems(SCIP_QUEUE *queue)
unsigned int SCIPqueueRemoveUInt(SCIP_QUEUE *queue)
void SCIPqueueFree(SCIP_QUEUE **queue)
SCIP_RETCODE SCIPqueueInsertUInt(SCIP_QUEUE *queue, unsigned int elem)
SCIP_RETCODE SCIPqueueCreate(SCIP_QUEUE **queue, int initsize, SCIP_Real sizefac)
void SCIPqueueClear(SCIP_QUEUE *queue)
SCIP_RETCODE SCIPqueueInsert(SCIP_QUEUE *queue, void *elem)
SCIP_Bool SCIPqueueIsEmpty(SCIP_QUEUE *queue)
void * SCIPqueueRemove(SCIP_QUEUE *queue)
void * SCIPqueueFirst(SCIP_QUEUE *queue)
unsigned int SCIPqueueFirstUInt(SCIP_QUEUE *queue)
SCIP_RETCODE SCIPgetRandomSubset(void **set, int nelems, void **subset, int nsubelems, unsigned int randseed)
SCIP_RETCODE SCIPrandomGetSubset(SCIP_RANDNUMGEN *randnumgen, void **set, int nelems, void **subset, int nsubelems)
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
int SCIPrandomGetInt(SCIP_RANDNUMGEN *randnumgen, int minrandval, int maxrandval)
int SCIPgetRandomInt(int minrandval, int maxrandval, unsigned int *seedp)
SCIP_Real SCIPgetRandomReal(SCIP_Real minrandval, SCIP_Real maxrandval, unsigned int *seedp)
void SCIPregressionRemoveObservation(SCIP_REGRESSION *regression, SCIP_Real x, SCIP_Real y)
void SCIPregressionAddObservation(SCIP_REGRESSION *regression, SCIP_Real x, SCIP_Real y)
SCIP_Real SCIPregressionGetIntercept(SCIP_REGRESSION *regression)
int SCIPregressionGetNObservations(SCIP_REGRESSION *regression)
void SCIPregressionFree(SCIP_REGRESSION **regression)
SCIP_RETCODE SCIPregressionCreate(SCIP_REGRESSION **regression)
void SCIPregressionReset(SCIP_REGRESSION *regression)
SCIP_Real SCIPregressionGetSlope(SCIP_REGRESSION *regression)
SCIP_RETCODE SCIPactivityCreate(SCIP_RESOURCEACTIVITY **activity, SCIP_VAR *var, int duration, int demand)
int SCIPactivityGetDuration(SCIP_RESOURCEACTIVITY *activity)
int SCIPactivityGetEnergy(SCIP_RESOURCEACTIVITY *activity)
SCIP_VAR * SCIPactivityGetVar(SCIP_RESOURCEACTIVITY *activity)
int SCIPactivityGetDemand(SCIP_RESOURCEACTIVITY *activity)
void SCIPactivityFree(SCIP_RESOURCEACTIVITY **activity)
int SCIPprofileGetLatestFeasibleStart(SCIP_PROFILE *profile, int est, int lst, int duration, int demand, SCIP_Bool *infeasible)
int * SCIPprofileGetTimepoints(SCIP_PROFILE *profile)
SCIP_Bool SCIPprofileFindLeft(SCIP_PROFILE *profile, int timepoint, int *pos)
int SCIPprofileGetNTimepoints(SCIP_PROFILE *profile)
void SCIPprofileFree(SCIP_PROFILE **profile)
int SCIPprofileGetLoad(SCIP_PROFILE *profile, int pos)
int * SCIPprofileGetLoads(SCIP_PROFILE *profile)
SCIP_RETCODE SCIPprofileCreate(SCIP_PROFILE **profile, int capacity)
int SCIPprofileGetEarliestFeasibleStart(SCIP_PROFILE *profile, int est, int lst, int duration, int demand, SCIP_Bool *infeasible)
int SCIPprofileGetTime(SCIP_PROFILE *profile, int pos)
int SCIPprofileGetCapacity(SCIP_PROFILE *profile)
SCIP_RETCODE SCIPprofileDeleteCore(SCIP_PROFILE *profile, int left, int right, int demand)
SCIP_RETCODE SCIPprofileInsertCore(SCIP_PROFILE *profile, int left, int right, int demand, int *pos, SCIP_Bool *infeasible)
void SCIPprofilePrint(SCIP_PROFILE *profile, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
SCIP_Real SCIPnormalCDF(SCIP_Real mean, SCIP_Real variance, SCIP_Real value)
SCIP_Real SCIPcomputeTwoSampleTTestValue(SCIP_Real meanx, SCIP_Real meany, SCIP_Real variancex, SCIP_Real variancey, SCIP_Real countx, SCIP_Real county)
SCIP_Real SCIPnormalGetCriticalValue(SCIP_CONFIDENCELEVEL clevel)
SCIP_Real SCIPstudentTGetCriticalValue(SCIP_CONFIDENCELEVEL clevel, int df)
SCIP_Real SCIPerf(SCIP_Real x)
void SCIPsortInd(int *indarray, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len)
void SCIPsortDown(int *perm, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len)
SCIP_Bool SCIPsortedvecFindInt(int *intarray, int val, int len, int *pos)
void SCIPsort(int *perm, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len)
SCIP_DECL_SORTPTRCOMP(SCIPsortCompInt)
void SCIPsortedvecInsertIntInt(int *intarray1, int *intarray2, int keyval, int field1val, int *len, int *pos)
void SCIPsortDownInd(int *indarray, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len)
SCIP_DECL_SORTINDCOMP(SCIPsortArgsortInt)
int SCIPsparseSolGetNVars(SCIP_SPARSESOL *sparsesol)
SCIP_Longint * SCIPsparseSolGetLbs(SCIP_SPARSESOL *sparsesol)
void SCIPsparseSolGetFirstSol(SCIP_SPARSESOL *sparsesol, SCIP_Longint *sol, int nvars)
SCIP_RETCODE SCIPsparseSolCreate(SCIP_SPARSESOL **sparsesol, SCIP_VAR **vars, int nvars, SCIP_Bool cleared)
SCIP_Longint * SCIPsparseSolGetUbs(SCIP_SPARSESOL *sparsesol)
void SCIPsparseSolFree(SCIP_SPARSESOL **sparsesol)
SCIP_Bool SCIPsparseSolGetNextSol(SCIP_SPARSESOL *sparsesol, SCIP_Longint *sol, int nvars)
SCIP_VAR ** SCIPsparseSolGetVars(SCIP_SPARSESOL *sparsesol)
SCIP_Bool SCIPstrToIntValue(const char *str, int *value, char **endptr)
int SCIPstrcasecmp(const char *s1, const char *s2)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_Bool SCIPstrToRealValue(const char *str, SCIP_Real *value, char **endptr)
void SCIPescapeString(char *t, int bufsize, const char *s)
void SCIPstrCopySection(const char *str, char startchar, char endchar, char *token, int size, char **endptr)
void SCIPprintSysError(const char *message)
SCIP_Bool SCIPstrAtStart(const char *s, const char *t, size_t tlen)
SCIP_RETCODE SCIPskipSpace(char **s)
int SCIPstrncpy(char *t, const char *s, int size)
int SCIPstrncasecmp(const char *s1, const char *s2, int length)
char * SCIPstrtok(char *s, const char *delim, char **ptrptr)
int SCIPmemccpy(char *dest, const char *src, char stop, unsigned int cnt)
static SCIP_RETCODE optimize(SCIP *scip, SCIP_SOL *worksol, SCIP_VAR **vars, int *blockstart, int *blockend, int nblocks, OPTTYPE opttype, SCIP_Real *activities, int nrows, SCIP_Bool *improvement, SCIP_Bool *varboundserr, SCIP_HEURDATA *heurdata)
interval arithmetics for provable bounds
#define BMSduplicateBlockMemoryArray(mem, ptr, source, num)
#define BMSfreeMemory(ptr)
#define BMSfreeBlockMemory(mem, ptr)
#define BMSallocBlockMemory(mem, ptr)
#define BMSreallocMemoryArray(ptr, num)
#define BMSfreeBlockMemoryArrayNull(mem, ptr, num)
#define BMSduplicateMemoryArray(ptr, source, num)
#define BMSclearMemory(ptr)
#define BMSallocMemoryArray(ptr, num)
#define BMSfreeMemoryArray(ptr)
#define BMSallocBlockMemoryArray(mem, ptr, num)
#define BMScopyMemoryArray(ptr, source, num)
#define BMSfreeBlockMemoryArray(mem, ptr, num)
#define BMSreallocBlockMemoryArray(mem, ptr, oldnum, newnum)
#define BMSmoveMemoryArray(ptr, source, num)
#define BMSallocClearBlockMemoryArray(mem, ptr, num)
#define BMSclearMemoryArray(ptr, num)
#define BMSallocClearMemoryArray(ptr, num)
struct BMS_BlkMem BMS_BLKMEM
#define BMSfreeMemoryArrayNull(ptr)
#define BMSallocMemory(ptr)
void SCIPmessagePrintError(const char *formatstr,...)
void SCIPmessageFPrintInfo(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
void SCIPmessagePrintInfo(SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
SCIP_RETCODE SCIPrealarrayExtend(SCIP_REALARRAY *realarray, int arraygrowinit, SCIP_Real arraygrowfac, int minidx, int maxidx)
#define ELEM_DISTANCE(pos)
SCIP_Bool SCIPboolarrayGetVal(SCIP_BOOLARRAY *boolarray, int idx)
static void incrementalStatsUpdate(SCIP_Real value, SCIP_Real *meanptr, SCIP_Real *sumvarptr, int nobservations, SCIP_Bool add)
static SCIP_RETCODE doProfileCreate(SCIP_PROFILE **profile, int capacity)
SCIP_RETCODE SCIPboolarrayFree(SCIP_BOOLARRAY **boolarray)
SCIP_RETCODE SCIPboolarrayCopy(SCIP_BOOLARRAY **boolarray, BMS_BLKMEM *blkmem, SCIP_BOOLARRAY *sourceboolarray)
static void pqueueElemChgPos(SCIP_PQUEUE *pqueue, void *elem, int oldpos, int newpos)
#define GMLNODEBORDERCOLOR
static void multihashlistFree(SCIP_MULTIHASHLIST **multihashlist, BMS_BLKMEM *blkmem)
static SCIP_RETCODE multihashlistAppend(SCIP_MULTIHASHLIST **multihashlist, BMS_BLKMEM *blkmem, void *element)
static SCIP_RETCODE hashtableCheckLoad(SCIP_HASHTABLE *hashtable)
int SCIPptrarrayGetMaxIdx(SCIP_PTRARRAY *ptrarray)
SCIP_RETCODE SCIPrealarraySetVal(SCIP_REALARRAY *realarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, SCIP_Real val)
SCIP_RETCODE SCIPintarraySetVal(SCIP_INTARRAY *intarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, int val)
static SCIP_Bool multihashlistRemove(SCIP_MULTIHASHLIST **multihashlist, BMS_BLKMEM *blkmem, void *element)
static const int primetablesize
#define SCIP_MULTIHASH_MAXSIZE
SCIP_RETCODE SCIPintarrayFree(SCIP_INTARRAY **intarray)
static SCIP_RETCODE queueResize(SCIP_QUEUE *queue, int minsize)
static SCIP_RETCODE queueCheckSize(SCIP_QUEUE *queue)
static int profileFindFeasibleStart(SCIP_PROFILE *profile, int pos, int lst, int duration, int demand, SCIP_Bool *infeasible)
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)
void SCIPdisjointsetFree(SCIP_DISJOINTSET **djset, BMS_BLKMEM *blkmem)
static void btnodeFreeLeaf(SCIP_BT *tree, SCIP_BTNODE **node)
static void depthFirstSearch(SCIP_DIGRAPH *digraph, int startnode, SCIP_Bool *visited, int *dfsstack, int *stackadjvisited, int *dfsnodes, int *ndfsnodes)
int SCIPptrarrayGetMinIdx(SCIP_PTRARRAY *ptrarray)
static SCIP_RETCODE profileUpdate(SCIP_PROFILE *profile, int left, int right, int demand, int *pos, SCIP_Bool *infeasible)
static SCIP_RETCODE ensureSuccessorsSize(SCIP_DIGRAPH *digraph, int idx, int newsize)
static SCIP_RETCODE profileInsertTimepoint(SCIP_PROFILE *profile, int timepoint, int *pos)
SCIP_RETCODE SCIPptrarrayExtend(SCIP_PTRARRAY *ptrarray, int arraygrowinit, SCIP_Real arraygrowfac, int minidx, int maxidx)
SCIP_RETCODE SCIPboolarrayExtend(SCIP_BOOLARRAY *boolarray, int arraygrowinit, SCIP_Real arraygrowfac, int minidx, int maxidx)
SCIP_RETCODE SCIPptrarrayCopy(SCIP_PTRARRAY **ptrarray, BMS_BLKMEM *blkmem, SCIP_PTRARRAY *sourceptrarray)
static void * multihashlistRetrieve(SCIP_MULTIHASHLIST *multihashlist, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr, uint64_t keyval, void *key)
static SCIP_RETCODE hashtableInsert(SCIP_HASHTABLE *hashtable, void *element, void *key, uint32_t hashval, SCIP_Bool override)
static void btPrintSubtree(SCIP_BTNODE *node, FILE *file, int *nnodes)
int SCIPboolarrayGetMaxIdx(SCIP_BOOLARRAY *boolarray)
static const SCIP_Real studentt_quartilesabove[]
void SCIPrandomFree(SCIP_RANDNUMGEN **randnumgen, BMS_BLKMEM *blkmem)
static int getRand(unsigned int *seedp)
SCIP_RETCODE SCIPdisjointsetCreate(SCIP_DISJOINTSET **djset, BMS_BLKMEM *blkmem, int ncomponents)
SCIP_RETCODE SCIPrandomCreate(SCIP_RANDNUMGEN **randnumgen, BMS_BLKMEM *blkmem, unsigned int initialseed)
SCIP_RETCODE SCIPintarrayCopy(SCIP_INTARRAY **intarray, BMS_BLKMEM *blkmem, SCIP_INTARRAY *sourceintarray)
SCIP_RETCODE SCIPptrarrayClear(SCIP_PTRARRAY *ptrarray)
static SCIP_RETCODE hashmapInsert(SCIP_HASHMAP *hashmap, void *origin, SCIP_HASHMAPIMAGE image, uint32_t hashval, SCIP_Bool override)
int SCIPrealarrayGetMaxIdx(SCIP_REALARRAY *realarray)
SCIP_RETCODE SCIPdigraphCreate(SCIP_DIGRAPH **digraph, BMS_BLKMEM *blkmem, int nnodes)
static uint32_t hashSetDesiredPos(SCIP_HASHSET *hashset, void *element)
int SCIPintarrayGetMaxIdx(SCIP_INTARRAY *intarray)
SCIP_RETCODE SCIPintarrayCreate(SCIP_INTARRAY **intarray, BMS_BLKMEM *blkmem)
static SCIP_RETCODE hashsetCheckLoad(SCIP_HASHSET *hashset, BMS_BLKMEM *blkmem)
static void regressionRecompute(SCIP_REGRESSION *regression)
#define STARTSUCCESSORSSIZE
SCIP_Real SCIPrealarrayGetVal(SCIP_REALARRAY *realarray, int idx)
SCIP_RETCODE SCIPptrarrayFree(SCIP_PTRARRAY **ptrarray)
SCIP_RETCODE SCIPintarrayClear(SCIP_INTARRAY *intarray)
#define SCIP_MULTIHASH_RESIZE_PERCENTAGE
SCIP_RETCODE SCIPrealarrayIncVal(SCIP_REALARRAY *realarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, SCIP_Real incval)
int SCIPrealarrayGetMinIdx(SCIP_REALARRAY *realarray)
SCIP_RETCODE SCIPrealarrayCreate(SCIP_REALARRAY **realarray, BMS_BLKMEM *blkmem)
static const int nscalars
SCIP_RETCODE SCIPrealarrayClear(SCIP_REALARRAY *realarray)
int SCIPboolarrayGetMinIdx(SCIP_BOOLARRAY *boolarray)
static int calcGrowSize(int initsize, SCIP_Real growfac, int num)
static const SCIP_Real studentt_quartiles[]
static const int studentt_maxdf
static uint32_t randomGetRand(SCIP_RANDNUMGEN *randnumgen)
static uint32_t hashvalue(uint64_t input)
static void findArticulationPointsUtil(SCIP_DIGRAPH *digraph, int startnode, SCIP_Bool *visited, int *tdisc, int *mindisc, int *parent, SCIP_Bool *articulationflag, int time)
static void queueCheckMarker(SCIP_QUEUE *queue)
static int profileFindDownFeasibleStart(SCIP_PROFILE *profile, int pos, int ect, int duration, int demand, SCIP_Bool *infeasible)
int SCIPintarrayGetMinIdx(SCIP_INTARRAY *intarray)
static SCIP_RETCODE pqueueResize(SCIP_PQUEUE *pqueue, int minsize)
SCIP_RETCODE SCIPrealarrayCopy(SCIP_REALARRAY **realarray, BMS_BLKMEM *blkmem, SCIP_REALARRAY *sourcerealarray)
static SCIP_RETCODE hashmapCheckLoad(SCIP_HASHMAP *hashmap)
void * SCIPptrarrayGetVal(SCIP_PTRARRAY *ptrarray, int idx)
void SCIPrandomSetSeed(SCIP_RANDNUMGEN *randnumgen, unsigned int initseed)
SCIP_RETCODE SCIPintarrayExtend(SCIP_INTARRAY *intarray, int arraygrowinit, SCIP_Real arraygrowfac, int minidx, int maxidx)
#define SCIP_MULTIHASH_GROW_FACTOR
static SCIP_RETCODE multihashResize(SCIP_MULTIHASH *multihash)
SCIP_RETCODE SCIPboolarrayCreate(SCIP_BOOLARRAY **boolarray, BMS_BLKMEM *blkmem)
static SCIP_RETCODE ensureProfileSize(SCIP_PROFILE *profile, int neededsize)
static SCIP_Bool isIntegralScalar(SCIP_Real val, SCIP_Real scalar, SCIP_Real mindelta, SCIP_Real maxdelta)
SCIP_Real SCIPnegateReal(SCIP_Real x)
static SCIP_RETCODE btnodeCreateEmpty(SCIP_BT *tree, SCIP_BTNODE **node)
SCIP_RETCODE SCIPboolarrayClear(SCIP_BOOLARRAY *boolarray)
static void * multihashlistRetrieveNext(SCIP_MULTIHASHLIST **multihashlist, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr, uint64_t keyval, void *key)
SCIP_RETCODE SCIPintarrayIncVal(SCIP_INTARRAY *intarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, int incval)
int SCIPintarrayGetVal(SCIP_INTARRAY *intarray, int idx)
static SCIP_Bool hashmapLookup(SCIP_HASHMAP *hashmap, void *origin, uint32_t *pos)
static const SCIP_Real scalars[]
SCIP_RETCODE SCIPdigraphCopy(SCIP_DIGRAPH **targetdigraph, SCIP_DIGRAPH *sourcedigraph, BMS_BLKMEM *targetblkmem)
SCIP_RETCODE SCIPptrarrayCreate(SCIP_PTRARRAY **ptrarray, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPptrarraySetVal(SCIP_PTRARRAY *ptrarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, void *val)
static const SCIP_Real simplednoms[]
static SCIP_Real getRandomReal(SCIP_Real minrandval, SCIP_Real maxrandval, unsigned int *seedp)
static SCIP_MULTIHASHLIST * multihashlistFind(SCIP_MULTIHASHLIST *multihashlist, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr, uint64_t keyval, void *key)
SCIP_RETCODE SCIPrealarrayFree(SCIP_REALARRAY **realarray)
static void hashsetInsert(SCIP_HASHSET *hashset, void *element)
SCIP_RETCODE SCIPboolarraySetVal(SCIP_BOOLARRAY *boolarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, SCIP_Bool val)
static int getRandomInt(int minrandval, int maxrandval, unsigned int *seedp)
internal miscellaneous methods
public methods for message output
public data structures and miscellaneous methods
template functions for sorting
SCIP_Bool articulationscheck
SCIP_HASHMAPTYPE hashmaptype
SCIP_HASHMAPENTRY * slots
SCIP_MULTIHASHLIST * next
SCIP_MULTIHASHLIST ** lists
SCIP_QUEUEELEMENT * slots
miscellaneous datastructures
@ SCIP_HASHMAPTYPE_POINTER
@ SCIP_HASHMAPTYPE_UNKNOWN
#define SCIP_DECL_PQUEUEELEMCHGPOS(x)
#define SCIP_DECL_NEWTONEVAL(x)
enum SCIP_Confidencelevel SCIP_CONFIDENCELEVEL
@ SCIP_KEYALREADYEXISTING
enum SCIP_Retcode SCIP_RETCODE
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4