Detailed Description
internal miscellaneous methods
Definition in file misc.h.
#include "scip/def.h"#include "blockmemshell/memory.h"#include "scip/type_retcode.h"#include "scip/type_set.h"#include "scip/type_misc.h"#include "scip/pub_misc.h"Go to the source code of this file.
Function Documentation
◆ SCIPrealarrayCreate()
| SCIP_RETCODE SCIPrealarrayCreate | ( | SCIP_REALARRAY ** | realarray, |
| BMS_BLKMEM * | blkmem | ||
| ) |
creates a dynamic array of real values
- Parameters
-
realarray pointer to store the real array blkmem block memory
Definition at line 4032 of file misc.c.
References BMSallocBlockMemory, NULL, SCIP_ALLOC, and SCIP_OKAY.
Referenced by SCIPcreateRealarray(), SCIPrealarrayCopy(), SCIPsolCreate(), SCIPsolCreateOriginal(), SCIPsolCreatePartial(), and SCIPsolCreateUnknown().
◆ SCIPrealarrayCopy()
| SCIP_RETCODE SCIPrealarrayCopy | ( | SCIP_REALARRAY ** | realarray, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_REALARRAY * | sourcerealarray | ||
| ) |
creates a copy of a dynamic array of real values
- Parameters
-
realarray pointer to store the copied real array blkmem block memory sourcerealarray dynamic real array to copy
Definition at line 4052 of file misc.c.
References BMSduplicateBlockMemoryArray, SCIP_RealArray::firstidx, SCIP_RealArray::maxusedidx, SCIP_RealArray::minusedidx, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPrealarrayCreate(), SCIP_RealArray::vals, and SCIP_RealArray::valssize.
Referenced by SCIPsolCopy().
◆ SCIPrealarrayFree()
| SCIP_RETCODE SCIPrealarrayFree | ( | SCIP_REALARRAY ** | realarray | ) |
frees a dynamic array of real values
- Parameters
-
realarray pointer to the real array
Definition at line 4076 of file misc.c.
References BMSfreeBlockMemory, BMSfreeBlockMemoryArrayNull, NULL, and SCIP_OKAY.
Referenced by SCIPfreeRealarray(), and SCIPsolFree().
◆ SCIPrealarrayExtend()
| SCIP_RETCODE SCIPrealarrayExtend | ( | SCIP_REALARRAY * | realarray, |
| int | arraygrowinit, | ||
| SCIP_Real | arraygrowfac, | ||
| int | minidx, | ||
| int | maxidx | ||
| ) |
extends dynamic array to be able to store indices from minidx to maxidx
- Parameters
-
realarray dynamic real array arraygrowinit initial size of array arraygrowfac growing factor of array minidx smallest index to allocate storage for maxidx largest index to allocate storage for
Definition at line 4090 of file misc.c.
References SCIP_RealArray::blkmem, BMSallocBlockMemoryArray, BMScopyMemoryArray, BMSfreeBlockMemoryArrayNull, calcGrowSize(), SCIP_RealArray::firstidx, MAX, SCIP_RealArray::maxusedidx, MIN, SCIP_RealArray::minusedidx, NULL, SCIP_ALLOC, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIP_RealArray::vals, and SCIP_RealArray::valssize.
Referenced by SCIPextendRealarray(), SCIPlpSumRows(), and SCIPrealarraySetVal().
◆ SCIPrealarrayClear()
| SCIP_RETCODE SCIPrealarrayClear | ( | SCIP_REALARRAY * | realarray | ) |
clears a dynamic real array
- Parameters
-
realarray dynamic real array
Definition at line 4245 of file misc.c.
References BMSclearMemoryArray, SCIP_RealArray::firstidx, SCIP_RealArray::maxusedidx, SCIP_RealArray::minusedidx, NULL, SCIP_OKAY, SCIPdebugMessage, SCIP_RealArray::vals, and SCIP_RealArray::valssize.
Referenced by SCIPclearRealarray(), and SCIPlpSumRows().
◆ SCIPrealarrayGetVal()
| SCIP_Real SCIPrealarrayGetVal | ( | SCIP_REALARRAY * | realarray, |
| int | idx | ||
| ) |
gets value of entry in dynamic array
- Parameters
-
realarray dynamic real array idx array index to get value for
Definition at line 4276 of file misc.c.
References SCIP_RealArray::firstidx, SCIP_RealArray::maxusedidx, NULL, SCIP_RealArray::vals, and SCIP_RealArray::valssize.
Referenced by SCIPgetRealarrayVal(), SCIPrealarrayIncVal(), solGetArrayVal(), and solIncArrayVal().
◆ SCIPrealarraySetVal()
| SCIP_RETCODE SCIPrealarraySetVal | ( | SCIP_REALARRAY * | realarray, |
| int | arraygrowinit, | ||
| SCIP_Real | arraygrowfac, | ||
| int | idx, | ||
| SCIP_Real | val | ||
| ) |
sets value of entry in dynamic array
- Parameters
-
realarray dynamic real array arraygrowinit initial size of array arraygrowfac growing factor of array idx array index to set value for val value to set array index to
Definition at line 4297 of file misc.c.
References SCIP_RealArray::firstidx, MAX, SCIP_RealArray::maxusedidx, MIN, SCIP_RealArray::minusedidx, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPrealarrayExtend(), SCIP_RealArray::vals, and SCIP_RealArray::valssize.
Referenced by SCIPrealarrayIncVal(), SCIPsetRealarrayVal(), SCIPsolMarkPartial(), solIncArrayVal(), and solSetArrayVal().
◆ SCIPrealarrayIncVal()
| SCIP_RETCODE SCIPrealarrayIncVal | ( | SCIP_REALARRAY * | realarray, |
| int | arraygrowinit, | ||
| SCIP_Real | arraygrowfac, | ||
| int | idx, | ||
| SCIP_Real | incval | ||
| ) |
increases value of entry in dynamic array
- Parameters
-
realarray dynamic real array arraygrowinit initial size of array arraygrowfac growing factor of array idx array index to increase value for incval value to increase array index
Definition at line 4366 of file misc.c.
References SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPrealarrayGetVal(), and SCIPrealarraySetVal().
Referenced by SCIPincRealarrayVal(), SCIPlpSumRows(), and solIncArrayVal().
◆ SCIPrealarrayGetMinIdx()
| int SCIPrealarrayGetMinIdx | ( | SCIP_REALARRAY * | realarray | ) |
returns the minimal index of all stored non-zero elements
- Parameters
-
realarray dynamic real array
Definition at line 4384 of file misc.c.
References SCIP_RealArray::minusedidx, and NULL.
Referenced by SCIPgetRealarrayMinIdx().
◆ SCIPrealarrayGetMaxIdx()
| int SCIPrealarrayGetMaxIdx | ( | SCIP_REALARRAY * | realarray | ) |
returns the maximal index of all stored non-zero elements
- Parameters
-
realarray dynamic real array
Definition at line 4394 of file misc.c.
References SCIP_RealArray::maxusedidx, and NULL.
Referenced by SCIPgetRealarrayMaxIdx().
◆ SCIPintarrayCreate()
| SCIP_RETCODE SCIPintarrayCreate | ( | SCIP_INTARRAY ** | intarray, |
| BMS_BLKMEM * | blkmem | ||
| ) |
creates a dynamic array of int values
- Parameters
-
intarray pointer to store the int array blkmem block memory
Definition at line 4404 of file misc.c.
References BMSallocBlockMemory, NULL, SCIP_ALLOC, and SCIP_OKAY.
Referenced by SCIPcreateIntarray(), and SCIPintarrayCopy().
◆ SCIPintarrayCopy()
| SCIP_RETCODE SCIPintarrayCopy | ( | SCIP_INTARRAY ** | intarray, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_INTARRAY * | sourceintarray | ||
| ) |
creates a copy of a dynamic array of int values
- Parameters
-
intarray pointer to store the copied int array blkmem block memory sourceintarray dynamic int array to copy
Definition at line 4424 of file misc.c.
References BMSduplicateBlockMemoryArray, SCIP_IntArray::firstidx, SCIP_IntArray::maxusedidx, SCIP_IntArray::minusedidx, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPintarrayCreate(), SCIP_IntArray::vals, and SCIP_IntArray::valssize.
◆ SCIPintarrayFree()
| SCIP_RETCODE SCIPintarrayFree | ( | SCIP_INTARRAY ** | intarray | ) |
frees a dynamic array of int values
- Parameters
-
intarray pointer to the int array
Definition at line 4447 of file misc.c.
References BMSfreeBlockMemory, BMSfreeBlockMemoryArrayNull, NULL, and SCIP_OKAY.
Referenced by SCIPfreeIntarray().
◆ SCIPintarrayExtend()
| SCIP_RETCODE SCIPintarrayExtend | ( | SCIP_INTARRAY * | intarray, |
| int | arraygrowinit, | ||
| SCIP_Real | arraygrowfac, | ||
| int | minidx, | ||
| int | maxidx | ||
| ) |
extends dynamic array to be able to store indices from minidx to maxidx
- Parameters
-
intarray dynamic int array arraygrowinit initial size of array arraygrowfac growing factor of array minidx smallest index to allocate storage for maxidx largest index to allocate storage for
Definition at line 4461 of file misc.c.
References SCIP_IntArray::blkmem, BMSallocBlockMemoryArray, BMScopyMemoryArray, BMSfreeBlockMemoryArrayNull, calcGrowSize(), SCIP_IntArray::firstidx, MAX, SCIP_IntArray::maxusedidx, MIN, SCIP_IntArray::minusedidx, NULL, SCIP_ALLOC, SCIP_OKAY, SCIPdebugMessage, SCIP_IntArray::vals, and SCIP_IntArray::valssize.
Referenced by SCIPextendIntarray(), and SCIPintarraySetVal().
◆ SCIPintarrayClear()
| SCIP_RETCODE SCIPintarrayClear | ( | SCIP_INTARRAY * | intarray | ) |
clears a dynamic int array
- Parameters
-
intarray dynamic int array
Definition at line 4616 of file misc.c.
References BMSclearMemoryArray, SCIP_IntArray::firstidx, SCIP_IntArray::maxusedidx, SCIP_IntArray::minusedidx, NULL, SCIP_OKAY, SCIPdebugMessage, SCIP_IntArray::vals, and SCIP_IntArray::valssize.
Referenced by SCIPclearIntarray().
◆ SCIPintarrayGetVal()
| int SCIPintarrayGetVal | ( | SCIP_INTARRAY * | intarray, |
| int | idx | ||
| ) |
gets value of entry in dynamic array
- Parameters
-
intarray dynamic int array idx array index to get value for
Definition at line 4647 of file misc.c.
References SCIP_IntArray::firstidx, SCIP_IntArray::maxusedidx, NULL, SCIP_IntArray::vals, and SCIP_IntArray::valssize.
Referenced by SCIPgetIntarrayVal(), and SCIPintarrayIncVal().
◆ SCIPintarraySetVal()
| SCIP_RETCODE SCIPintarraySetVal | ( | SCIP_INTARRAY * | intarray, |
| int | arraygrowinit, | ||
| SCIP_Real | arraygrowfac, | ||
| int | idx, | ||
| int | val | ||
| ) |
sets value of entry in dynamic array
- Parameters
-
intarray dynamic int array arraygrowinit initial size of array arraygrowfac growing factor of array idx array index to set value for val value to set array index to
Definition at line 4668 of file misc.c.
References SCIP_IntArray::firstidx, MAX, SCIP_IntArray::maxusedidx, MIN, SCIP_IntArray::minusedidx, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPintarrayExtend(), SCIP_IntArray::vals, and SCIP_IntArray::valssize.
Referenced by SCIPintarrayIncVal(), and SCIPsetIntarrayVal().
◆ SCIPintarrayIncVal()
| SCIP_RETCODE SCIPintarrayIncVal | ( | SCIP_INTARRAY * | intarray, |
| int | arraygrowinit, | ||
| SCIP_Real | arraygrowfac, | ||
| int | idx, | ||
| int | incval | ||
| ) |
increases value of entry in dynamic array
- Parameters
-
intarray dynamic int array arraygrowinit initial size of array arraygrowfac growing factor of array idx array index to increase value for incval value to increase array index
Definition at line 4736 of file misc.c.
References SCIPintarrayGetVal(), and SCIPintarraySetVal().
Referenced by SCIPincIntarrayVal().
◆ SCIPintarrayGetMinIdx()
| int SCIPintarrayGetMinIdx | ( | SCIP_INTARRAY * | intarray | ) |
returns the minimal index of all stored non-zero elements
- Parameters
-
intarray dynamic int array
Definition at line 4748 of file misc.c.
References SCIP_IntArray::minusedidx, and NULL.
Referenced by SCIPgetIntarrayMinIdx().
◆ SCIPintarrayGetMaxIdx()
| int SCIPintarrayGetMaxIdx | ( | SCIP_INTARRAY * | intarray | ) |
returns the maximal index of all stored non-zero elements
- Parameters
-
intarray dynamic int array
Definition at line 4758 of file misc.c.
References SCIP_IntArray::maxusedidx, and NULL.
Referenced by SCIPgetIntarrayMaxIdx().
◆ SCIPboolarrayCreate()
| SCIP_RETCODE SCIPboolarrayCreate | ( | SCIP_BOOLARRAY ** | boolarray, |
| BMS_BLKMEM * | blkmem | ||
| ) |
creates a dynamic array of bool values
- Parameters
-
boolarray pointer to store the bool array blkmem block memory
Definition at line 4769 of file misc.c.
References BMSallocBlockMemory, NULL, SCIP_ALLOC, and SCIP_OKAY.
Referenced by SCIPboolarrayCopy(), SCIPcreateBoolarray(), SCIPsolCreate(), SCIPsolCreateOriginal(), SCIPsolCreatePartial(), and SCIPsolCreateUnknown().
◆ SCIPboolarrayCopy()
| SCIP_RETCODE SCIPboolarrayCopy | ( | SCIP_BOOLARRAY ** | boolarray, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_BOOLARRAY * | sourceboolarray | ||
| ) |
creates a copy of a dynamic array of bool values
- Parameters
-
boolarray pointer to store the copied bool array blkmem block memory sourceboolarray dynamic bool array to copy
Definition at line 4789 of file misc.c.
References BMSduplicateBlockMemoryArray, SCIP_BoolArray::firstidx, SCIP_BoolArray::maxusedidx, SCIP_BoolArray::minusedidx, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPboolarrayCreate(), SCIP_BoolArray::vals, and SCIP_BoolArray::valssize.
Referenced by SCIPsolCopy().
◆ SCIPboolarrayFree()
| SCIP_RETCODE SCIPboolarrayFree | ( | SCIP_BOOLARRAY ** | boolarray | ) |
frees a dynamic array of bool values
- Parameters
-
boolarray pointer to the bool array
Definition at line 4813 of file misc.c.
References BMSfreeBlockMemory, BMSfreeBlockMemoryArrayNull, NULL, and SCIP_OKAY.
Referenced by SCIPfreeBoolarray(), and SCIPsolFree().
◆ SCIPboolarrayExtend()
| SCIP_RETCODE SCIPboolarrayExtend | ( | SCIP_BOOLARRAY * | boolarray, |
| int | arraygrowinit, | ||
| SCIP_Real | arraygrowfac, | ||
| int | minidx, | ||
| int | maxidx | ||
| ) |
extends dynamic array to be able to store indices from minidx to maxidx
- Parameters
-
boolarray dynamic bool array arraygrowinit initial size of array arraygrowfac growing factor of array minidx smallest index to allocate storage for maxidx largest index to allocate storage for
Definition at line 4827 of file misc.c.
References SCIP_BoolArray::blkmem, BMSallocBlockMemoryArray, BMScopyMemoryArray, BMSfreeBlockMemoryArrayNull, BMSmoveMemoryArray, calcGrowSize(), FALSE, SCIP_BoolArray::firstidx, MAX, SCIP_BoolArray::maxusedidx, MIN, SCIP_BoolArray::minusedidx, NULL, SCIP_ALLOC, SCIP_Bool, SCIP_OKAY, SCIPdebugMessage, SCIP_BoolArray::vals, and SCIP_BoolArray::valssize.
Referenced by SCIPboolarraySetVal(), and SCIPextendBoolarray().
◆ SCIPboolarrayClear()
| SCIP_RETCODE SCIPboolarrayClear | ( | SCIP_BOOLARRAY * | boolarray | ) |
clears a dynamic bool array
- Parameters
-
boolarray dynamic bool array
Definition at line 4984 of file misc.c.
References BMSclearMemoryArray, SCIP_BoolArray::firstidx, SCIP_BoolArray::maxusedidx, SCIP_BoolArray::minusedidx, NULL, SCIP_OKAY, SCIPdebugMessage, SCIP_BoolArray::vals, and SCIP_BoolArray::valssize.
Referenced by SCIPclearBoolarray(), and solClearArrays().
◆ SCIPboolarrayGetVal()
| SCIP_Bool SCIPboolarrayGetVal | ( | SCIP_BOOLARRAY * | boolarray, |
| int | idx | ||
| ) |
gets value of entry in dynamic array
- Parameters
-
boolarray dynamic bool array idx array index to get value for
Definition at line 5015 of file misc.c.
References FALSE, SCIP_BoolArray::firstidx, SCIP_BoolArray::maxusedidx, NULL, SCIP_BoolArray::vals, and SCIP_BoolArray::valssize.
Referenced by SCIPgetBoolarrayVal(), SCIPsolGetVal(), SCIPsolIncVal(), SCIPsolRound(), SCIPsolSetVal(), solGetArrayVal(), solIncArrayVal(), and solUnlinkVar().
◆ SCIPboolarraySetVal()
| SCIP_RETCODE SCIPboolarraySetVal | ( | SCIP_BOOLARRAY * | boolarray, |
| int | arraygrowinit, | ||
| SCIP_Real | arraygrowfac, | ||
| int | idx, | ||
| SCIP_Bool | val | ||
| ) |
sets value of entry in dynamic array
- Parameters
-
boolarray dynamic bool array arraygrowinit initial size of array arraygrowfac growing factor of array idx array index to set value for val value to set array index to
Definition at line 5036 of file misc.c.
References FALSE, SCIP_BoolArray::firstidx, MAX, SCIP_BoolArray::maxusedidx, MIN, SCIP_BoolArray::minusedidx, NULL, SCIP_CALL, SCIP_OKAY, SCIPboolarrayExtend(), SCIPdebugMessage, SCIP_BoolArray::vals, and SCIP_BoolArray::valssize.
Referenced by SCIPsetBoolarrayVal(), SCIPsolMarkPartial(), solIncArrayVal(), and solSetArrayVal().
◆ SCIPboolarrayGetMinIdx()
| int SCIPboolarrayGetMinIdx | ( | SCIP_BOOLARRAY * | boolarray | ) |
returns the minimal index of all stored non-zero elements
- Parameters
-
boolarray dynamic bool array
Definition at line 5104 of file misc.c.
References SCIP_BoolArray::minusedidx, and NULL.
Referenced by SCIPgetBoolarrayMinIdx().
◆ SCIPboolarrayGetMaxIdx()
| int SCIPboolarrayGetMaxIdx | ( | SCIP_BOOLARRAY * | boolarray | ) |
returns the maximal index of all stored non-zero elements
- Parameters
-
boolarray dynamic bool array
Definition at line 5114 of file misc.c.
References SCIP_BoolArray::maxusedidx, and NULL.
Referenced by SCIPgetBoolarrayMaxIdx().
◆ SCIPptrarrayCreate()
| SCIP_RETCODE SCIPptrarrayCreate | ( | SCIP_PTRARRAY ** | ptrarray, |
| BMS_BLKMEM * | blkmem | ||
| ) |
creates a dynamic array of pointer values
- Parameters
-
ptrarray pointer to store the ptr array blkmem block memory
Definition at line 5125 of file misc.c.
References BMSallocBlockMemory, NULL, SCIP_ALLOC, and SCIP_OKAY.
Referenced by SCIPcreatePtrarray(), and SCIPptrarrayCopy().
◆ SCIPptrarrayCopy()
| SCIP_RETCODE SCIPptrarrayCopy | ( | SCIP_PTRARRAY ** | ptrarray, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_PTRARRAY * | sourceptrarray | ||
| ) |
creates a copy of a dynamic array of pointer values
- Parameters
-
ptrarray pointer to store the copied ptr array blkmem block memory sourceptrarray dynamic ptr array to copy
Definition at line 5145 of file misc.c.
References BMSduplicateBlockMemoryArray, SCIP_PtrArray::firstidx, SCIP_PtrArray::maxusedidx, SCIP_PtrArray::minusedidx, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPptrarrayCreate(), SCIP_PtrArray::vals, and SCIP_PtrArray::valssize.
◆ SCIPptrarrayFree()
| SCIP_RETCODE SCIPptrarrayFree | ( | SCIP_PTRARRAY ** | ptrarray | ) |
frees a dynamic array of pointer values
- Parameters
-
ptrarray pointer to the ptr array
Definition at line 5168 of file misc.c.
References BMSfreeBlockMemory, BMSfreeBlockMemoryArrayNull, NULL, and SCIP_OKAY.
Referenced by SCIPfreePtrarray().
◆ SCIPptrarrayExtend()
| SCIP_RETCODE SCIPptrarrayExtend | ( | SCIP_PTRARRAY * | ptrarray, |
| int | arraygrowinit, | ||
| SCIP_Real | arraygrowfac, | ||
| int | minidx, | ||
| int | maxidx | ||
| ) |
extends dynamic array to be able to store indices from minidx to maxidx
- Parameters
-
ptrarray dynamic ptr array arraygrowinit initial size of array arraygrowfac growing factor of array minidx smallest index to allocate storage for maxidx largest index to allocate storage for
Definition at line 5182 of file misc.c.
References SCIP_PtrArray::blkmem, BMSallocBlockMemoryArray, BMScopyMemoryArray, BMSfreeBlockMemoryArrayNull, calcGrowSize(), SCIP_PtrArray::firstidx, MAX, SCIP_PtrArray::maxusedidx, MIN, SCIP_PtrArray::minusedidx, NULL, SCIP_ALLOC, SCIP_OKAY, SCIPdebugMessage, SCIP_PtrArray::vals, and SCIP_PtrArray::valssize.
Referenced by SCIPextendPtrarray(), and SCIPptrarraySetVal().
◆ SCIPptrarrayClear()
| SCIP_RETCODE SCIPptrarrayClear | ( | SCIP_PTRARRAY * | ptrarray | ) |
clears a dynamic pointer array
- Parameters
-
ptrarray dynamic ptr array
Definition at line 5337 of file misc.c.
References BMSclearMemoryArray, SCIP_PtrArray::firstidx, SCIP_PtrArray::maxusedidx, SCIP_PtrArray::minusedidx, NULL, SCIP_OKAY, SCIPdebugMessage, SCIP_PtrArray::vals, and SCIP_PtrArray::valssize.
Referenced by SCIPclearPtrarray().
◆ SCIPptrarrayGetVal()
| void * SCIPptrarrayGetVal | ( | SCIP_PTRARRAY * | ptrarray, |
| int | idx | ||
| ) |
gets value of entry in dynamic array
- Parameters
-
ptrarray dynamic ptr array idx array index to get value for
Definition at line 5368 of file misc.c.
References SCIP_PtrArray::firstidx, SCIP_PtrArray::maxusedidx, NULL, SCIP_PtrArray::vals, and SCIP_PtrArray::valssize.
Referenced by SCIPgetPtrarrayVal().
◆ SCIPptrarraySetVal()
| SCIP_RETCODE SCIPptrarraySetVal | ( | SCIP_PTRARRAY * | ptrarray, |
| int | arraygrowinit, | ||
| SCIP_Real | arraygrowfac, | ||
| int | idx, | ||
| void * | val | ||
| ) |
sets value of entry in dynamic array
- Parameters
-
ptrarray dynamic ptr array arraygrowinit initial size of array arraygrowfac growing factor of array idx array index to set value for val value to set array index to
Definition at line 5389 of file misc.c.
References SCIP_PtrArray::firstidx, MAX, SCIP_PtrArray::maxusedidx, MIN, SCIP_PtrArray::minusedidx, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPptrarrayExtend(), SCIP_PtrArray::vals, and SCIP_PtrArray::valssize.
Referenced by SCIPsetPtrarrayVal().
◆ SCIPptrarrayGetMinIdx()
| int SCIPptrarrayGetMinIdx | ( | SCIP_PTRARRAY * | ptrarray | ) |
returns the minimal index of all stored non-zero elements
- Parameters
-
ptrarray dynamic ptr array
Definition at line 5457 of file misc.c.
References SCIP_PtrArray::minusedidx, and NULL.
Referenced by SCIPgetPtrarrayMinIdx().
◆ SCIPptrarrayGetMaxIdx()
| int SCIPptrarrayGetMaxIdx | ( | SCIP_PTRARRAY * | ptrarray | ) |
returns the maximal index of all stored non-zero elements
- Parameters
-
ptrarray dynamic ptr array
Definition at line 5467 of file misc.c.
References SCIP_PtrArray::maxusedidx, and NULL.
Referenced by SCIPgetPtrarrayMaxIdx().
◆ SCIPdisjointsetCreate()
| SCIP_RETCODE SCIPdisjointsetCreate | ( | SCIP_DISJOINTSET ** | djset, |
| BMS_BLKMEM * | blkmem, | ||
| int | ncomponents | ||
| ) |
creates a disjoint set (union find) structure djset for ncomponents many components (of size one)
- Parameters
-
djset disjoint set (union find) data structure blkmem block memory ncomponents number of components
Definition at line 11258 of file misc.c.
References BMSallocBlockMemory, BMSallocBlockMemoryArray, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIPdisjointsetClear().
Referenced by SCIPcliquetableComputeCliqueComponents(), SCIPcomputeComponentsSym(), and SCIPcreateDisjointset().
◆ SCIPdisjointsetFree()
| void SCIPdisjointsetFree | ( | SCIP_DISJOINTSET ** | djset, |
| BMS_BLKMEM * | blkmem | ||
| ) |
frees the disjoint set (union find) data structure
- Parameters
-
djset pointer to disjoint set (union find) data structure blkmem block memory
Definition at line 11376 of file misc.c.
References BMSfreeBlockMemory, BMSfreeBlockMemoryArray, NULL, SCIP_DisjointSet::parents, SCIP_DisjointSet::size, and SCIP_DisjointSet::sizes.
Referenced by SCIPcliquetableComputeCliqueComponents(), SCIPcliquetableFree(), SCIPcomputeComponentsSym(), and SCIPfreeDisjointset().
◆ SCIPdigraphCreate()
| SCIP_RETCODE SCIPdigraphCreate | ( | SCIP_DIGRAPH ** | digraph, |
| BMS_BLKMEM * | blkmem, | ||
| int | nnodes | ||
| ) |
SCIP digraph functions
internal digraph functions (see Directed Graph for public digraph methods) creates directed graph structure
creates directed graph structure
- Parameters
-
digraph pointer to store the created directed graph blkmem block memory to store the data nnodes number of nodes
Definition at line 7379 of file misc.c.
References BMSallocBlockMemory, BMSallocClearBlockMemoryArray, FALSE, nnodes, NULL, SCIP_ALLOC, and SCIP_OKAY.
Referenced by SCIPcreateDigraph().
◆ SCIPdigraphCopy()
| SCIP_RETCODE SCIPdigraphCopy | ( | SCIP_DIGRAPH ** | targetdigraph, |
| SCIP_DIGRAPH * | sourcedigraph, | ||
| BMS_BLKMEM * | targetblkmem | ||
| ) |
copies directed graph structure
- Note
- The data in nodedata is copied verbatim. This possibly has to be adapted by the user.
- Parameters
-
targetdigraph pointer to store the copied directed graph sourcedigraph source directed graph targetblkmem block memory to store the target block memory, or NULL to use the same the same block memory as used for the sourcedigraph
Definition at line 7456 of file misc.c.
References SCIP_Digraph::arcdata, SCIP_Digraph::articulations, SCIP_Digraph::articulationscheck, SCIP_Digraph::blkmem, BMSallocBlockMemory, BMSallocClearBlockMemoryArray, BMSduplicateBlockMemoryArray, SCIP_Digraph::components, SCIP_Digraph::componentstarts, FALSE, SCIP_Digraph::narticulations, SCIP_Digraph::ncomponents, nnodes, SCIP_Digraph::nnodes, SCIP_Digraph::nodedata, SCIP_Digraph::nsuccessors, NULL, SCIP_ALLOC, SCIP_Bool, SCIP_OKAY, SCIP_Digraph::successors, and TRUE.
Referenced by SCIPcopyDigraph().
◆ SCIPnegateReal()
negates a number
negation of a number that can be used to avoid that a negation is optimized away by a compiler
negates a number
- Parameters
-
x value to negate
Definition at line 10359 of file misc.c.
References x.
Referenced by negate(), and SCIPintervalEntropy().
◆ SCIPrandomCreate()
| SCIP_RETCODE SCIPrandomCreate | ( | SCIP_RANDNUMGEN ** | randnumgen, |
| BMS_BLKMEM * | blkmem, | ||
| unsigned int | initialseed | ||
| ) |
internal random number generator methods
see Random Numbers for public random number generator methods creates and initializes a random number generator
creates and initializes a random number generator
- Parameters
-
randnumgen random number generator blkmem block memory initialseed initial random seed
Definition at line 10077 of file misc.c.
References BMSallocBlockMemory, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIPrandomSetSeed().
Referenced by SCIPbanditCreate(), SCIPcreateRandom(), SCIPdivesetCreate(), SCIPreoptCreate(), and SCIPsepastoreCreate().
◆ SCIPrandomFree()
| void SCIPrandomFree | ( | SCIP_RANDNUMGEN ** | randnumgen, |
| BMS_BLKMEM * | blkmem | ||
| ) |
frees a random number generator
- Parameters
-
randnumgen random number generator blkmem block memory
Definition at line 10093 of file misc.c.
References BMSfreeBlockMemory, and NULL.
Referenced by divesetFree(), SCIPbanditFree(), SCIPfreeRandom(), SCIPreoptFree(), and SCIPsepastoreFree().
◆ SCIPrandomSetSeed()
| void SCIPrandomSetSeed | ( | SCIP_RANDNUMGEN * | randnumgen, |
| unsigned int | initseed | ||
| ) |
initializes a random number generator with a given start seed
- Parameters
-
randnumgen random number generator initseed initial random seed
Definition at line 10023 of file misc.c.
References SCIP_RandNumGen::cst_seed, DEFAULT_CST, DEFAULT_MWC, DEFAULT_SEED, DEFAULT_XOR, MAX, SCIP_RandNumGen::mwc_seed, NULL, SCIPhashTwo, SCIP_RandNumGen::seed, and SCIP_RandNumGen::xor_seed.
Referenced by SCIPbanditReset(), SCIPdivesetReset(), SCIPrandomCreate(), and SCIPsetRandomSeed().