methods for shuffling arrays
Functions | |
void | SCIPswapInts (int *value1, int *value2) |
void | SCIPswapReals (SCIP_Real *value1, SCIP_Real *value2) |
void | SCIPswapPointers (void **pointer1, void **pointer2) |
void | SCIPpermuteIntArray (int *array, int begin, int end, unsigned int *randseed) |
void | SCIPrandomPermuteIntArray (SCIP_RANDNUMGEN *randgen, int *array, int begin, int end) |
void | SCIPrandomPermuteArray (SCIP_RANDNUMGEN *randgen, void **array, int begin, int end) |
void | SCIPpermuteArray (void **array, int begin, int end, unsigned int *randseed) |
void SCIPswapInts | ( | int * | value1, |
int * | value2 | ||
) |
swaps two ints
value1 | pointer to first integer |
value2 | pointer to second integer |
Definition at line 8970 of file misc.c.
Referenced by analyzeConflictOverload(), checkOverloadViaThetaTree(), isConnectedSOS1(), and SCIPcreateNlpiProb().
void SCIPswapPointers | ( | void ** | pointer1, |
void ** | pointer2 | ||
) |
swaps the addresses of two pointers
pointer1 | first pointer |
pointer2 | second pointer |
Definition at line 8996 of file misc.c.
Referenced by applyProbing(), CREATE_CONSTRAINT(), getNextToken(), hashmapCheckLoad(), hashmapInsert(), hashtableCheckLoad(), hashtableInsert(), parseQuadratic(), pushToken(), removeRedundantConss(), SCIPendProbing(), SCIProwGetDiscreteScalarProduct(), SCIProwGetScalarProduct(), SCIPstartProbing(), and SCIPsyncdataGetSolutionBuffer().
void SCIPpermuteIntArray | ( | int * | array, |
int | begin, | ||
int | end, | ||
unsigned int * | randseed | ||
) |
randomly shuffles parts of an integer array using the Fisher-Yates algorithm
randomly shuffles parts of an integer array using the Fisher-Yates algorithm
array | array to be shuffled |
begin | first included index that should be subject to shuffling (0 for first array entry) |
end | first excluded index that should not be subject to shuffling (array size for last array entry) |
randseed | seed value for the random generator |
Definition at line 9012 of file misc.c.
References getRandomInt().
void SCIPrandomPermuteIntArray | ( | SCIP_RANDNUMGEN * | randnumgen, |
int * | array, | ||
int | begin, | ||
int | end | ||
) |
randomly shuffles parts of an integer array using the Fisher-Yates algorithm
randnumgen | random number generator |
array | array to be shuffled |
begin | first included index that should be subject to shuffling (0 for first array entry) |
end | first excluded index that should not be subject to shuffling (array size for last array entry) |
Definition at line 8764 of file misc.c.
References SCIPrandomGetInt().
Referenced by SCIP_DECL_HEUREXEC(), SCIP_DECL_SEPAEXECLP(), SCIPreoptApply(), and SCIPreoptSplitRoot().
void SCIPrandomPermuteArray | ( | SCIP_RANDNUMGEN * | randnumgen, |
void ** | array, | ||
int | begin, | ||
int | end | ||
) |
randomly shuffles parts of an array using the Fisher-Yates algorithm
randnumgen | random number generator |
array | array to be shuffled |
begin | first included index that should be subject to shuffling (0 for first array entry) |
end | first excluded index that should not be subject to shuffling (array size for last array entry) |
Definition at line 8794 of file misc.c.
References SCIPrandomGetInt().
Referenced by determineVariableFixings(), performRandRounding(), preprocessCliques(), and SCIPpermuteProb().
void SCIPpermuteArray | ( | void ** | array, |
int | begin, | ||
int | end, | ||
unsigned int * | randseed | ||
) |
randomly shuffles parts of an array using the Fisher-Yates algorithm
randomly shuffles parts of an array using the Fisher-Yates algorithm
array | array to be shuffled |
begin | first included index that should be subject to shuffling (0 for first array entry) |
end | first excluded index that should not be subject to shuffling (array size for last array entry) |
randseed | seed value for the random generator |
Definition at line 9046 of file misc.c.
References getRandomInt().