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.
| SCIP_RETCODE SCIPrealarrayCreate | ( | SCIP_REALARRAY ** | realarray, |
| BMS_BLKMEM * | blkmem | ||
| ) |
creates a dynamic array of real values
| realarray | pointer to store the real array |
| blkmem | block memory |
Definition at line 3182 of file misc.c.
References BMSallocBlockMemory, NULL, SCIP_ALLOC, and SCIP_OKAY.
Referenced by SCIPcreateRealarray(), SCIPrealarrayCopy(), SCIPsolCreate(), SCIPsolCreateOriginal(), SCIPsolCreatePartial(), and SCIPsolCreateUnknown().
| SCIP_RETCODE SCIPrealarrayCopy | ( | SCIP_REALARRAY ** | realarray, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_REALARRAY * | sourcerealarray | ||
| ) |
creates a copy of a dynamic array of real values
| realarray | pointer to store the copied real array |
| blkmem | block memory |
| sourcerealarray | dynamic real array to copy |
Definition at line 3202 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().
| SCIP_RETCODE SCIPrealarrayFree | ( | SCIP_REALARRAY ** | realarray | ) |
frees a dynamic array of real values
| realarray | pointer to the real array |
Definition at line 3226 of file misc.c.
References BMSfreeBlockMemory, BMSfreeBlockMemoryArrayNull, NULL, and SCIP_OKAY.
Referenced by SCIPfreeRealarray(), and SCIPsolFree().
| 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
| 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 3240 of file misc.c.
References BMSallocBlockMemoryArray, BMScopyMemoryArray, BMSfreeBlockMemoryArrayNull, calcGrowSize(), SCIP_RealArray::firstidx, MAX, SCIP_RealArray::maxusedidx, MIN, SCIP_RealArray::minusedidx, NULL, SCIP_ALLOC, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, and SCIP_RealArray::valssize.
Referenced by SCIPextendRealarray(), SCIPlpSumRows(), and SCIPrealarraySetVal().
| SCIP_RETCODE SCIPrealarrayClear | ( | SCIP_REALARRAY * | realarray | ) |
clears a dynamic real array
| realarray | dynamic real array |
Definition at line 3395 of file misc.c.
References BMSclearMemoryArray, SCIP_RealArray::firstidx, NULL, SCIP_OKAY, and SCIPdebugMessage.
Referenced by SCIPclearRealarray(), and SCIPlpSumRows().
| SCIP_Real SCIPrealarrayGetVal | ( | SCIP_REALARRAY * | realarray, |
| int | idx | ||
| ) |
gets value of entry in dynamic array
| realarray | dynamic real array |
| idx | array index to get value for |
Definition at line 3426 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().
| SCIP_RETCODE SCIPrealarraySetVal | ( | SCIP_REALARRAY * | realarray, |
| int | arraygrowinit, | ||
| SCIP_Real | arraygrowfac, | ||
| int | idx, | ||
| SCIP_Real | val | ||
| ) |
sets value of entry in dynamic array
| 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 3447 of file misc.c.
References SCIP_RealArray::firstidx, MAX, MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and SCIPrealarrayExtend().
Referenced by SCIPrealarrayIncVal(), SCIPsetRealarrayVal(), SCIPsolMarkPartial(), solIncArrayVal(), and solSetArrayVal().
| SCIP_RETCODE SCIPrealarrayIncVal | ( | SCIP_REALARRAY * | realarray, |
| int | arraygrowinit, | ||
| SCIP_Real | arraygrowfac, | ||
| int | idx, | ||
| SCIP_Real | incval | ||
| ) |
increases value of entry in dynamic array
| 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 3516 of file misc.c.
References SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPrealarrayGetVal(), and SCIPrealarraySetVal().
Referenced by SCIPincRealarrayVal(), SCIPlpSumRows(), and solIncArrayVal().
| int SCIPrealarrayGetMinIdx | ( | SCIP_REALARRAY * | realarray | ) |
returns the minimal index of all stored non-zero elements
| realarray | dynamic real array |
Definition at line 3534 of file misc.c.
References SCIP_RealArray::minusedidx, and NULL.
Referenced by SCIPgetRealarrayMinIdx().
| int SCIPrealarrayGetMaxIdx | ( | SCIP_REALARRAY * | realarray | ) |
returns the maximal index of all stored non-zero elements
| realarray | dynamic real array |
Definition at line 3544 of file misc.c.
References SCIP_RealArray::maxusedidx, and NULL.
Referenced by SCIPgetRealarrayMaxIdx().
| SCIP_RETCODE SCIPintarrayCreate | ( | SCIP_INTARRAY ** | intarray, |
| BMS_BLKMEM * | blkmem | ||
| ) |
creates a dynamic array of int values
| intarray | pointer to store the int array |
| blkmem | block memory |
Definition at line 3554 of file misc.c.
References BMSallocBlockMemory, NULL, SCIP_ALLOC, and SCIP_OKAY.
Referenced by SCIPcreateIntarray(), and SCIPintarrayCopy().
| SCIP_RETCODE SCIPintarrayCopy | ( | SCIP_INTARRAY ** | intarray, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_INTARRAY * | sourceintarray | ||
| ) |
creates a copy of a dynamic array of int values
| intarray | pointer to store the copied int array |
| blkmem | block memory |
| sourceintarray | dynamic int array to copy |
Definition at line 3574 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.
| SCIP_RETCODE SCIPintarrayFree | ( | SCIP_INTARRAY ** | intarray | ) |
frees a dynamic array of int values
| intarray | pointer to the int array |
Definition at line 3597 of file misc.c.
References BMSfreeBlockMemory, BMSfreeBlockMemoryArrayNull, NULL, and SCIP_OKAY.
Referenced by SCIPfreeIntarray().
| 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
| 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 3611 of file misc.c.
References BMSallocBlockMemoryArray, BMScopyMemoryArray, BMSfreeBlockMemoryArrayNull, calcGrowSize(), SCIP_IntArray::firstidx, MAX, SCIP_IntArray::maxusedidx, MIN, SCIP_IntArray::minusedidx, NULL, SCIP_ALLOC, SCIP_OKAY, SCIPdebugMessage, and SCIP_IntArray::valssize.
Referenced by SCIPextendIntarray(), and SCIPintarraySetVal().
| SCIP_RETCODE SCIPintarrayClear | ( | SCIP_INTARRAY * | intarray | ) |
clears a dynamic int array
| intarray | dynamic int array |
Definition at line 3766 of file misc.c.
References BMSclearMemoryArray, SCIP_IntArray::firstidx, NULL, SCIP_OKAY, and SCIPdebugMessage.
Referenced by SCIPclearIntarray().
| int SCIPintarrayGetVal | ( | SCIP_INTARRAY * | intarray, |
| int | idx | ||
| ) |
gets value of entry in dynamic array
| intarray | dynamic int array |
| idx | array index to get value for |
Definition at line 3797 of file misc.c.
References SCIP_IntArray::firstidx, SCIP_IntArray::maxusedidx, NULL, SCIP_IntArray::vals, and SCIP_IntArray::valssize.
Referenced by SCIPgetIntarrayVal(), and SCIPintarrayIncVal().
| SCIP_RETCODE SCIPintarraySetVal | ( | SCIP_INTARRAY * | intarray, |
| int | arraygrowinit, | ||
| SCIP_Real | arraygrowfac, | ||
| int | idx, | ||
| int | val | ||
| ) |
sets value of entry in dynamic array
| 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 3818 of file misc.c.
References SCIP_IntArray::firstidx, MAX, MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and SCIPintarrayExtend().
Referenced by SCIPintarrayIncVal(), and SCIPsetIntarrayVal().
| SCIP_RETCODE SCIPintarrayIncVal | ( | SCIP_INTARRAY * | intarray, |
| int | arraygrowinit, | ||
| SCIP_Real | arraygrowfac, | ||
| int | idx, | ||
| int | incval | ||
| ) |
increases value of entry in dynamic array
| 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 3886 of file misc.c.
References SCIPintarrayGetVal(), and SCIPintarraySetVal().
Referenced by SCIPincIntarrayVal().
| int SCIPintarrayGetMinIdx | ( | SCIP_INTARRAY * | intarray | ) |
returns the minimal index of all stored non-zero elements
| intarray | dynamic int array |
Definition at line 3898 of file misc.c.
References SCIP_IntArray::minusedidx, and NULL.
Referenced by SCIPgetIntarrayMinIdx().
| int SCIPintarrayGetMaxIdx | ( | SCIP_INTARRAY * | intarray | ) |
returns the maximal index of all stored non-zero elements
| intarray | dynamic int array |
Definition at line 3908 of file misc.c.
References SCIP_IntArray::maxusedidx, and NULL.
Referenced by SCIPgetIntarrayMaxIdx().
| SCIP_RETCODE SCIPboolarrayCreate | ( | SCIP_BOOLARRAY ** | boolarray, |
| BMS_BLKMEM * | blkmem | ||
| ) |
creates a dynamic array of bool values
| boolarray | pointer to store the bool array |
| blkmem | block memory |
Definition at line 3919 of file misc.c.
References BMSallocBlockMemory, NULL, SCIP_ALLOC, and SCIP_OKAY.
Referenced by SCIPboolarrayCopy(), SCIPcreateBoolarray(), SCIPsolCreate(), SCIPsolCreateOriginal(), SCIPsolCreatePartial(), and SCIPsolCreateUnknown().
| SCIP_RETCODE SCIPboolarrayCopy | ( | SCIP_BOOLARRAY ** | boolarray, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_BOOLARRAY * | sourceboolarray | ||
| ) |
creates a copy of a dynamic array of bool values
| boolarray | pointer to store the copied bool array |
| blkmem | block memory |
| sourceboolarray | dynamic bool array to copy |
Definition at line 3939 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().
| SCIP_RETCODE SCIPboolarrayFree | ( | SCIP_BOOLARRAY ** | boolarray | ) |
frees a dynamic array of bool values
| boolarray | pointer to the bool array |
Definition at line 3963 of file misc.c.
References BMSfreeBlockMemory, BMSfreeBlockMemoryArrayNull, NULL, and SCIP_OKAY.
Referenced by SCIPfreeBoolarray(), and SCIPsolFree().
| 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
| 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 3977 of file misc.c.
References 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, and SCIP_BoolArray::valssize.
Referenced by SCIPboolarraySetVal(), and SCIPextendBoolarray().
| SCIP_RETCODE SCIPboolarrayClear | ( | SCIP_BOOLARRAY * | boolarray | ) |
clears a dynamic bool array
| boolarray | dynamic bool array |
Definition at line 4134 of file misc.c.
References BMSclearMemoryArray, SCIP_BoolArray::firstidx, NULL, SCIP_OKAY, and SCIPdebugMessage.
Referenced by SCIPclearBoolarray(), and solClearArrays().
| SCIP_Bool SCIPboolarrayGetVal | ( | SCIP_BOOLARRAY * | boolarray, |
| int | idx | ||
| ) |
gets value of entry in dynamic array
| boolarray | dynamic bool array |
| idx | array index to get value for |
Definition at line 4165 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().
| SCIP_RETCODE SCIPboolarraySetVal | ( | SCIP_BOOLARRAY * | boolarray, |
| int | arraygrowinit, | ||
| SCIP_Real | arraygrowfac, | ||
| int | idx, | ||
| SCIP_Bool | val | ||
| ) |
sets value of entry in dynamic array
| 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 4186 of file misc.c.
References FALSE, SCIP_BoolArray::firstidx, MAX, MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIPboolarrayExtend(), and SCIPdebugMessage.
Referenced by SCIPsetBoolarrayVal(), SCIPsolMarkPartial(), solIncArrayVal(), and solSetArrayVal().
| int SCIPboolarrayGetMinIdx | ( | SCIP_BOOLARRAY * | boolarray | ) |
returns the minimal index of all stored non-zero elements
| boolarray | dynamic bool array |
Definition at line 4254 of file misc.c.
References SCIP_BoolArray::minusedidx, and NULL.
Referenced by SCIPgetBoolarrayMinIdx().
| int SCIPboolarrayGetMaxIdx | ( | SCIP_BOOLARRAY * | boolarray | ) |
returns the maximal index of all stored non-zero elements
| boolarray | dynamic bool array |
Definition at line 4264 of file misc.c.
References SCIP_BoolArray::maxusedidx, and NULL.
Referenced by SCIPgetBoolarrayMaxIdx().
| SCIP_RETCODE SCIPptrarrayCreate | ( | SCIP_PTRARRAY ** | ptrarray, |
| BMS_BLKMEM * | blkmem | ||
| ) |
creates a dynamic array of pointer values
| ptrarray | pointer to store the ptr array |
| blkmem | block memory |
Definition at line 4275 of file misc.c.
References BMSallocBlockMemory, NULL, SCIP_ALLOC, and SCIP_OKAY.
Referenced by SCIPcreatePtrarray(), and SCIPptrarrayCopy().
| SCIP_RETCODE SCIPptrarrayCopy | ( | SCIP_PTRARRAY ** | ptrarray, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_PTRARRAY * | sourceptrarray | ||
| ) |
creates a copy of a dynamic array of pointer values
| ptrarray | pointer to store the copied ptr array |
| blkmem | block memory |
| sourceptrarray | dynamic ptr array to copy |
Definition at line 4295 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.
| SCIP_RETCODE SCIPptrarrayFree | ( | SCIP_PTRARRAY ** | ptrarray | ) |
frees a dynamic array of pointer values
| ptrarray | pointer to the ptr array |
Definition at line 4318 of file misc.c.
References BMSfreeBlockMemory, BMSfreeBlockMemoryArrayNull, NULL, and SCIP_OKAY.
Referenced by SCIPfreePtrarray().
| 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
| 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 4332 of file misc.c.
References BMSallocBlockMemoryArray, BMScopyMemoryArray, BMSfreeBlockMemoryArrayNull, calcGrowSize(), SCIP_PtrArray::firstidx, MAX, SCIP_PtrArray::maxusedidx, MIN, SCIP_PtrArray::minusedidx, NULL, SCIP_ALLOC, SCIP_OKAY, SCIPdebugMessage, and SCIP_PtrArray::valssize.
Referenced by SCIPextendPtrarray(), and SCIPptrarraySetVal().
| SCIP_RETCODE SCIPptrarrayClear | ( | SCIP_PTRARRAY * | ptrarray | ) |
clears a dynamic pointer array
| ptrarray | dynamic ptr array |
Definition at line 4487 of file misc.c.
References BMSclearMemoryArray, SCIP_PtrArray::firstidx, NULL, SCIP_OKAY, and SCIPdebugMessage.
Referenced by SCIPclearPtrarray().
| void* SCIPptrarrayGetVal | ( | SCIP_PTRARRAY * | ptrarray, |
| int | idx | ||
| ) |
gets value of entry in dynamic array
| ptrarray | dynamic ptr array |
| idx | array index to get value for |
Definition at line 4518 of file misc.c.
References SCIP_PtrArray::firstidx, SCIP_PtrArray::maxusedidx, NULL, SCIP_PtrArray::vals, and SCIP_PtrArray::valssize.
Referenced by SCIPgetPtrarrayVal().
| SCIP_RETCODE SCIPptrarraySetVal | ( | SCIP_PTRARRAY * | ptrarray, |
| int | arraygrowinit, | ||
| SCIP_Real | arraygrowfac, | ||
| int | idx, | ||
| void * | val | ||
| ) |
sets value of entry in dynamic array
| 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 4539 of file misc.c.
References SCIP_PtrArray::firstidx, MAX, MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and SCIPptrarrayExtend().
Referenced by SCIPsetPtrarrayVal().
| int SCIPptrarrayGetMinIdx | ( | SCIP_PTRARRAY * | ptrarray | ) |
returns the minimal index of all stored non-zero elements
| ptrarray | dynamic ptr array |
Definition at line 4607 of file misc.c.
References SCIP_PtrArray::minusedidx, and NULL.
Referenced by SCIPgetPtrarrayMinIdx().
| int SCIPptrarrayGetMaxIdx | ( | SCIP_PTRARRAY * | ptrarray | ) |
returns the maximal index of all stored non-zero elements
| ptrarray | dynamic ptr array |
Definition at line 4617 of file misc.c.
References SCIP_PtrArray::maxusedidx, and NULL.
Referenced by SCIPgetPtrarrayMaxIdx().