commonly used numerical methods
SCIP_Real SCIPcalcMachineEpsilon (void) SCIP_Real SCIPnextafter (SCIP_Real from, SCIP_Real to) SCIP_Longint SCIPcalcGreComDiv (SCIP_Longint val1, SCIP_Longint val2) SCIP_Longint SCIPcalcSmaComMul (SCIP_Longint val1, SCIP_Longint val2) SCIP_Longint SCIPcalcBinomCoef (int n, int m) unsigned int SCIPcalcFibHash (SCIP_Real v) SCIP_Bool SCIPrealToRational (SCIP_Real val, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Longint *numerator, SCIP_Longint *denominator) SCIP_RETCODE SCIPcalcIntegralScalar (SCIP_Real *vals, int nvals, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Real maxscale, SCIP_Real *intscalar, SCIP_Bool *success) SCIP_Bool SCIPfindSimpleRational (SCIP_Real lb, SCIP_Real ub, SCIP_Longint maxdnom, SCIP_Longint *numerator, SCIP_Longint *denominator) SCIP_Real SCIPselectSimpleValue (SCIP_Real lb, SCIP_Real ub, SCIP_Longint maxdnom) SCIP_Real SCIPcalcRootNewton (SCIP_DECL_NEWTONEVAL((*function)), SCIP_DECL_NEWTONEVAL((*derivative)), SCIP_Real *params, int nparams, SCIP_Real x, SCIP_Real eps, int k) SCIP_Real SCIPrelDiff (SCIP_Real val1, SCIP_Real val2) SCIP_Real SCIPcomputeGap (SCIP_Real eps, SCIP_Real inf, SCIP_Real primalbound, SCIP_Real dualbound) ◆ SCIPisFinite ◆ SCIPcalcMachineEpsilon()returns the machine epsilon: the smallest number eps > 0, for which 1.0 + eps > 1.0
Definition at line 9101 of file misc.c.
References eps, and SCIP_Real.
◆ SCIPnextafter()returns the next representable value of from in the direction of to
Definition at line 9367 of file misc.c.
Referenced by computeMaxForBilinearProp(), initSolve(), SCIPintervalCos(), SCIPintervalEntropy(), SCIPintervalExp(), SCIPintervalLog(), SCIPintervalPowerScalar(), SCIPintervalPowerScalarScalar(), SCIPintervalSignPowerScalar(), SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar(), and SCIPintervalSquareRoot().
◆ SCIPcalcGreComDiv()calculates the greatest common divisor of the two given values
Definition at line 9124 of file misc.c.
Referenced by deleteRedundantVars(), normalizeCons(), normalizeCumulativeCondition(), normalizeWeights(), rangedRowPropagation(), SCIPcalcIntegralScalar(), SCIPcalcSmaComMul(), SCIPprobScaleObj(), SCIProwCalcIntegralScalar(), SCIPsolveKnapsackExactly(), simplifyInequalities(), and tryAggregateIntVars().
◆ SCIPcalcSmaComMul() ◆ SCIPcalcBinomCoef()calculates a binomial coefficient n over m, choose m elements out of n, maximal value will be 33 over 16 (because the n=33 is the last line in the Pascal's triangle where each entry fits in a 4 byte value), an error occurs due to big numbers or an negative value m (and m < n) and -1 will be returned
Definition at line 10275 of file misc.c.
References SCIP_Longint, SCIP_LONGINT_MAX, and SCIP_Real.
◆ SCIPcalcFibHash() ◆ SCIPrealToRational()converts a real number into a (approximate) rational representation, and returns TRUE iff the conversion was successful
Definition at line 9397 of file misc.c.
References a, b, EPSFLOOR, EPSGT, FALSE, MIN, NULL, REALABS, SCIP_Longint, SCIP_LONGINT_MAX, SCIP_Real, simplednoms, and TRUE.
Referenced by normalizeCons(), prettifyConss(), SCIPcalcIntegralScalar(), SCIPfindSimpleRational(), SCIProwCalcIntegralScalar(), and tryAggregateIntVars().
◆ SCIPcalcIntegralScalar()tries to find a value, such that all given values, if scaled with this value become integral in relative allowed difference in between mindelta and maxdelta
Definition at line 9560 of file misc.c.
References ABS, EPSEQ, FALSE, isIntegralScalar(), MIN, nscalars, NULL, REALABS, scalars, SCIP_Bool, SCIP_DEFAULT_EPSILON, SCIP_INVALID, SCIP_Longint, SCIP_LONGINT_FORMAT, SCIP_OKAY, SCIP_Real, SCIP_REAL_MAX, SCIPcalcGreComDiv(), SCIPdebugMessage, SCIPrealToRational(), and TRUE.
Referenced by calculateScalingValue(), cutTightenCoefs(), cutTightenCoefsQuad(), SCIPcutGenerationHeuristicCMIR(), SCIPprobScaleObj(), SCIPseparateRelaxedKnapsack(), and transformNonIntegralRow().
◆ SCIPfindSimpleRational() ◆ SCIPselectSimpleValue()given a (usually very small) interval, selects a value inside this interval; it is tried to select a rational number with simple denominator (i.e. a small number, probably multiplied with powers of 10); if no valid rational number inside the interval was found, selects the central value of the interval
Definition at line 9827 of file misc.c.
References MAX, SCIP_Bool, SCIP_Longint, SCIP_LONGINT_FORMAT, SCIP_Real, SCIPdebugMessage, SCIPdebugPrintf, and SCIPfindSimpleRational().
Referenced by convertUnaryEquality(), fixVariables(), SCIP_DECL_PRESOLEXEC(), and SCIPanalyzeDeductionsProbing().
◆ SCIPcalcRootNewton() ◆ SCIPrelDiff()returns the relative difference: (val1-val2)/max(|val1|,|val2|,1.0)
Definition at line 11215 of file misc.c.
References MAX3, REALABS, and SCIP_Real.
Referenced by checkCons(), checkCumulativeCondition(), checkOrigPbCons(), createGenVBound(), getIntegralScalar(), getScaledDualWeight(), isConsViolated(), isIntegralScalar(), priceAndCutLoop(), SCIP_DECL_CONSCHECK(), SCIPbendersSubproblemIsOptimal(), SCIPbranchExecExtern(), SCIPbranchGetBranchingPoint(), SCIPconcsolverSync(), SCIPcutGenerationHeuristicCMIR(), SCIPintervalAreDisjointEps(), SCIPintervalIntersectEps(), SCIPsolCheckOrig(), SCIPtreeBranchVar(), SCIPtreeBranchVarNary(), SCIPvalidateSolve(), solveBendersSubproblems(), and updateBestCandidate().
◆ SCIPcomputeGap()RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4