|
|
void | SCIPswapInts (int *value1, int *value2) |
|
void | SCIPswapPointers (void **pointer1, void **pointer2) |
|
void | SCIPpermuteIntArray (int *array, int begin, int end, unsigned int *randseed) |
|
void | SCIPpermuteArray (void **array, int begin, int end, unsigned int *randseed) |
|
SCIP_RETCODE | SCIPgetRandomSubset (void **set, int nelems, void **subset, int nsubelems, unsigned int randseed) |
|
void SCIPswapInts |
( |
int * |
value1, |
|
|
int * |
value2 |
|
) |
| |
swaps two ints
- Parameters
-
value1 | pointer to first integer |
value2 | pointer ti second integer |
void SCIPswapPointers |
( |
void ** |
pointer1, |
|
|
void ** |
pointer2 |
|
) |
| |
swaps the addresses of two pointers
- Parameters
-
pointer1 | first pointer |
pointer2 | second pointer |
void SCIPpermuteIntArray |
( |
int * |
array, |
|
|
int |
begin, |
|
|
int |
end, |
|
|
unsigned int * |
randseed |
|
) |
| |
randomly shuffles parts of an integer array using the Fisher-Yates algorithm
- Parameters
-
array | array to be shuffled |
begin | first index that should be subject to shuffling (0 for whole array) |
end | last index that should be subject to shuffling (array size for whole array) |
randseed | seed value for the random generator |
void SCIPpermuteArray |
( |
void ** |
array, |
|
|
int |
begin, |
|
|
int |
end, |
|
|
unsigned int * |
randseed |
|
) |
| |
randomly shuffles parts of an array using the Fisher-Yates algorithm
- Parameters
-
array | array to be shuffled |
begin | first index that should be subject to shuffling (0 for whole array) |
end | last index that should be subject to shuffling (array size for whole array) |
randseed | pointer to seed value for the random generator |
SCIP_RETCODE SCIPgetRandomSubset |
( |
void ** |
set, |
|
|
int |
nelems, |
|
|
void ** |
subset, |
|
|
int |
nsubelems, |
|
|
unsigned int |
randseed |
|
) |
| |
draws a random subset of disjoint elements from a given set of disjoint elements; this implementation is suited for the case that nsubelems is considerably smaller then nelems
- Parameters
-
set | original set, from which elements should be drawn |
nelems | number of elements in original set |
subset | subset in which drawn elements should be stored |
nsubelems | number of elements that should be drawn and stored |
randseed | seed value for random generator |
|