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