Scippy

SCIP

Solving Constraint Integer Programs

scip_datastructures.c
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2021 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file scip_datastructures.c
17  * @ingroup OTHER_CFILES
18  * @brief public methods for data structures
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  * @author Gerald Gamrath
22  * @author Leona Gottwald
23  * @author Stefan Heinz
24  * @author Gregor Hendel
25  * @author Thorsten Koch
26  * @author Alexander Martin
27  * @author Marc Pfetsch
28  * @author Michael Winkler
29  * @author Kati Wolter
30  *
31  * @todo check all SCIP_STAGE_* switches, and include the new stages TRANSFORMED and INITSOLVE
32  */
33 
34 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
35 
36 #include "scip/misc.h"
37 #include "scip/pub_message.h"
39 #include "scip/scip_mem.h"
40 #include "scip/struct_mem.h"
41 #include "scip/struct_scip.h"
42 #include "scip/struct_set.h"
43 
44 /** creates a dynamic array of real values
45  *
46  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
47  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
48  */
50  SCIP* scip, /**< SCIP data structure */
51  SCIP_REALARRAY** realarray /**< pointer to store the real array */
52  )
53 {
54  assert(scip != NULL);
55 
56  SCIP_CALL( SCIPrealarrayCreate(realarray, SCIPblkmem(scip)) );
57 
58  return SCIP_OKAY;
59 }
60 
61 /** frees a dynamic array of real values
62  *
63  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
64  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
65  */
67  SCIP* scip, /**< SCIP data structure */
68  SCIP_REALARRAY** realarray /**< pointer to the real array */
69  )
70 {
71  assert(scip != NULL);
72 
73  SCIP_CALL( SCIPrealarrayFree(realarray) );
74 
75  return SCIP_OKAY;
76 }
77 
78 /** extends dynamic array to be able to store indices from minidx to maxidx
79  *
80  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
81  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
82  */
84  SCIP* scip, /**< SCIP data structure */
85  SCIP_REALARRAY* realarray, /**< dynamic real array */
86  int minidx, /**< smallest index to allocate storage for */
87  int maxidx /**< largest index to allocate storage for */
88  )
89 {
90  assert(scip != NULL);
91 
92  SCIP_CALL( SCIPrealarrayExtend(realarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, minidx, maxidx) );
93 
94  return SCIP_OKAY;
95 }
96 
97 /** clears a dynamic real array
98  *
99  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
100  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
101  */
103  SCIP* scip, /**< SCIP data structure */
104  SCIP_REALARRAY* realarray /**< dynamic real array */
105  )
106 {
107  assert(scip != NULL);
108 
109  SCIP_CALL( SCIPrealarrayClear(realarray) );
110 
111  return SCIP_OKAY;
112 }
113 
114 /** gets value of entry in dynamic array
115  *
116  * @return value of entry in dynamic array
117  */
119  SCIP* scip, /**< SCIP data structure */
120  SCIP_REALARRAY* realarray, /**< dynamic real array */
121  int idx /**< array index to get value for */
122  )
123 {
124  assert(scip != NULL);
125 
126  return SCIPrealarrayGetVal(realarray, idx);
127 }
128 
129 /** sets value of entry in dynamic array
130  *
131  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
132  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
133  */
135  SCIP* scip, /**< SCIP data structure */
136  SCIP_REALARRAY* realarray, /**< dynamic real array */
137  int idx, /**< array index to set value for */
138  SCIP_Real val /**< value to set array index to */
139  )
140 {
141  assert(scip != NULL);
142 
143  SCIP_CALL( SCIPrealarraySetVal(realarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, idx, val) );
144 
145  return SCIP_OKAY;
146 }
147 
148 /** increases value of entry in dynamic array
149  *
150  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
151  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
152  */
154  SCIP* scip, /**< SCIP data structure */
155  SCIP_REALARRAY* realarray, /**< dynamic real array */
156  int idx, /**< array index to increase value for */
157  SCIP_Real incval /**< value to increase array index */
158  )
159 {
160  assert(scip != NULL);
161 
162  SCIP_CALL( SCIPrealarrayIncVal(realarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, idx, incval) );
163 
164  return SCIP_OKAY;
165 }
166 
167 /** returns the minimal index of all stored non-zero elements
168  *
169  * @return the minimal index of all stored non-zero elements
170  */
172  SCIP* scip, /**< SCIP data structure */
173  SCIP_REALARRAY* realarray /**< dynamic real array */
174  )
175 {
176  assert(scip != NULL);
177 
178  return SCIPrealarrayGetMinIdx(realarray);
179 }
180 
181 /** returns the maximal index of all stored non-zero elements
182  *
183  * @return the maximal index of all stored non-zero elements
184  */
186  SCIP* scip, /**< SCIP data structure */
187  SCIP_REALARRAY* realarray /**< dynamic real array */
188  )
189 {
190  assert(scip != NULL);
191 
192  return SCIPrealarrayGetMaxIdx(realarray);
193 }
194 
195 /** creates a dynamic array of int values
196  *
197  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
198  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
199  */
201  SCIP* scip, /**< SCIP data structure */
202  SCIP_INTARRAY** intarray /**< pointer to store the int array */
203  )
204 {
205  assert(scip != NULL);
206 
207  SCIP_CALL( SCIPintarrayCreate(intarray, SCIPblkmem(scip)) );
208 
209  return SCIP_OKAY;
210 }
211 
212 /** frees a dynamic array of int values
213  *
214  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
215  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
216  */
218  SCIP* scip, /**< SCIP data structure */
219  SCIP_INTARRAY** intarray /**< pointer to the int array */
220  )
221 {
222  assert(scip != NULL);
223 
224  SCIP_CALL( SCIPintarrayFree(intarray) );
225 
226  return SCIP_OKAY;
227 }
228 
229 /** extends dynamic array to be able to store indices from minidx to maxidx
230  *
231  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
232  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
233  */
235  SCIP* scip, /**< SCIP data structure */
236  SCIP_INTARRAY* intarray, /**< dynamic int array */
237  int minidx, /**< smallest index to allocate storage for */
238  int maxidx /**< largest index to allocate storage for */
239  )
240 {
241  assert(scip != NULL);
242 
243  SCIP_CALL( SCIPintarrayExtend(intarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, minidx, maxidx) );
244 
245  return SCIP_OKAY;
246 }
247 
248 /** clears a dynamic int array
249  *
250  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
251  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
252  */
254  SCIP* scip, /**< SCIP data structure */
255  SCIP_INTARRAY* intarray /**< dynamic int array */
256  )
257 {
258  assert(scip != NULL);
259 
260  SCIP_CALL( SCIPintarrayClear(intarray) );
261 
262  return SCIP_OKAY;
263 }
264 
265 /** gets value of entry in dynamic array
266  *
267  * @return value of entry in dynamic array
268  */
270  SCIP* scip, /**< SCIP data structure */
271  SCIP_INTARRAY* intarray, /**< dynamic int array */
272  int idx /**< array index to get value for */
273  )
274 {
275  assert(scip != NULL);
276 
277  return SCIPintarrayGetVal(intarray, idx);
278 }
279 
280 /** sets value of entry in dynamic array
281  *
282  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
283  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
284  */
286  SCIP* scip, /**< SCIP data structure */
287  SCIP_INTARRAY* intarray, /**< dynamic int array */
288  int idx, /**< array index to set value for */
289  int val /**< value to set array index to */
290  )
291 {
292  assert(scip != NULL);
293 
294  SCIP_CALL( SCIPintarraySetVal(intarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, idx, val) );
295 
296  return SCIP_OKAY;
297 }
298 
299 /** increases value of entry in dynamic array
300  *
301  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
302  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
303  */
305  SCIP* scip, /**< SCIP data structure */
306  SCIP_INTARRAY* intarray, /**< dynamic int array */
307  int idx, /**< array index to increase value for */
308  int incval /**< value to increase array index */
309  )
310 {
311  assert(scip != NULL);
312 
313  SCIP_CALL( SCIPintarrayIncVal(intarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, idx, incval) );
314 
315  return SCIP_OKAY;
316 }
317 
318 /** returns the minimal index of all stored non-zero elements
319  *
320  * @return the minimal index of all stored non-zero elements
321  */
323  SCIP* scip, /**< SCIP data structure */
324  SCIP_INTARRAY* intarray /**< dynamic int array */
325  )
326 {
327  assert(scip != NULL);
328 
329  return SCIPintarrayGetMinIdx(intarray);
330 }
331 
332 /** returns the maximal index of all stored non-zero elements
333  *
334  * @return the maximal index of all stored non-zero elements
335  */
337  SCIP* scip, /**< SCIP data structure */
338  SCIP_INTARRAY* intarray /**< dynamic int array */
339  )
340 {
341  assert(scip != NULL);
342 
343  return SCIPintarrayGetMaxIdx(intarray);
344 }
345 
346 /** creates a dynamic array of bool values
347  *
348  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
349  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
350  */
352  SCIP* scip, /**< SCIP data structure */
353  SCIP_BOOLARRAY** boolarray /**< pointer to store the bool array */
354  )
355 {
356  assert(scip != NULL);
357 
358  SCIP_CALL( SCIPboolarrayCreate(boolarray, SCIPblkmem(scip)) );
359 
360  return SCIP_OKAY;
361 }
362 
363 /** frees a dynamic array of bool values
364  *
365  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
366  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
367  */
369  SCIP* scip, /**< SCIP data structure */
370  SCIP_BOOLARRAY** boolarray /**< pointer to the bool array */
371  )
372 {
373  assert(scip != NULL);
374 
375  SCIP_CALL( SCIPboolarrayFree(boolarray) );
376 
377  return SCIP_OKAY;
378 }
379 
380 /** extends dynamic array to be able to store indices from minidx to maxidx
381  *
382  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
383  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
384  */
386  SCIP* scip, /**< SCIP data structure */
387  SCIP_BOOLARRAY* boolarray, /**< dynamic bool array */
388  int minidx, /**< smallest index to allocate storage for */
389  int maxidx /**< largest index to allocate storage for */
390  )
391 {
392  assert(scip != NULL);
393 
394  SCIP_CALL( SCIPboolarrayExtend(boolarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, minidx, maxidx) );
395 
396  return SCIP_OKAY;
397 }
398 
399 /** clears a dynamic bool array
400  *
401  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
402  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
403  */
405  SCIP* scip, /**< SCIP data structure */
406  SCIP_BOOLARRAY* boolarray /**< dynamic bool array */
407  )
408 {
409  assert(scip != NULL);
410 
411  SCIP_CALL( SCIPboolarrayClear(boolarray) );
412 
413  return SCIP_OKAY;
414 }
415 
416 /** gets value of entry in dynamic array
417  *
418  * @return value of entry in dynamic array at position idx
419  */
421  SCIP* scip, /**< SCIP data structure */
422  SCIP_BOOLARRAY* boolarray, /**< dynamic bool array */
423  int idx /**< array index to get value for */
424  )
425 {
426  assert(scip != NULL);
427 
428  return SCIPboolarrayGetVal(boolarray, idx);
429 }
430 
431 /** sets value of entry in dynamic array
432  *
433  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
434  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
435  */
437  SCIP* scip, /**< SCIP data structure */
438  SCIP_BOOLARRAY* boolarray, /**< dynamic bool array */
439  int idx, /**< array index to set value for */
440  SCIP_Bool val /**< value to set array index to */
441  )
442 {
443  assert(scip != NULL);
444 
445  SCIP_CALL( SCIPboolarraySetVal(boolarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, idx, val) );
446 
447  return SCIP_OKAY;
448 }
449 
450 /** returns the minimal index of all stored non-zero elements
451  *
452  * @return the minimal index of all stored non-zero elements
453  */
455  SCIP* scip, /**< SCIP data structure */
456  SCIP_BOOLARRAY* boolarray /**< dynamic bool array */
457  )
458 {
459  assert(scip != NULL);
460 
461  return SCIPboolarrayGetMinIdx(boolarray);
462 }
463 
464 /** returns the maximal index of all stored non-zero elements
465  *
466  * @return the maximal index of all stored non-zero elements
467  */
469  SCIP* scip, /**< SCIP data structure */
470  SCIP_BOOLARRAY* boolarray /**< dynamic bool array */
471  )
472 {
473  assert(scip != NULL);
474 
475  return SCIPboolarrayGetMaxIdx(boolarray);
476 }
477 
478 /** creates a dynamic array of pointers
479  *
480  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
481  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
482  */
484  SCIP* scip, /**< SCIP data structure */
485  SCIP_PTRARRAY** ptrarray /**< pointer to store the int array */
486  )
487 {
488  assert(scip != NULL);
489 
490  SCIP_CALL( SCIPptrarrayCreate(ptrarray, SCIPblkmem(scip)) );
491 
492  return SCIP_OKAY;
493 }
494 
495 /** frees a dynamic array of pointers
496  *
497  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
498  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
499  */
501  SCIP* scip, /**< SCIP data structure */
502  SCIP_PTRARRAY** ptrarray /**< pointer to the int array */
503  )
504 {
505  assert(scip != NULL);
506 
507  SCIP_CALL( SCIPptrarrayFree(ptrarray) );
508 
509  return SCIP_OKAY;
510 }
511 
512 /** extends dynamic array to be able to store indices from minidx to maxidx
513  *
514  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
515  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
516  */
518  SCIP* scip, /**< SCIP data structure */
519  SCIP_PTRARRAY* ptrarray, /**< dynamic int array */
520  int minidx, /**< smallest index to allocate storage for */
521  int maxidx /**< largest index to allocate storage for */
522  )
523 {
524  assert(scip != NULL);
525 
526  SCIP_CALL( SCIPptrarrayExtend(ptrarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, minidx, maxidx) );
527 
528  return SCIP_OKAY;
529 }
530 
531 /** clears a dynamic pointer array
532  *
533  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
534  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
535  */
537  SCIP* scip, /**< SCIP data structure */
538  SCIP_PTRARRAY* ptrarray /**< dynamic int array */
539  )
540 {
541  assert(scip != NULL);
542 
543  SCIP_CALL( SCIPptrarrayClear(ptrarray) );
544 
545  return SCIP_OKAY;
546 }
547 
548 /** gets value of entry in dynamic array */
550  SCIP* scip, /**< SCIP data structure */
551  SCIP_PTRARRAY* ptrarray, /**< dynamic int array */
552  int idx /**< array index to get value for */
553  )
554 {
555  assert(scip != NULL);
556 
557  return SCIPptrarrayGetVal(ptrarray, idx);
558 }
559 
560 /** sets value of entry in dynamic array
561  *
562  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
563  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
564  */
566  SCIP* scip, /**< SCIP data structure */
567  SCIP_PTRARRAY* ptrarray, /**< dynamic int array */
568  int idx, /**< array index to set value for */
569  void* val /**< value to set array index to */
570  )
571 {
572  assert(scip != NULL);
573 
574  SCIP_CALL( SCIPptrarraySetVal(ptrarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, idx, val) );
575 
576  return SCIP_OKAY;
577 }
578 
579 /** returns the minimal index of all stored non-zero elements
580  *
581  * @return the minimal index of all stored non-zero elements
582  */
584  SCIP* scip, /**< SCIP data structure */
585  SCIP_PTRARRAY* ptrarray /**< dynamic ptr array */
586  )
587 {
588  assert(scip != NULL);
589 
590  return SCIPptrarrayGetMinIdx(ptrarray);
591 }
592 
593 /** returns the maximal index of all stored non-zero elements
594  *
595  * @return the maximal index of all stored non-zero elements
596  */
598  SCIP* scip, /**< SCIP data structure */
599  SCIP_PTRARRAY* ptrarray /**< dynamic ptr array */
600  )
601 {
602  assert(scip != NULL);
603 
604  return SCIPptrarrayGetMaxIdx(ptrarray);
605 }
606 
607 /** creates directed graph structure */
609  SCIP* scip, /**< SCIP data structure */
610  SCIP_DIGRAPH** digraph, /**< pointer to store the created directed graph */
611  int nnodes /**< number of nodes */
612  )
613 {
614  assert(scip != NULL);
615  assert(digraph != NULL);
616 
617  SCIP_CALL( SCIPdigraphCreate(digraph, scip->mem->probmem, nnodes) );
618 
619  return SCIP_OKAY;
620 }
621 
622 /** copies directed graph structure
623  *
624  * The copying procedure uses the memory of the passed SCIP instance. The user must ensure that the digraph lives
625  * as most as long as the SCIP instance.
626  *
627  * @note The data in nodedata is copied verbatim. This possibly has to be adapted by the user.
628  */
630  SCIP* scip, /**< SCIP data structure */
631  SCIP_DIGRAPH** targetdigraph, /**< pointer to store the copied directed graph */
632  SCIP_DIGRAPH* sourcedigraph /**< source directed graph */
633  )
634 {
635  assert(scip != NULL);
636  assert(sourcedigraph != NULL);
637  assert(targetdigraph != NULL);
638 
639  SCIP_CALL( SCIPdigraphCopy(targetdigraph, sourcedigraph, scip->mem->probmem) );
640 
641  return SCIP_OKAY;
642 }
643 
644 /** creates a disjoint set (union find) structure \p uf for \p ncomponents many components (of size one) */
646  SCIP* scip, /**< SCIP data structure */
647  SCIP_DISJOINTSET** djset, /**< disjoint set (union find) data structure */
648  int ncomponents /**< number of components */
649  )
650 {
651  assert(scip != NULL);
652  assert(djset != NULL);
653 
654  SCIP_CALL( SCIPdisjointsetCreate(djset, scip->mem->probmem, ncomponents) );
655 
656  return SCIP_OKAY;
657 }
658 
659 /** frees the disjoint set (union find) data structure */
661  SCIP* scip, /**< SCIP data structure */
662  SCIP_DISJOINTSET** djset /**< disjoint set (union find) data structure */
663  )
664 {
665  assert(scip != NULL);
666 
667  SCIPdisjointsetFree(djset, scip->mem->probmem);
668 }
int SCIPrealarrayGetMaxIdx(SCIP_REALARRAY *realarray)
Definition: misc.c:4332
int SCIPgetIntarrayMinIdx(SCIP *scip, SCIP_INTARRAY *intarray)
SCIP_RETCODE SCIPcreateDigraph(SCIP *scip, SCIP_DIGRAPH **digraph, int nnodes)
int SCIPgetRealarrayMaxIdx(SCIP *scip, SCIP_REALARRAY *realarray)
SCIP_RETCODE SCIPcreatePtrarray(SCIP *scip, SCIP_PTRARRAY **ptrarray)
SCIP_RETCODE SCIPsetPtrarrayVal(SCIP *scip, SCIP_PTRARRAY *ptrarray, int idx, void *val)
public methods for memory management
SCIP_RETCODE SCIPsetBoolarrayVal(SCIP *scip, SCIP_BOOLARRAY *boolarray, int idx, SCIP_Bool val)
SCIP_RETCODE SCIPintarrayIncVal(SCIP_INTARRAY *intarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, int incval)
Definition: misc.c:4674
SCIP_RETCODE SCIPincIntarrayVal(SCIP *scip, SCIP_INTARRAY *intarray, int idx, int incval)
SCIP_Bool SCIPgetBoolarrayVal(SCIP *scip, SCIP_BOOLARRAY *boolarray, int idx)
int SCIPintarrayGetMinIdx(SCIP_INTARRAY *intarray)
Definition: misc.c:4686
SCIP_RETCODE SCIPrealarrayCreate(SCIP_REALARRAY **realarray, BMS_BLKMEM *blkmem)
Definition: misc.c:3970
SCIP_Bool SCIPboolarrayGetVal(SCIP_BOOLARRAY *boolarray, int idx)
Definition: misc.c:4953
SCIP_RETCODE SCIPcreateIntarray(SCIP *scip, SCIP_INTARRAY **intarray)
int SCIPintarrayGetVal(SCIP_INTARRAY *intarray, int idx)
Definition: misc.c:4585
void * SCIPptrarrayGetVal(SCIP_PTRARRAY *ptrarray, int idx)
Definition: misc.c:5306
int SCIPboolarrayGetMaxIdx(SCIP_BOOLARRAY *boolarray)
Definition: misc.c:5052
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
int SCIPgetBoolarrayMaxIdx(SCIP *scip, SCIP_BOOLARRAY *boolarray)
SCIP_RETCODE SCIPptrarrayExtend(SCIP_PTRARRAY *ptrarray, int arraygrowinit, SCIP_Real arraygrowfac, int minidx, int maxidx)
Definition: misc.c:5120
SCIP_RETCODE SCIPincRealarrayVal(SCIP *scip, SCIP_REALARRAY *realarray, int idx, SCIP_Real incval)
SCIP_Real mem_arraygrowfac
Definition: struct_set.h:357
SCIP_RETCODE SCIPclearRealarray(SCIP *scip, SCIP_REALARRAY *realarray)
int SCIPptrarrayGetMinIdx(SCIP_PTRARRAY *ptrarray)
Definition: misc.c:5395
SCIP_RETCODE SCIPcreateDisjointset(SCIP *scip, SCIP_DISJOINTSET **djset, int ncomponents)
int SCIPrealarrayGetMinIdx(SCIP_REALARRAY *realarray)
Definition: misc.c:4322
SCIP_RETCODE SCIPextendRealarray(SCIP *scip, SCIP_REALARRAY *realarray, int minidx, int maxidx)
SCIP_RETCODE SCIPboolarraySetVal(SCIP_BOOLARRAY *boolarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, SCIP_Bool val)
Definition: misc.c:4974
void SCIPfreeDisjointset(SCIP *scip, SCIP_DISJOINTSET **djset)
SCIP_RETCODE SCIPintarrayFree(SCIP_INTARRAY **intarray)
Definition: misc.c:4385
SCIP_RETCODE SCIPrealarrayIncVal(SCIP_REALARRAY *realarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, SCIP_Real incval)
Definition: misc.c:4304
SCIP_MEM * mem
Definition: struct_scip.h:62
SCIP_RETCODE SCIPcreateRealarray(SCIP *scip, SCIP_REALARRAY **realarray)
SCIP_RETCODE SCIPsetIntarrayVal(SCIP *scip, SCIP_INTARRAY *intarray, int idx, int val)
void SCIPdisjointsetFree(SCIP_DISJOINTSET **djset, BMS_BLKMEM *blkmem)
Definition: misc.c:11075
SCIP_RETCODE SCIPboolarrayCreate(SCIP_BOOLARRAY **boolarray, BMS_BLKMEM *blkmem)
Definition: misc.c:4707
SCIP_RETCODE SCIPextendIntarray(SCIP *scip, SCIP_INTARRAY *intarray, int minidx, int maxidx)
SCIP_Real SCIPrealarrayGetVal(SCIP_REALARRAY *realarray, int idx)
Definition: misc.c:4214
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
Definition: scip_mem.c:48
int SCIPintarrayGetMaxIdx(SCIP_INTARRAY *intarray)
Definition: misc.c:4696
SCIP_RETCODE SCIPdigraphCreate(SCIP_DIGRAPH **digraph, BMS_BLKMEM *blkmem, int nnodes)
Definition: misc.c:7279
internal miscellaneous methods
SCIP_RETCODE SCIPboolarrayClear(SCIP_BOOLARRAY *boolarray)
Definition: misc.c:4922
#define NULL
Definition: lpi_spx1.cpp:155
int SCIPptrarrayGetMaxIdx(SCIP_PTRARRAY *ptrarray)
Definition: misc.c:5405
#define SCIP_CALL(x)
Definition: def.h:370
SCIP main data structure.
SCIP_RETCODE SCIPclearIntarray(SCIP *scip, SCIP_INTARRAY *intarray)
SCIP_RETCODE SCIPintarraySetVal(SCIP_INTARRAY *intarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, int val)
Definition: misc.c:4606
SCIP_RETCODE SCIPsetRealarrayVal(SCIP *scip, SCIP_REALARRAY *realarray, int idx, SCIP_Real val)
SCIP_RETCODE SCIPcopyDigraph(SCIP *scip, SCIP_DIGRAPH **targetdigraph, SCIP_DIGRAPH *sourcedigraph)
SCIP_RETCODE SCIPfreeIntarray(SCIP *scip, SCIP_INTARRAY **intarray)
#define SCIP_Bool
Definition: def.h:70
int mem_arraygrowinit
Definition: struct_set.h:360
SCIP_RETCODE SCIPrealarrayFree(SCIP_REALARRAY **realarray)
Definition: misc.c:4014
int SCIPgetPtrarrayMaxIdx(SCIP *scip, SCIP_PTRARRAY *ptrarray)
SCIP_RETCODE SCIPclearPtrarray(SCIP *scip, SCIP_PTRARRAY *ptrarray)
SCIP_Real SCIPgetRealarrayVal(SCIP *scip, SCIP_REALARRAY *realarray, int idx)
datastructures for block memory pools and memory buffers
int SCIPboolarrayGetMinIdx(SCIP_BOOLARRAY *boolarray)
Definition: misc.c:5042
void * SCIPgetPtrarrayVal(SCIP *scip, SCIP_PTRARRAY *ptrarray, int idx)
SCIP_RETCODE SCIPptrarrayClear(SCIP_PTRARRAY *ptrarray)
Definition: misc.c:5275
int SCIPgetIntarrayVal(SCIP *scip, SCIP_INTARRAY *intarray, int idx)
BMS_BLKMEM * probmem
Definition: struct_mem.h:40
SCIP_RETCODE SCIPptrarrayFree(SCIP_PTRARRAY **ptrarray)
Definition: misc.c:5106
SCIP_RETCODE SCIPfreeRealarray(SCIP *scip, SCIP_REALARRAY **realarray)
SCIP_RETCODE SCIPintarrayExtend(SCIP_INTARRAY *intarray, int arraygrowinit, SCIP_Real arraygrowfac, int minidx, int maxidx)
Definition: misc.c:4399
SCIP_RETCODE SCIPptrarraySetVal(SCIP_PTRARRAY *ptrarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, void *val)
Definition: misc.c:5327
SCIP_RETCODE SCIPfreePtrarray(SCIP *scip, SCIP_PTRARRAY **ptrarray)
SCIP_SET * set
Definition: struct_scip.h:63
SCIP_RETCODE SCIPdigraphCopy(SCIP_DIGRAPH **targetdigraph, SCIP_DIGRAPH *sourcedigraph, BMS_BLKMEM *targetblkmem)
Definition: misc.c:7356
SCIP_RETCODE SCIPboolarrayFree(SCIP_BOOLARRAY **boolarray)
Definition: misc.c:4751
public methods for message output
#define SCIP_Real
Definition: def.h:163
SCIP_RETCODE SCIPcreateBoolarray(SCIP *scip, SCIP_BOOLARRAY **boolarray)
SCIP_RETCODE SCIPrealarrayExtend(SCIP_REALARRAY *realarray, int arraygrowinit, SCIP_Real arraygrowfac, int minidx, int maxidx)
Definition: misc.c:4028
int SCIPgetPtrarrayMinIdx(SCIP *scip, SCIP_PTRARRAY *ptrarray)
SCIP_RETCODE SCIPextendPtrarray(SCIP *scip, SCIP_PTRARRAY *ptrarray, int minidx, int maxidx)
public methods for data structures
SCIP_RETCODE SCIPdisjointsetCreate(SCIP_DISJOINTSET **djset, BMS_BLKMEM *blkmem, int ncomponents)
Definition: misc.c:10957
int SCIPgetIntarrayMaxIdx(SCIP *scip, SCIP_INTARRAY *intarray)
SCIP_RETCODE SCIPrealarraySetVal(SCIP_REALARRAY *realarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, SCIP_Real val)
Definition: misc.c:4235
SCIP_RETCODE SCIPintarrayClear(SCIP_INTARRAY *intarray)
Definition: misc.c:4554
#define nnodes
Definition: gastrans.c:65
SCIP_RETCODE SCIPboolarrayExtend(SCIP_BOOLARRAY *boolarray, int arraygrowinit, SCIP_Real arraygrowfac, int minidx, int maxidx)
Definition: misc.c:4765
SCIP_RETCODE SCIPfreeBoolarray(SCIP *scip, SCIP_BOOLARRAY **boolarray)
int SCIPgetBoolarrayMinIdx(SCIP *scip, SCIP_BOOLARRAY *boolarray)
SCIP_RETCODE SCIPextendBoolarray(SCIP *scip, SCIP_BOOLARRAY *boolarray, int minidx, int maxidx)
SCIP_RETCODE SCIPptrarrayCreate(SCIP_PTRARRAY **ptrarray, BMS_BLKMEM *blkmem)
Definition: misc.c:5063
datastructures for global SCIP settings
SCIP_RETCODE SCIPintarrayCreate(SCIP_INTARRAY **intarray, BMS_BLKMEM *blkmem)
Definition: misc.c:4342
int SCIPgetRealarrayMinIdx(SCIP *scip, SCIP_REALARRAY *realarray)
SCIP_RETCODE SCIPclearBoolarray(SCIP *scip, SCIP_BOOLARRAY *boolarray)
SCIP_RETCODE SCIPrealarrayClear(SCIP_REALARRAY *realarray)
Definition: misc.c:4183