Detailed Description
methods for shuffling arrays
Functions | |
SCIP_EXPORT void | SCIPswapInts (int *value1, int *value2) |
SCIP_EXPORT void | SCIPswapReals (SCIP_Real *value1, SCIP_Real *value2) |
SCIP_EXPORT void | SCIPswapPointers (void **pointer1, void **pointer2) |
SCIP_EXPORT void | SCIPpermuteIntArray (int *array, int begin, int end, unsigned int *randseed) |
SCIP_EXPORT void | SCIPrandomPermuteIntArray (SCIP_RANDNUMGEN *randgen, int *array, int begin, int end) |
SCIP_EXPORT void | SCIPrandomPermuteArray (SCIP_RANDNUMGEN *randgen, void **array, int begin, int end) |
SCIP_EXPORT void | SCIPpermuteArray (void **array, int begin, int end, unsigned int *randseed) |
Function Documentation
◆ SCIPswapInts()
SCIP_EXPORT void SCIPswapInts | ( | int * | value1, |
int * | value2 | ||
) |
swaps two ints
- Parameters
-
value1 pointer to first integer value2 pointer to second integer
Definition at line 10206 of file misc.c.
Referenced by analyzeConflictOverload(), checkOverloadViaThetaTree(), isConnectedSOS1(), mod2matrixPreprocessRows(), and SCIPcreateNlpiProb().
◆ SCIPswapReals()
SCIP_EXPORT void SCIPswapReals | ( | SCIP_Real * | value1, |
SCIP_Real * | value2 | ||
) |
swaps two real values
- Parameters
-
value1 pointer to first real value value2 pointer to second real value
Definition at line 10219 of file misc.c.
References SCIP_Real.
Referenced by filterWithParallelism(), propagateBoundsCons(), SCIP_DECL_QUADCONSUPGD(), selectBestCut(), setupAggregationData(), and tightenVarsBoundsSOS1().
◆ SCIPswapPointers()
SCIP_EXPORT void SCIPswapPointers | ( | void ** | pointer1, |
void ** | pointer2 | ||
) |
swaps the addresses of two pointers
- Parameters
-
pointer1 first pointer pointer2 second pointer
Definition at line 10232 of file misc.c.
Referenced by applyProbing(), cancelCol(), cancelRow(), CREATE_CONSTRAINT(), DECL_VARFIXINGS(), detectRedundantConstraints(), filterWithParallelism(), getNextToken(), hashmapCheckLoad(), hashmapInsert(), hashsetCheckLoad(), hashsetInsert(), hashtableCheckLoad(), hashtableInsert(), mod2matrixPreprocessRows(), parseQuadratic(), pushToken(), removeRedundantConss(), SCIP_DECL_HEURINITSOL(), SCIPendProbing(), SCIProwGetDiscreteScalarProduct(), SCIProwGetScalarProduct(), SCIPstartProbing(), SCIPsyncdataGetSolutionBuffer(), selectBestCut(), and setupAggregationData().
◆ SCIPpermuteIntArray()
SCIP_EXPORT void SCIPpermuteIntArray | ( | int * | array, |
int | begin, | ||
int | end, | ||
unsigned int * | randseed | ||
) |
randomly shuffles parts of an integer array using the Fisher-Yates algorithm
- Deprecated:
- Please use SCIPrandomPermuteIntArray()
randomly shuffles parts of an integer array using the Fisher-Yates algorithm
- Deprecated:
- Please use SCIPrandomPermuteIntArray()
- Parameters
-
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 10248 of file misc.c.
References getRandomInt().
◆ SCIPrandomPermuteIntArray()
SCIP_EXPORT void SCIPrandomPermuteIntArray | ( | SCIP_RANDNUMGEN * | randnumgen, |
int * | array, | ||
int | begin, | ||
int | end | ||
) |
randomly shuffles parts of an integer array using the Fisher-Yates algorithm
- Parameters
-
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 10000 of file misc.c.
References SCIPrandomGetInt().
Referenced by computeDegConsTree(), computeSteinerTree(), dataReset(), SCIP_DECL_HEUREXEC(), SCIPreoptApply(), SCIPreoptSplitRoot(), SCIPStpHeurTMRun(), selectdiffsols(), and selectsols().
◆ SCIPrandomPermuteArray()
SCIP_EXPORT void SCIPrandomPermuteArray | ( | SCIP_RANDNUMGEN * | randnumgen, |
void ** | array, | ||
int | begin, | ||
int | end | ||
) |
randomly shuffles parts of an array using the Fisher-Yates algorithm
- Parameters
-
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 10030 of file misc.c.
References SCIPrandomGetInt().
Referenced by determineVariableFixings(), performRandRounding(), preprocessCliques(), and SCIPpermuteProb().
◆ SCIPpermuteArray()
SCIP_EXPORT void SCIPpermuteArray | ( | void ** | array, |
int | begin, | ||
int | end, | ||
unsigned int * | randseed | ||
) |
randomly shuffles parts of an array using the Fisher-Yates algorithm
- Deprecated:
- Please use SCIPrandomPermuteArray()
randomly shuffles parts of an array using the Fisher-Yates algorithm
- Deprecated:
- Please use SCIPrandomPermuteArray()
- Parameters
-
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 10282 of file misc.c.
References getRandomInt().