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-2019 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 scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file scip_datastructures.c
17  * @brief public methods for data structures
18  * @author Tobias Achterberg
19  * @author Timo Berthold
20  * @author Gerald Gamrath
21  * @author Robert Lion Gottwald
22  * @author Stefan Heinz
23  * @author Gregor Hendel
24  * @author Thorsten Koch
25  * @author Alexander Martin
26  * @author Marc Pfetsch
27  * @author Michael Winkler
28  * @author Kati Wolter
29  *
30  * @todo check all SCIP_STAGE_* switches, and include the new stages TRANSFORMED and INITSOLVE
31  */
32 
33 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
34 
35 #include "scip/misc.h"
36 #include "scip/pub_message.h"
38 #include "scip/scip_mem.h"
39 #include "scip/struct_mem.h"
40 #include "scip/struct_scip.h"
41 #include "scip/struct_set.h"
42 
43 /** creates a dynamic array of real values
44  *
45  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
46  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
47  */
49  SCIP* scip, /**< SCIP data structure */
50  SCIP_REALARRAY** realarray /**< pointer to store the real array */
51  )
52 {
53  assert(scip != NULL);
54 
55  SCIP_CALL( SCIPrealarrayCreate(realarray, SCIPblkmem(scip)) );
56 
57  return SCIP_OKAY;
58 }
59 
60 /** frees a dynamic array of real values
61  *
62  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
63  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
64  */
66  SCIP* scip, /**< SCIP data structure */
67  SCIP_REALARRAY** realarray /**< pointer to the real array */
68  )
69 {
70  assert(scip != NULL);
71 
72  SCIP_CALL( SCIPrealarrayFree(realarray) );
73 
74  return SCIP_OKAY;
75 }
76 
77 /** extends dynamic array to be able to store indices from minidx to maxidx
78  *
79  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
80  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
81  */
83  SCIP* scip, /**< SCIP data structure */
84  SCIP_REALARRAY* realarray, /**< dynamic real array */
85  int minidx, /**< smallest index to allocate storage for */
86  int maxidx /**< largest index to allocate storage for */
87  )
88 {
89  assert(scip != NULL);
90 
91  SCIP_CALL( SCIPrealarrayExtend(realarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, minidx, maxidx) );
92 
93  return SCIP_OKAY;
94 }
95 
96 /** clears a dynamic real array
97  *
98  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
99  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
100  */
102  SCIP* scip, /**< SCIP data structure */
103  SCIP_REALARRAY* realarray /**< dynamic real array */
104  )
105 {
106  assert(scip != NULL);
107 
108  SCIP_CALL( SCIPrealarrayClear(realarray) );
109 
110  return SCIP_OKAY;
111 }
112 
113 /** gets value of entry in dynamic array
114  *
115  * @return value of entry in dynamic array
116  */
118  SCIP* scip, /**< SCIP data structure */
119  SCIP_REALARRAY* realarray, /**< dynamic real array */
120  int idx /**< array index to get value for */
121  )
122 {
123  assert(scip != NULL);
124 
125  return SCIPrealarrayGetVal(realarray, idx);
126 }
127 
128 /** sets value of entry in dynamic array
129  *
130  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
131  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
132  */
134  SCIP* scip, /**< SCIP data structure */
135  SCIP_REALARRAY* realarray, /**< dynamic real array */
136  int idx, /**< array index to set value for */
137  SCIP_Real val /**< value to set array index to */
138  )
139 {
140  assert(scip != NULL);
141 
142  SCIP_CALL( SCIPrealarraySetVal(realarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, idx, val) );
143 
144  return SCIP_OKAY;
145 }
146 
147 /** increases value of entry in dynamic array
148  *
149  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
150  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
151  */
153  SCIP* scip, /**< SCIP data structure */
154  SCIP_REALARRAY* realarray, /**< dynamic real array */
155  int idx, /**< array index to increase value for */
156  SCIP_Real incval /**< value to increase array index */
157  )
158 {
159  assert(scip != NULL);
160 
161  SCIP_CALL( SCIPrealarrayIncVal(realarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, idx, incval) );
162 
163  return SCIP_OKAY;
164 }
165 
166 /** returns the minimal index of all stored non-zero elements
167  *
168  * @return the minimal index of all stored non-zero elements
169  */
171  SCIP* scip, /**< SCIP data structure */
172  SCIP_REALARRAY* realarray /**< dynamic real array */
173  )
174 {
175  assert(scip != NULL);
176 
177  return SCIPrealarrayGetMinIdx(realarray);
178 }
179 
180 /** returns the maximal index of all stored non-zero elements
181  *
182  * @return the maximal index of all stored non-zero elements
183  */
185  SCIP* scip, /**< SCIP data structure */
186  SCIP_REALARRAY* realarray /**< dynamic real array */
187  )
188 {
189  assert(scip != NULL);
190 
191  return SCIPrealarrayGetMaxIdx(realarray);
192 }
193 
194 /** creates a dynamic array of int values
195  *
196  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
197  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
198  */
200  SCIP* scip, /**< SCIP data structure */
201  SCIP_INTARRAY** intarray /**< pointer to store the int array */
202  )
203 {
204  assert(scip != NULL);
205 
206  SCIP_CALL( SCIPintarrayCreate(intarray, SCIPblkmem(scip)) );
207 
208  return SCIP_OKAY;
209 }
210 
211 /** frees a dynamic array of int values
212  *
213  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
214  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
215  */
217  SCIP* scip, /**< SCIP data structure */
218  SCIP_INTARRAY** intarray /**< pointer to the int array */
219  )
220 {
221  assert(scip != NULL);
222 
223  SCIP_CALL( SCIPintarrayFree(intarray) );
224 
225  return SCIP_OKAY;
226 }
227 
228 /** extends dynamic array to be able to store indices from minidx to maxidx
229  *
230  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
231  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
232  */
234  SCIP* scip, /**< SCIP data structure */
235  SCIP_INTARRAY* intarray, /**< dynamic int array */
236  int minidx, /**< smallest index to allocate storage for */
237  int maxidx /**< largest index to allocate storage for */
238  )
239 {
240  assert(scip != NULL);
241 
242  SCIP_CALL( SCIPintarrayExtend(intarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, minidx, maxidx) );
243 
244  return SCIP_OKAY;
245 }
246 
247 /** clears a dynamic int array
248  *
249  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
250  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
251  */
253  SCIP* scip, /**< SCIP data structure */
254  SCIP_INTARRAY* intarray /**< dynamic int array */
255  )
256 {
257  assert(scip != NULL);
258 
259  SCIP_CALL( SCIPintarrayClear(intarray) );
260 
261  return SCIP_OKAY;
262 }
263 
264 /** gets value of entry in dynamic array
265  *
266  * @return value of entry in dynamic array
267  */
269  SCIP* scip, /**< SCIP data structure */
270  SCIP_INTARRAY* intarray, /**< dynamic int array */
271  int idx /**< array index to get value for */
272  )
273 {
274  assert(scip != NULL);
275 
276  return SCIPintarrayGetVal(intarray, idx);
277 }
278 
279 /** sets value of entry in dynamic array
280  *
281  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
282  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
283  */
285  SCIP* scip, /**< SCIP data structure */
286  SCIP_INTARRAY* intarray, /**< dynamic int array */
287  int idx, /**< array index to set value for */
288  int val /**< value to set array index to */
289  )
290 {
291  assert(scip != NULL);
292 
293  SCIP_CALL( SCIPintarraySetVal(intarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, idx, val) );
294 
295  return SCIP_OKAY;
296 }
297 
298 /** increases value of entry in dynamic array
299  *
300  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
301  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
302  */
304  SCIP* scip, /**< SCIP data structure */
305  SCIP_INTARRAY* intarray, /**< dynamic int array */
306  int idx, /**< array index to increase value for */
307  int incval /**< value to increase array index */
308  )
309 {
310  assert(scip != NULL);
311 
312  SCIP_CALL( SCIPintarrayIncVal(intarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, idx, incval) );
313 
314  return SCIP_OKAY;
315 }
316 
317 /** returns the minimal index of all stored non-zero elements
318  *
319  * @return the minimal index of all stored non-zero elements
320  */
322  SCIP* scip, /**< SCIP data structure */
323  SCIP_INTARRAY* intarray /**< dynamic int array */
324  )
325 {
326  assert(scip != NULL);
327 
328  return SCIPintarrayGetMinIdx(intarray);
329 }
330 
331 /** returns the maximal index of all stored non-zero elements
332  *
333  * @return the maximal index of all stored non-zero elements
334  */
336  SCIP* scip, /**< SCIP data structure */
337  SCIP_INTARRAY* intarray /**< dynamic int array */
338  )
339 {
340  assert(scip != NULL);
341 
342  return SCIPintarrayGetMaxIdx(intarray);
343 }
344 
345 /** creates a dynamic array of bool values
346  *
347  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
348  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
349  */
351  SCIP* scip, /**< SCIP data structure */
352  SCIP_BOOLARRAY** boolarray /**< pointer to store the bool array */
353  )
354 {
355  assert(scip != NULL);
356 
357  SCIP_CALL( SCIPboolarrayCreate(boolarray, SCIPblkmem(scip)) );
358 
359  return SCIP_OKAY;
360 }
361 
362 /** frees a dynamic array of bool values
363  *
364  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
365  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
366  */
368  SCIP* scip, /**< SCIP data structure */
369  SCIP_BOOLARRAY** boolarray /**< pointer to the bool array */
370  )
371 {
372  assert(scip != NULL);
373 
374  SCIP_CALL( SCIPboolarrayFree(boolarray) );
375 
376  return SCIP_OKAY;
377 }
378 
379 /** extends dynamic array to be able to store indices from minidx to maxidx
380  *
381  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
382  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
383  */
385  SCIP* scip, /**< SCIP data structure */
386  SCIP_BOOLARRAY* boolarray, /**< dynamic bool array */
387  int minidx, /**< smallest index to allocate storage for */
388  int maxidx /**< largest index to allocate storage for */
389  )
390 {
391  assert(scip != NULL);
392 
393  SCIP_CALL( SCIPboolarrayExtend(boolarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, minidx, maxidx) );
394 
395  return SCIP_OKAY;
396 }
397 
398 /** clears a dynamic bool array
399  *
400  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
401  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
402  */
404  SCIP* scip, /**< SCIP data structure */
405  SCIP_BOOLARRAY* boolarray /**< dynamic bool array */
406  )
407 {
408  assert(scip != NULL);
409 
410  SCIP_CALL( SCIPboolarrayClear(boolarray) );
411 
412  return SCIP_OKAY;
413 }
414 
415 /** gets value of entry in dynamic array
416  *
417  * @return value of entry in dynamic array at position idx
418  */
420  SCIP* scip, /**< SCIP data structure */
421  SCIP_BOOLARRAY* boolarray, /**< dynamic bool array */
422  int idx /**< array index to get value for */
423  )
424 {
425  assert(scip != NULL);
426 
427  return SCIPboolarrayGetVal(boolarray, idx);
428 }
429 
430 /** sets value of entry in dynamic array
431  *
432  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
433  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
434  */
436  SCIP* scip, /**< SCIP data structure */
437  SCIP_BOOLARRAY* boolarray, /**< dynamic bool array */
438  int idx, /**< array index to set value for */
439  SCIP_Bool val /**< value to set array index to */
440  )
441 {
442  assert(scip != NULL);
443 
444  SCIP_CALL( SCIPboolarraySetVal(boolarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, idx, val) );
445 
446  return SCIP_OKAY;
447 }
448 
449 /** returns the minimal index of all stored non-zero elements
450  *
451  * @return the minimal index of all stored non-zero elements
452  */
454  SCIP* scip, /**< SCIP data structure */
455  SCIP_BOOLARRAY* boolarray /**< dynamic bool array */
456  )
457 {
458  assert(scip != NULL);
459 
460  return SCIPboolarrayGetMinIdx(boolarray);
461 }
462 
463 /** returns the maximal index of all stored non-zero elements
464  *
465  * @return the maximal index of all stored non-zero elements
466  */
468  SCIP* scip, /**< SCIP data structure */
469  SCIP_BOOLARRAY* boolarray /**< dynamic bool array */
470  )
471 {
472  assert(scip != NULL);
473 
474  return SCIPboolarrayGetMaxIdx(boolarray);
475 }
476 
477 /** creates a dynamic array of pointers
478  *
479  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
480  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
481  */
483  SCIP* scip, /**< SCIP data structure */
484  SCIP_PTRARRAY** ptrarray /**< pointer to store the int array */
485  )
486 {
487  assert(scip != NULL);
488 
489  SCIP_CALL( SCIPptrarrayCreate(ptrarray, SCIPblkmem(scip)) );
490 
491  return SCIP_OKAY;
492 }
493 
494 /** frees a dynamic array of pointers
495  *
496  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
497  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
498  */
500  SCIP* scip, /**< SCIP data structure */
501  SCIP_PTRARRAY** ptrarray /**< pointer to the int array */
502  )
503 {
504  assert(scip != NULL);
505 
506  SCIP_CALL( SCIPptrarrayFree(ptrarray) );
507 
508  return SCIP_OKAY;
509 }
510 
511 /** extends dynamic array to be able to store indices from minidx to maxidx
512  *
513  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
514  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
515  */
517  SCIP* scip, /**< SCIP data structure */
518  SCIP_PTRARRAY* ptrarray, /**< dynamic int array */
519  int minidx, /**< smallest index to allocate storage for */
520  int maxidx /**< largest index to allocate storage for */
521  )
522 {
523  assert(scip != NULL);
524 
525  SCIP_CALL( SCIPptrarrayExtend(ptrarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, minidx, maxidx) );
526 
527  return SCIP_OKAY;
528 }
529 
530 /** clears a dynamic pointer array
531  *
532  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
533  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
534  */
536  SCIP* scip, /**< SCIP data structure */
537  SCIP_PTRARRAY* ptrarray /**< dynamic int array */
538  )
539 {
540  assert(scip != NULL);
541 
542  SCIP_CALL( SCIPptrarrayClear(ptrarray) );
543 
544  return SCIP_OKAY;
545 }
546 
547 /** gets value of entry in dynamic array */
549  SCIP* scip, /**< SCIP data structure */
550  SCIP_PTRARRAY* ptrarray, /**< dynamic int array */
551  int idx /**< array index to get value for */
552  )
553 {
554  assert(scip != NULL);
555 
556  return SCIPptrarrayGetVal(ptrarray, idx);
557 }
558 
559 /** sets value of entry in dynamic array
560  *
561  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
562  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
563  */
565  SCIP* scip, /**< SCIP data structure */
566  SCIP_PTRARRAY* ptrarray, /**< dynamic int array */
567  int idx, /**< array index to set value for */
568  void* val /**< value to set array index to */
569  )
570 {
571  assert(scip != NULL);
572 
573  SCIP_CALL( SCIPptrarraySetVal(ptrarray, scip->set->mem_arraygrowinit, scip->set->mem_arraygrowfac, idx, val) );
574 
575  return SCIP_OKAY;
576 }
577 
578 /** returns the minimal index of all stored non-zero elements
579  *
580  * @return the minimal index of all stored non-zero elements
581  */
583  SCIP* scip, /**< SCIP data structure */
584  SCIP_PTRARRAY* ptrarray /**< dynamic ptr array */
585  )
586 {
587  assert(scip != NULL);
588 
589  return SCIPptrarrayGetMinIdx(ptrarray);
590 }
591 
592 /** returns the maximal index of all stored non-zero elements
593  *
594  * @return the maximal index of all stored non-zero elements
595  */
597  SCIP* scip, /**< SCIP data structure */
598  SCIP_PTRARRAY* ptrarray /**< dynamic ptr array */
599  )
600 {
601  assert(scip != NULL);
602 
603  return SCIPptrarrayGetMaxIdx(ptrarray);
604 }
605 
606 /** creates directed graph structure */
608  SCIP* scip, /**< SCIP data structure */
609  SCIP_DIGRAPH** digraph, /**< pointer to store the created directed graph */
610  int nnodes /**< number of nodes */
611  )
612 {
613  assert(scip != NULL);
614  assert(digraph != NULL);
615 
616  SCIP_CALL( SCIPdigraphCreate(digraph, scip->mem->probmem, nnodes) );
617 
618  return SCIP_OKAY;
619 }
620 
621 /** copies directed graph structure
622  *
623  * The copying procedure uses the memory of the passed SCIP instance. The user must ensure that the digraph lives
624  * as most as long as the SCIP instance.
625  *
626  * @note The data in nodedata is copied verbatim. This possibly has to be adapted by the user.
627  */
629  SCIP* scip, /**< SCIP data structure */
630  SCIP_DIGRAPH** targetdigraph, /**< pointer to store the copied directed graph */
631  SCIP_DIGRAPH* sourcedigraph /**< source directed graph */
632  )
633 {
634  assert(scip != NULL);
635  assert(sourcedigraph != NULL);
636  assert(targetdigraph != NULL);
637 
638  SCIP_CALL( SCIPdigraphCopy(targetdigraph, sourcedigraph, scip->mem->probmem) );
639 
640  return SCIP_OKAY;
641 }
642 
643 /** creates a disjoint set (union find) structure \p uf for \p ncomponents many components (of size one) */
645  SCIP* scip, /**< SCIP data structure */
646  SCIP_DISJOINTSET** djset, /**< disjoint set (union find) data structure */
647  int ncomponents /**< number of components */
648  )
649 {
650  assert(scip != NULL);
651  assert(djset != NULL);
652 
653  SCIP_CALL( SCIPdisjointsetCreate(djset, scip->mem->probmem, ncomponents) );
654 
655  return SCIP_OKAY;
656 }
657 
658 /** frees the disjoint set (union find) data structure */
660  SCIP* scip, /**< SCIP data structure */
661  SCIP_DISJOINTSET** djset /**< disjoint set (union find) data structure */
662  )
663 {
664  assert(scip != NULL);
665 
666  SCIPdisjointsetFree(djset, scip->mem->probmem);
667 }
int SCIPrealarrayGetMaxIdx(SCIP_REALARRAY *realarray)
Definition: misc.c:4209
#define NULL
Definition: def.h:253
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:4551
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:4563
SCIP_RETCODE SCIPrealarrayCreate(SCIP_REALARRAY **realarray, BMS_BLKMEM *blkmem)
Definition: misc.c:3847
SCIP_Bool SCIPboolarrayGetVal(SCIP_BOOLARRAY *boolarray, int idx)
Definition: misc.c:4830
SCIP_RETCODE SCIPcreateIntarray(SCIP *scip, SCIP_INTARRAY **intarray)
int SCIPintarrayGetVal(SCIP_INTARRAY *intarray, int idx)
Definition: misc.c:4462
void * SCIPptrarrayGetVal(SCIP_PTRARRAY *ptrarray, int idx)
Definition: misc.c:5183
int SCIPboolarrayGetMaxIdx(SCIP_BOOLARRAY *boolarray)
Definition: misc.c:4929
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
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:4997
SCIP_RETCODE SCIPincRealarrayVal(SCIP *scip, SCIP_REALARRAY *realarray, int idx, SCIP_Real incval)
SCIP_Real mem_arraygrowfac
Definition: struct_set.h:349
SCIP_RETCODE SCIPclearRealarray(SCIP *scip, SCIP_REALARRAY *realarray)
int SCIPptrarrayGetMinIdx(SCIP_PTRARRAY *ptrarray)
Definition: misc.c:5272
SCIP_RETCODE SCIPcreateDisjointset(SCIP *scip, SCIP_DISJOINTSET **djset, int ncomponents)
int SCIPrealarrayGetMinIdx(SCIP_REALARRAY *realarray)
Definition: misc.c:4199
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:4851
void SCIPfreeDisjointset(SCIP *scip, SCIP_DISJOINTSET **djset)
SCIP_RETCODE SCIPintarrayFree(SCIP_INTARRAY **intarray)
Definition: misc.c:4262
SCIP_RETCODE SCIPrealarrayIncVal(SCIP_REALARRAY *realarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, SCIP_Real incval)
Definition: misc.c:4181
SCIP_MEM * mem
Definition: struct_scip.h:61
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:10734
SCIP_RETCODE SCIPboolarrayCreate(SCIP_BOOLARRAY **boolarray, BMS_BLKMEM *blkmem)
Definition: misc.c:4584
SCIP_RETCODE SCIPextendIntarray(SCIP *scip, SCIP_INTARRAY *intarray, int minidx, int maxidx)
SCIP_Real SCIPrealarrayGetVal(SCIP_REALARRAY *realarray, int idx)
Definition: misc.c:4091
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
Definition: scip_mem.c:47
int SCIPintarrayGetMaxIdx(SCIP_INTARRAY *intarray)
Definition: misc.c:4573
SCIP_RETCODE SCIPdigraphCreate(SCIP_DIGRAPH **digraph, BMS_BLKMEM *blkmem, int nnodes)
Definition: misc.c:7136
internal miscellaneous methods
SCIP_RETCODE SCIPboolarrayClear(SCIP_BOOLARRAY *boolarray)
Definition: misc.c:4799
int SCIPptrarrayGetMaxIdx(SCIP_PTRARRAY *ptrarray)
Definition: misc.c:5282
#define SCIP_CALL(x)
Definition: def.h:365
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:4483
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:352
SCIP_RETCODE SCIPrealarrayFree(SCIP_REALARRAY **realarray)
Definition: misc.c:3891
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:4919
void * SCIPgetPtrarrayVal(SCIP *scip, SCIP_PTRARRAY *ptrarray, int idx)
SCIP_RETCODE SCIPptrarrayClear(SCIP_PTRARRAY *ptrarray)
Definition: misc.c:5152
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:4983
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:4276
SCIP_RETCODE SCIPptrarraySetVal(SCIP_PTRARRAY *ptrarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, void *val)
Definition: misc.c:5204
SCIP_RETCODE SCIPfreePtrarray(SCIP *scip, SCIP_PTRARRAY **ptrarray)
SCIP_SET * set
Definition: struct_scip.h:62
SCIP_RETCODE SCIPdigraphCopy(SCIP_DIGRAPH **targetdigraph, SCIP_DIGRAPH *sourcedigraph, BMS_BLKMEM *targetblkmem)
Definition: misc.c:7208
SCIP_RETCODE SCIPboolarrayFree(SCIP_BOOLARRAY **boolarray)
Definition: misc.c:4628
public methods for message output
#define SCIP_Real
Definition: def.h:164
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:3905
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:10616
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:4112
SCIP_RETCODE SCIPintarrayClear(SCIP_INTARRAY *intarray)
Definition: misc.c:4431
#define nnodes
Definition: gastrans.c:65
SCIP_RETCODE SCIPboolarrayExtend(SCIP_BOOLARRAY *boolarray, int arraygrowinit, SCIP_Real arraygrowfac, int minidx, int maxidx)
Definition: misc.c:4642
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:4940
datastructures for global SCIP settings
SCIP_RETCODE SCIPintarrayCreate(SCIP_INTARRAY **intarray, BMS_BLKMEM *blkmem)
Definition: misc.c:4219
int SCIPgetRealarrayMinIdx(SCIP *scip, SCIP_REALARRAY *realarray)
SCIP_RETCODE SCIPclearBoolarray(SCIP *scip, SCIP_BOOLARRAY *boolarray)
SCIP_RETCODE SCIPrealarrayClear(SCIP_REALARRAY *realarray)
Definition: misc.c:4060