Detailed Description
interval arithmetics for provable bounds
Definition in file intervalarith.c.
#include <stdlib.h>
#include <assert.h>
#include <math.h>
#include "scip/def.h"
#include "scip/intervalarith.h"
#include "scip/pub_message.h"
#include "scip/misc.h"
Go to the source code of this file.
Macros | |
#define | SCIP_ROUND_DOWNWARDS 0 |
#define | SCIP_ROUND_UPWARDS 1 |
#define | SCIP_ROUND_NEAREST 2 |
#define | SCIP_ROUND_ZERO 3 |
#define | CALCB(y) ((bx + axy * (y)) / (2.0 * sqrtax)) |
#define | CALCR(c, y) (rcoef_const + (c) + (rcoef_y + rcoef_yy * (y)) * (y)) |
Variables | |
static SCIP_Real | sin_extremepoints [] = {M_PI_2, 1.5*M_PI, 2.5*M_PI, 3.5*M_PI} |
static SCIP_Real | cos_extremepoints [] = {M_PI, 2*M_PI, 3*M_PI} |
Macro Definition Documentation
◆ SCIP_ROUND_DOWNWARDS
#define SCIP_ROUND_DOWNWARDS 0 |
round always down
Definition at line 227 of file intervalarith.c.
Referenced by SCIPintervalAdd(), SCIPintervalAddInf(), SCIPintervalAddScalar(), SCIPintervalAddVectors(), SCIPintervalDiv(), SCIPintervalDivScalar(), SCIPintervalMul(), SCIPintervalMulInf(), SCIPintervalMulScalar(), SCIPintervalMulScalarInf(), SCIPintervalPowerScalarIntegerInf(), SCIPintervalReciprocal(), SCIPintervalScalprod(), SCIPintervalScalprodScalars(), SCIPintervalScalprodScalarsInf(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSignPowerScalar(), SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar(), SCIPintervalSquare(), and SCIPintervalSub().
◆ SCIP_ROUND_UPWARDS
#define SCIP_ROUND_UPWARDS 1 |
round always up
Definition at line 228 of file intervalarith.c.
Referenced by SCIPintervalAdd(), SCIPintervalAddScalar(), SCIPintervalAddSup(), SCIPintervalAddVectors(), SCIPintervalDiv(), SCIPintervalDivScalar(), SCIPintervalMul(), SCIPintervalMulScalar(), SCIPintervalMulScalarSup(), SCIPintervalMulSup(), SCIPintervalPowerScalarInteger(), SCIPintervalPowerScalarIntegerSup(), SCIPintervalQuadUpperBound(), SCIPintervalReciprocal(), SCIPintervalScalprod(), SCIPintervalScalprodScalars(), SCIPintervalScalprodScalarsSup(), SCIPintervalSetRoundingModeUpwards(), SCIPintervalSignPowerScalar(), SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar(), SCIPintervalSquare(), and SCIPintervalSub().
◆ SCIP_ROUND_NEAREST
#define SCIP_ROUND_NEAREST 2 |
round always to nearest
Definition at line 229 of file intervalarith.c.
Referenced by intervalGetRoundingMode(), SCIPintervalExp(), SCIPintervalLog(), SCIPintervalPowerScalar(), SCIPintervalPowerScalarScalar(), SCIPintervalSetRoundingModeToNearest(), SCIPintervalSignPowerScalar(), SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar(), and SCIPintervalSquareRoot().
◆ SCIP_ROUND_ZERO
#define SCIP_ROUND_ZERO 3 |
round always towards zero
Definition at line 230 of file intervalarith.c.
Referenced by SCIPintervalSetRoundingModeTowardsZero().
◆ CALCB
Referenced by SCIPintervalSolveBivariateQuadExpressionAllScalar().
◆ CALCR
Referenced by SCIPintervalSolveBivariateQuadExpressionAllScalar().
Function Documentation
◆ SCIPintervalHasRoundingControl()
SCIP_Bool SCIPintervalHasRoundingControl | ( | void | ) |
returns whether rounding mode control is available
Definition at line 233 of file intervalarith.c.
References FALSE.
Referenced by SCIPfindSimpleRational().
◆ intervalSetRoundingMode()
|
static |
sets rounding mode of floating point operations
- Parameters
-
roundmode rounding mode to activate
Definition at line 242 of file intervalarith.c.
References SCIPerrorMessage.
Referenced by SCIPintervalAdd(), SCIPintervalAddScalar(), SCIPintervalAddVectors(), SCIPintervalDiv(), SCIPintervalDivScalar(), SCIPintervalMul(), SCIPintervalMulScalar(), SCIPintervalPowerScalarInteger(), SCIPintervalPowerScalarIntegerInf(), SCIPintervalPowerScalarIntegerSup(), SCIPintervalQuadUpperBound(), SCIPintervalReciprocal(), SCIPintervalScalprod(), SCIPintervalScalprodScalars(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSetRoundingModeToNearest(), SCIPintervalSetRoundingModeTowardsZero(), SCIPintervalSetRoundingModeUpwards(), SCIPintervalSignPowerScalar(), SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar(), SCIPintervalSquare(), and SCIPintervalSub().
◆ intervalGetRoundingMode()
|
static |
gets current rounding mode of floating point operations
Definition at line 251 of file intervalarith.c.
References SCIP_ROUND_NEAREST.
Referenced by SCIPintervalAdd(), SCIPintervalAddInf(), SCIPintervalAddScalar(), SCIPintervalAddSup(), SCIPintervalAddVectors(), SCIPintervalDiv(), SCIPintervalDivScalar(), SCIPintervalExp(), SCIPintervalGetRoundingMode(), SCIPintervalLog(), SCIPintervalMul(), SCIPintervalMulInf(), SCIPintervalMulScalar(), SCIPintervalMulScalarInf(), SCIPintervalMulScalarSup(), SCIPintervalMulSup(), SCIPintervalPowerScalar(), SCIPintervalPowerScalarInteger(), SCIPintervalPowerScalarIntegerInf(), SCIPintervalPowerScalarIntegerSup(), SCIPintervalPowerScalarScalar(), SCIPintervalQuadUpperBound(), SCIPintervalReciprocal(), SCIPintervalScalprod(), SCIPintervalScalprodScalars(), SCIPintervalScalprodScalarsInf(), SCIPintervalScalprodScalarsSup(), SCIPintervalSignPowerScalar(), SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar(), SCIPintervalSquare(), SCIPintervalSquareRoot(), and SCIPintervalSub().
◆ SCIPintervalSetRoundingMode()
void SCIPintervalSetRoundingMode | ( | SCIP_ROUNDMODE | roundmode | ) |
sets rounding mode of floating point operations
- Parameters
-
roundmode rounding mode to activate
Definition at line 262 of file intervalarith.c.
References intervalSetRoundingMode().
Referenced by consdataUpdateLinearActivity(), consdataUpdateLinearActivityLbChange(), consdataUpdateLinearActivityUbChange(), exprgraphNodePropagateBounds(), propagateBounds(), propagateBoundsCons(), propagateBoundsGetQuadActivity(), propagateBoundsQuadVar(), propagateConstraintSides(), and SCIPfindSimpleRational().
◆ SCIPintervalGetRoundingMode()
SCIP_ROUNDMODE SCIPintervalGetRoundingMode | ( | void | ) |
gets current rounding mode of floating point operations
Definition at line 270 of file intervalarith.c.
References intervalGetRoundingMode(), negate(), and x.
Referenced by consdataUpdateLinearActivity(), consdataUpdateLinearActivityLbChange(), consdataUpdateLinearActivityUbChange(), exprgraphNodePropagateBounds(), propagateBounds(), propagateBoundsCons(), propagateBoundsGetQuadActivity(), propagateBoundsQuadVar(), propagateConstraintSides(), and SCIPfindSimpleRational().
◆ negate()
gets the negation of a double
Fallback implementation that calls the negation method from misc.o. Having the implementation in a different object file will hopefully prevent it from being "optimized away".
- Parameters
-
x number that should be negated
Definition at line 327 of file intervalarith.c.
References SCIPnegateReal().
Referenced by polyscip::global::print(), SCIPintervalGetRoundingMode(), SCIPintervalNegateReal(), SCIPintervalPowerScalarInteger(), SCIPintervalQuadUpperBound(), SCIPintervalSignPowerScalar(), and SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar().
◆ SCIPintervalSetRoundingModeDownwards()
void SCIPintervalSetRoundingModeDownwards | ( | void | ) |
sets rounding mode of floating point operations to downwards rounding
Definition at line 338 of file intervalarith.c.
References intervalSetRoundingMode(), and SCIP_ROUND_DOWNWARDS.
Referenced by consdataUpdateLinearActivity(), consdataUpdateLinearActivityLbChange(), consdataUpdateLinearActivityUbChange(), exprgraphNodePropagateBounds(), propagateBounds(), propagateBoundsCons(), propagateBoundsGetQuadActivity(), propagateBoundsQuadVar(), propagateConstraintSides(), and SCIPfindSimpleRational().
◆ SCIPintervalSetRoundingModeUpwards()
void SCIPintervalSetRoundingModeUpwards | ( | void | ) |
sets rounding mode of floating point operations to upwards rounding
Definition at line 346 of file intervalarith.c.
References intervalSetRoundingMode(), and SCIP_ROUND_UPWARDS.
Referenced by consdataUpdateLinearActivity(), consdataUpdateLinearActivityLbChange(), consdataUpdateLinearActivityUbChange(), propagateBounds(), propagateBoundsCons(), propagateBoundsGetQuadActivity(), and propagateBoundsQuadVar().
◆ SCIPintervalSetRoundingModeToNearest()
void SCIPintervalSetRoundingModeToNearest | ( | void | ) |
sets rounding mode of floating point operations to nearest rounding
Definition at line 354 of file intervalarith.c.
References intervalSetRoundingMode(), and SCIP_ROUND_NEAREST.
◆ SCIPintervalSetRoundingModeTowardsZero()
void SCIPintervalSetRoundingModeTowardsZero | ( | void | ) |
sets rounding mode of floating point operations to towards zero rounding
Definition at line 362 of file intervalarith.c.
References intervalSetRoundingMode(), and SCIP_ROUND_ZERO.
◆ SCIPintervalNegateReal()
negates a number in a way that the compiler does not optimize it away
- Parameters
-
x number to negate
Definition at line 370 of file intervalarith.c.
References negate().
Referenced by consdataUpdateLinearActivityLbChange(), consdataUpdateLinearActivityUbChange(), exprgraphNodePropagateBounds(), propagateBoundsCons(), and propagateConstraintSides().
◆ SCIPintervalGetInf()
SCIP_Real SCIPintervalGetInf | ( | SCIP_INTERVAL | interval | ) |
returns infimum of interval
- Parameters
-
interval interval
Definition at line 399 of file intervalarith.c.
References SCIP_Interval::inf.
Referenced by addIntervalGradientEstimator(), enforceViolatedFixedNonlinear(), lpUpdateVarColumnProved(), lpUpdateVarLooseProved(), lpUpdateVarProved(), nlrowCalcActivityBounds(), presolveTryAddLinearReform(), propagateBounds(), propagateBoundsBilinearTerm(), propagateBoundsCons(), propagateBoundsGetQuadActivity(), propagateBoundsQuadVar(), propagateBoundsTightenVar(), propagateConstraintSides(), provedBound(), reformNode2Var(), reformulate(), replaceViolatedByLinearConstraints(), SCIP_DECL_EXPRGRAPHNODEREFORM(), SCIP_DECL_NONLINCONSUPGD(), SCIPintervalSolveUnivariateQuadExpression(), SCIPlpGetModifiedProvedPseudoObjval(), and tightenBounds().
◆ SCIPintervalGetSup()
SCIP_Real SCIPintervalGetSup | ( | SCIP_INTERVAL | interval | ) |
returns supremum of interval
- Parameters
-
interval interval
Definition at line 407 of file intervalarith.c.
References SCIP_Interval::sup.
Referenced by addIntervalGradientEstimator(), enforceViolatedFixedNonlinear(), nlrowCalcActivityBounds(), presolveTryAddLinearReform(), propagateBounds(), propagateBoundsBilinearTerm(), propagateBoundsCons(), propagateBoundsGetQuadActivity(), propagateBoundsQuadVar(), propagateBoundsTightenVar(), propagateConstraintSides(), reformNode2Var(), reformulate(), replaceViolatedByLinearConstraints(), SCIP_DECL_EXPRGRAPHNODEREFORM(), SCIP_DECL_NONLINCONSUPGD(), SCIPintervalSolveUnivariateQuadExpression(), and tightenBounds().
◆ SCIPintervalSet()
void SCIPintervalSet | ( | SCIP_INTERVAL * | resultant, |
SCIP_Real | value | ||
) |
stores given value as interval
- Parameters
-
resultant interval to store value into value value to store
Definition at line 415 of file intervalarith.c.
References SCIP_Interval::inf, NULL, and SCIP_Interval::sup.
Referenced by checkFixedVariables(), consdataCreate(), exprgraphNodePropagateBounds(), exprgraphNodeUpdateBounds(), lpUpdateVarColumnProved(), lpUpdateVarLooseProved(), lpUpdateVarProved(), nlrowCalcActivityBounds(), presolveTryAddLinearReform(), propagateBounds(), propagateBoundsCons(), propagateBoundsGetQuadActivity(), propagateBoundsQuadVar(), provedBound(), SCIP_DECL_EXPRINTEVAL(), SCIPexprgraphAddNode(), SCIPexprgraphReplaceVarByLinearSum(), SCIPexprtreeCheckCurvature(), SCIPintervalDiv(), SCIPintervalPower(), SCIPintervalPowerScalarInteger(), SCIPintervalPowerScalarScalar(), SCIPintervalQuadBivar(), SCIPintervalSolveBivariateQuadExpressionAllScalar(), and SCIPlpGetModifiedProvedPseudoObjval().
◆ SCIPintervalSetBounds()
void SCIPintervalSetBounds | ( | SCIP_INTERVAL * | resultant, |
SCIP_Real | inf, | ||
SCIP_Real | sup | ||
) |
stores given infimum and supremum as interval
- Parameters
-
resultant interval to store value into inf value to store as infimum sup value to store as supremum
Definition at line 427 of file intervalarith.c.
References SCIP_Interval::inf, NULL, and SCIP_Interval::sup.
Referenced by addIntervalGradientEstimator(), addUserEstimator(), checkCurvature(), exprgraphNodePropagateBounds(), getImpliedBounds(), nlrowCalcActivityBounds(), operator-(), presolveDual(), propagateBounds(), propagateBoundsBilinearTerm(), propagateBoundsCons(), propagateBoundsGetQuadActivity(), propagateBoundsQuadVar(), propagateCons(), provedBound(), SCIP_DECL_EXPRCURV(), SCIP_DECL_EXPRGRAPHVARADDED(), SCIPevalExprtreeGlobalBounds(), SCIPevalExprtreeLocalBounds(), SCIPexprcurvPower(), SCIPintervalCos(), SCIPintervalPower(), SCIPintervalPowerScalarInverse(), SCIPintervalQuadBivar(), SCIPintervalSin(), and SCIPintervalSolveBivariateQuadExpressionAllScalar().
◆ SCIPintervalSetEmpty()
void SCIPintervalSetEmpty | ( | SCIP_INTERVAL * | resultant | ) |
sets interval to empty interval, which will be [infinity, -infinity]
- Parameters
-
resultant resultant interval of operation
Definition at line 441 of file intervalarith.c.
References SCIP_Interval::inf, NULL, and SCIP_Interval::sup.
Referenced by addBilinearTerm(), addQuadVarTerm(), catchQuadVarEvents(), consdataCreate(), delQuadVarTermPos(), mergeAndCleanLinearVars(), mergeAndCleanQuadVarTerms(), removeBilinearTermsPos(), replaceQuadVarTermPos(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_EXPRINTEVAL(), SCIPaddQuadVarLinearCoefQuadratic(), SCIPaddSquareCoefQuadratic(), SCIPchgBilinCoefQuadratic(), SCIPchgLinearCoefQuadratic(), SCIPchgSquareCoefQuadratic(), SCIPintervalLog(), SCIPintervalPowerScalar(), SCIPintervalPowerScalarInverse(), SCIPintervalQuad(), SCIPintervalSolveBivariateQuadExpressionAllScalar(), SCIPintervalSolveUnivariateQuadExpression(), SCIPintervalSolveUnivariateQuadExpressionPositive(), SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar(), and SCIPintervalSquareRoot().
◆ SCIPintervalIsEmpty()
SCIP_Bool SCIPintervalIsEmpty | ( | SCIP_Real | infinity, |
SCIP_INTERVAL | operand | ||
) |
indicates whether interval is empty, i.e., whether inf > sup
- Parameters
-
infinity value for infinity operand operand of operation
Definition at line 452 of file intervalarith.c.
References FALSE, SCIP_Interval::inf, and SCIP_Interval::sup.
Referenced by computeBoundsX(), computeBoundsZ(), enforceViolatedFixedNonlinear(), exprgraphNodePropagateBounds(), exprgraphNodeUpdateBounds(), propagateBounds(), propagateBoundsBilinearTerm(), propagateBoundsCons(), propagateBoundsGetQuadActivity(), propagateBoundsQuadVar(), propagateBoundsTightenVar(), reformEnsureChildrenMinCurvature(), reformMonomial(), reformulate(), replaceViolatedByLinearConstraints(), SCIP_DECL_EXPRINTEVAL(), SCIPexprgraphCheckCurvature(), SCIPexprgraphGetNodePolynomialMonomialCurvature(), SCIPexprgraphPropagateVarBounds(), SCIPexprgraphTightenNodeBounds(), SCIPexprgraphUpdateNodeBoundsCurvature(), SCIPintervalAbs(), SCIPintervalAdd(), SCIPintervalAddScalar(), SCIPintervalCos(), SCIPintervalDiv(), SCIPintervalDivScalar(), SCIPintervalExp(), SCIPintervalLog(), SCIPintervalMax(), SCIPintervalMin(), SCIPintervalMul(), SCIPintervalMulInf(), SCIPintervalMulScalar(), SCIPintervalMulScalarInf(), SCIPintervalMulScalarSup(), SCIPintervalMulSup(), SCIPintervalPower(), SCIPintervalPowerScalar(), SCIPintervalQuad(), SCIPintervalQuadUpperBound(), SCIPintervalReciprocal(), SCIPintervalSign(), SCIPintervalSignPowerScalar(), SCIPintervalSin(), SCIPintervalSolveBivariateQuadExpressionAllScalar(), SCIPintervalSolveUnivariateQuadExpression(), SCIPintervalSquare(), SCIPintervalSquareRoot(), and SCIPintervalSub().
◆ SCIPintervalSetEntire()
void SCIPintervalSetEntire | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant | ||
) |
sets interval to entire [-infinity, +infinity]
- Parameters
-
infinity value for infinity resultant resultant interval of operation
Definition at line 464 of file intervalarith.c.
References SCIP_Interval::inf, infinity, NULL, and SCIP_Interval::sup.
Referenced by computeBoundsX(), computeBoundsZ(), exprgraphCreateNode(), exprgraphNodePropagateBounds(), SCIP_DECL_EXPRINTEVAL(), SCIPexprEvalIntUser(), SCIPexprgraphAddNode(), SCIPexprgraphAddVars(), SCIPexprgraphEnableNode(), SCIPexprgraphNodeSplitOffLinear(), SCIPexprgraphReplaceVarByLinearSum(), SCIPintervalScalprod(), SCIPintervalScalprodScalarsInf(), and SCIPintervalScalprodScalarsSup().
◆ SCIPintervalIsEntire()
SCIP_Bool SCIPintervalIsEntire | ( | SCIP_Real | infinity, |
SCIP_INTERVAL | operand | ||
) |
indicates whether interval is entire, i.e., whether inf <= -infinity and sup >= infinity
- Parameters
-
infinity value for infinity operand operand of operation
Definition at line 476 of file intervalarith.c.
References SCIP_Interval::inf, infinity, and SCIP_Interval::sup.
Referenced by exprgraphNodePropagateBounds(), nlrowCalcActivityBounds(), propagateBoundsBilinearTerm(), propagateBoundsCons(), propagateBoundsQuadVar(), and SCIP_DECL_EXPRINTEVAL().
◆ SCIPintervalIsPositiveInfinity()
SCIP_Bool SCIPintervalIsPositiveInfinity | ( | SCIP_Real | infinity, |
SCIP_INTERVAL | operand | ||
) |
indicates whether interval is positive infinity, i.e., [infinity, infinity]
- Parameters
-
infinity value for infinity operand operand of operation
Definition at line 485 of file intervalarith.c.
References SCIP_Interval::inf, and SCIP_Interval::sup.
Referenced by propagateBoundsTightenVar().
◆ SCIPintervalIsNegativeInfinity()
SCIP_Bool SCIPintervalIsNegativeInfinity | ( | SCIP_Real | infinity, |
SCIP_INTERVAL | operand | ||
) |
indicates whether interval is negative infinity, i.e., [-infinity, -infinity]
- Parameters
-
infinity value for infinity operand operand of operation
Definition at line 494 of file intervalarith.c.
References SCIP_Interval::inf, and SCIP_Interval::sup.
Referenced by propagateBoundsTightenVar().
◆ SCIPintervalIsSubsetEQ()
SCIP_Bool SCIPintervalIsSubsetEQ | ( | SCIP_Real | infinity, |
SCIP_INTERVAL | operand1, | ||
SCIP_INTERVAL | operand2 | ||
) |
indicates whether operand1 is contained in operand2
- Parameters
-
infinity value for infinity operand1 first operand of operation operand2 second operand of operation
Definition at line 503 of file intervalarith.c.
References FALSE, SCIP_Interval::inf, MAX, SCIP_Interval::sup, and TRUE.
Referenced by propagateBoundsCons().
◆ SCIPintervalAreDisjoint()
SCIP_Bool SCIPintervalAreDisjoint | ( | SCIP_INTERVAL | operand1, |
SCIP_INTERVAL | operand2 | ||
) |
indicates whether operand1 and operand2 are disjoint
- Parameters
-
operand1 first operand of operation operand2 second operand of operation
Definition at line 522 of file intervalarith.c.
References SCIP_Interval::inf, and SCIP_Interval::sup.
Referenced by propagateBoundsCons().
◆ SCIPintervalIntersect()
void SCIPintervalIntersect | ( | SCIP_INTERVAL * | resultant, |
SCIP_INTERVAL | operand1, | ||
SCIP_INTERVAL | operand2 | ||
) |
intersection of two intervals
- Parameters
-
resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation
Definition at line 531 of file intervalarith.c.
References SCIP_Interval::inf, MAX, NULL, and SCIP_Interval::sup.
Referenced by exprgraphNodeUpdateBounds(), SCIPexprgraphTightenNodeBounds(), SCIPexprgraphUpdateNodeBoundsCurvature(), SCIPintervalPowerScalarInverse(), SCIPintervalSolveBivariateQuadExpressionAllScalar(), SCIPintervalSolveUnivariateQuadExpression(), SCIPintervalSolveUnivariateQuadExpressionPositive(), and SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar().
◆ SCIPintervalUnify()
void SCIPintervalUnify | ( | SCIP_INTERVAL * | resultant, |
SCIP_INTERVAL | operand1, | ||
SCIP_INTERVAL | operand2 | ||
) |
interval enclosure of the union of two intervals
- Parameters
-
resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation
Definition at line 544 of file intervalarith.c.
References SCIP_Interval::inf, MAX, NULL, and SCIP_Interval::sup.
Referenced by SCIPintervalPowerScalarInverse(), SCIPintervalSolveBivariateQuadExpressionAllScalar(), and SCIPintervalSolveUnivariateQuadExpression().
◆ SCIPintervalAddInf()
void SCIPintervalAddInf | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_INTERVAL | operand2 | ||
) |
adds operand1 and operand2 and stores infimum of result in infimum of resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation
Definition at line 571 of file intervalarith.c.
References SCIP_Interval::inf, infinity, intervalGetRoundingMode(), NULL, and SCIP_ROUND_DOWNWARDS.
Referenced by SCIPintervalAdd(), SCIPintervalAddVectors(), SCIPintervalScalprod(), and SCIPintervalScalprodScalarsInf().
◆ SCIPintervalAddSup()
void SCIPintervalAddSup | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_INTERVAL | operand2 | ||
) |
adds operand1 and operand2 and stores supremum of result in supremum of resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation
Definition at line 598 of file intervalarith.c.
References infinity, intervalGetRoundingMode(), NULL, SCIP_ROUND_UPWARDS, and SCIP_Interval::sup.
Referenced by SCIPintervalAdd(), SCIPintervalAddVectors(), SCIPintervalScalprod(), and SCIPintervalScalprodScalarsSup().
◆ SCIPintervalAdd()
void SCIPintervalAdd | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_INTERVAL | operand2 | ||
) |
adds operand1 and operand2 and stores result in resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation
Definition at line 625 of file intervalarith.c.
References intervalGetRoundingMode(), intervalSetRoundingMode(), NULL, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalAddInf(), SCIPintervalAddSup(), and SCIPintervalIsEmpty().
Referenced by exprgraphNodePropagateBounds(), lpUpdateVarLooseProved(), lpUpdateVarProved(), nlrowCalcActivityBounds(), operator+(), presolveTryAddLinearReform(), propagateBounds(), propagateBoundsCons(), propagateBoundsGetQuadActivity(), provedBound(), SCIP_DECL_EXPRINTEVAL(), SCIPintervalQuadBivar(), and SCIPlpGetModifiedProvedPseudoObjval().
◆ SCIPintervalAddScalar()
void SCIPintervalAddScalar | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_Real | operand2 | ||
) |
adds operand1 and scalar operand2 and stores result in resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation
Definition at line 652 of file intervalarith.c.
References SCIP_Interval::inf, infinity, intervalGetRoundingMode(), intervalSetRoundingMode(), NULL, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalIsEmpty(), and SCIP_Interval::sup.
Referenced by exprgraphNodePropagateBounds(), propagateBounds(), propagateBoundsQuadVar(), SCIP_DECL_EXPRINTEVAL(), SCIPintervalQuadBivar(), SCIPintervalSolveBivariateQuadExpressionAllScalar(), and SCIPintervalSubScalar().
◆ SCIPintervalAddVectors()
void SCIPintervalAddVectors | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
int | length, | ||
SCIP_INTERVAL * | operand1, | ||
SCIP_INTERVAL * | operand2 | ||
) |
adds vector operand1 and vector operand2 and stores result in vector resultant
- Parameters
-
infinity value for infinity resultant array of resultant intervals of operation length length of arrays operand1 array of first operands of operation operand2 array of second operands of operation
Definition at line 702 of file intervalarith.c.
References intervalGetRoundingMode(), intervalSetRoundingMode(), SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalAddInf(), and SCIPintervalAddSup().
◆ SCIPintervalSub()
void SCIPintervalSub | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_INTERVAL | operand2 | ||
) |
subtracts operand2 from operand1 and stores result in resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation
Definition at line 732 of file intervalarith.c.
References SCIP_Interval::inf, infinity, intervalGetRoundingMode(), intervalSetRoundingMode(), NULL, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalIsEmpty(), and SCIP_Interval::sup.
Referenced by exprgraphNodePropagateBounds(), lpUpdateVarColumnProved(), lpUpdateVarProved(), operator-(), propagateBounds(), propagateBoundsCons(), propagateBoundsQuadVar(), provedBound(), SCIP_DECL_EXPRINTEVAL(), SCIPintervalSolveBivariateQuadExpressionAllScalar(), and SCIPlpGetModifiedProvedPseudoObjval().
◆ SCIPintervalSubScalar()
void SCIPintervalSubScalar | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_Real | operand2 | ||
) |
subtracts scalar operand2 from operand1 and stores result in resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation
Definition at line 780 of file intervalarith.c.
References SCIPintervalAddScalar().
Referenced by exprgraphNodePropagateBounds(), and propagateBounds().
◆ SCIPintervalMulInf()
void SCIPintervalMulInf | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_INTERVAL | operand2 | ||
) |
multiplies operand1 with operand2 and stores infimum of result in infimum of resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation; can be +/-inf operand2 second operand of operation; can be +/-inf
Definition at line 791 of file intervalarith.c.
References SCIP_Interval::inf, infinity, intervalGetRoundingMode(), NULL, SCIP_Real, SCIP_ROUND_DOWNWARDS, SCIPintervalIsEmpty(), SCIPintervalMulScalarInf(), and SCIP_Interval::sup.
Referenced by propagateBoundsCons(), SCIPintervalMul(), and SCIPintervalScalprod().
◆ SCIPintervalMulSup()
void SCIPintervalMulSup | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_INTERVAL | operand2 | ||
) |
multiplies operand1 with operand2 and stores supremum of result in supremum of resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation; can be +/-inf operand2 second operand of operation; can be +/-inf
Definition at line 851 of file intervalarith.c.
References SCIP_Interval::inf, infinity, intervalGetRoundingMode(), MAX, NULL, SCIP_Real, SCIP_ROUND_UPWARDS, SCIPintervalIsEmpty(), SCIPintervalMulScalarSup(), and SCIP_Interval::sup.
Referenced by propagateBoundsCons(), SCIPintervalMul(), and SCIPintervalScalprod().
◆ SCIPintervalMul()
void SCIPintervalMul | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_INTERVAL | operand2 | ||
) |
multiplies operand1 with operand2 and stores result in resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation; can be +/-inf operand2 second operand of operation; can be +/-inf
Definition at line 911 of file intervalarith.c.
References intervalGetRoundingMode(), intervalSetRoundingMode(), NULL, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalIsEmpty(), SCIPintervalMulInf(), and SCIPintervalMulSup().
Referenced by exprgraphNodePropagateBounds(), lpUpdateVarColumnProved(), lpUpdateVarLooseProved(), lpUpdateVarProved(), operator*(), provedBound(), SCIP_DECL_EXPRINTEVAL(), SCIPintervalDiv(), SCIPintervalPower(), SCIPintervalQuad(), and SCIPlpGetModifiedProvedPseudoObjval().
◆ SCIPintervalMulScalarInf()
void SCIPintervalMulScalarInf | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_Real | operand2 | ||
) |
multiplies operand1 with scalar operand2 and stores infimum of result in infimum of resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation; can be +/- inf
Definition at line 938 of file intervalarith.c.
References SCIP_Interval::inf, infinity, intervalGetRoundingMode(), NULL, SCIP_ROUND_DOWNWARDS, SCIPintervalIsEmpty(), and SCIP_Interval::sup.
Referenced by SCIPintervalMulInf(), SCIPintervalMulScalar(), and SCIPintervalScalprodScalarsInf().
◆ SCIPintervalMulScalarSup()
void SCIPintervalMulScalarSup | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_Real | operand2 | ||
) |
multiplies operand1 with scalar operand2 and stores supremum of result in supremum of resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation; can be +/- inf
Definition at line 994 of file intervalarith.c.
References SCIP_Interval::inf, infinity, intervalGetRoundingMode(), NULL, SCIP_ROUND_UPWARDS, SCIPintervalIsEmpty(), and SCIP_Interval::sup.
Referenced by SCIPintervalMulScalar(), SCIPintervalMulSup(), and SCIPintervalScalprodScalarsSup().
◆ SCIPintervalMulScalar()
void SCIPintervalMulScalar | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_Real | operand2 | ||
) |
multiplies operand1 with scalar operand2 and stores result in resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation
Definition at line 1050 of file intervalarith.c.
References intervalGetRoundingMode(), intervalSetRoundingMode(), NULL, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalIsEmpty(), SCIPintervalMulScalarInf(), and SCIPintervalMulScalarSup().
Referenced by addIntervalGradientEstimator(), exprgraphNodePropagateBounds(), nlrowCalcActivityBounds(), presolveTryAddLinearReform(), propagateBounds(), propagateBoundsCons(), propagateBoundsGetQuadActivity(), propagateBoundsQuadVar(), replaceViolatedByLinearConstraints(), SCIP_DECL_EXPRINTEVAL(), and SCIPintervalSolveBivariateQuadExpressionAllScalar().
◆ SCIPintervalDiv()
void SCIPintervalDiv | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_INTERVAL | operand2 | ||
) |
divides operand1 by operand2 and stores result in resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation
Definition at line 1076 of file intervalarith.c.
References SCIP_Interval::inf, infinity, intervalGetRoundingMode(), intervalSetRoundingMode(), NULL, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalIsEmpty(), SCIPintervalMul(), SCIPintervalSet(), and SCIP_Interval::sup.
Referenced by exprgraphNodePropagateBounds(), operator/(), SCIP_DECL_EXPRINTEVAL(), and SCIPintervalSolveUnivariateQuadExpression().
◆ SCIPintervalDivScalar()
void SCIPintervalDivScalar | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_Real | operand2 | ||
) |
divides operand1 by scalar operand2 and stores result in resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation
Definition at line 1130 of file intervalarith.c.
References SCIP_Interval::inf, infinity, intervalGetRoundingMode(), intervalSetRoundingMode(), NULL, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalIsEmpty(), and SCIP_Interval::sup.
Referenced by presolveTryAddLinearReform(), propagateBounds(), and propagateBoundsCons().
◆ SCIPintervalScalprod()
void SCIPintervalScalprod | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
int | length, | ||
SCIP_INTERVAL * | operand1, | ||
SCIP_INTERVAL * | operand2 | ||
) |
computes the scalar product of two vectors of intervals and stores result in resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation length length of vectors operand1 first vector as array of intervals; can have +/-inf entries operand2 second vector as array of intervals; can have +/-inf entries
Definition at line 1233 of file intervalarith.c.
References SCIP_Interval::inf, infinity, intervalGetRoundingMode(), intervalSetRoundingMode(), SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalAddInf(), SCIPintervalAddSup(), SCIPintervalMulInf(), SCIPintervalMulSup(), SCIPintervalSetEntire(), and SCIP_Interval::sup.
◆ SCIPintervalScalprodScalarsInf()
void SCIPintervalScalprodScalarsInf | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
int | length, | ||
SCIP_INTERVAL * | operand1, | ||
SCIP_Real * | operand2 | ||
) |
computes scalar product of a vector of intervals and a vector of scalars and stores infimum of result in infimum of resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation length length of vectors operand1 first vector as array of intervals operand2 second vector as array of scalars; can have +/-inf entries
Definition at line 1275 of file intervalarith.c.
References SCIP_Interval::inf, infinity, intervalGetRoundingMode(), SCIP_ROUND_DOWNWARDS, SCIPintervalAddInf(), SCIPintervalMulScalarInf(), SCIPintervalSetEntire(), and SCIP_Interval::sup.
Referenced by SCIPintervalScalprodScalars().
◆ SCIPintervalScalprodScalarsSup()
void SCIPintervalScalprodScalarsSup | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
int | length, | ||
SCIP_INTERVAL * | operand1, | ||
SCIP_Real * | operand2 | ||
) |
computes the scalar product of a vector of intervals and a vector of scalars and stores supremum of result in supremum of resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation length length of vectors operand1 first vector as array of intervals operand2 second vector as array of scalars; can have +/-inf entries
Definition at line 1303 of file intervalarith.c.
References SCIP_Interval::inf, infinity, intervalGetRoundingMode(), SCIP_ROUND_UPWARDS, SCIPintervalAddSup(), SCIPintervalMulScalarSup(), SCIPintervalSetEntire(), and SCIP_Interval::sup.
Referenced by SCIPintervalScalprodScalars().
◆ SCIPintervalScalprodScalars()
void SCIPintervalScalprodScalars | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
int | length, | ||
SCIP_INTERVAL * | operand1, | ||
SCIP_Real * | operand2 | ||
) |
computes the scalar product of a vector of intervals and a vector of scalars and stores result in resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation length length of vectors operand1 first vector as array of intervals operand2 second vector as array of scalars; can have +/-inf entries
Definition at line 1329 of file intervalarith.c.
References SCIP_Interval::inf, intervalGetRoundingMode(), intervalSetRoundingMode(), SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalScalprodScalarsInf(), SCIPintervalScalprodScalarsSup(), and SCIP_Interval::sup.
Referenced by SCIP_DECL_EXPRINTEVAL().
◆ SCIPintervalSquare()
void SCIPintervalSquare | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand | ||
) |
squares operand and stores result in resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand operand of operation
Definition at line 1357 of file intervalarith.c.
References SCIP_Interval::inf, infinity, intervalGetRoundingMode(), intervalSetRoundingMode(), MAX, NULL, SCIP_Real, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalIsEmpty(), SCIP_Interval::sup, x, and y.
Referenced by exprgraphNodePropagateBounds(), propagateBounds(), SCIP_DECL_EXPRINTEVAL(), and square().
◆ SCIPintervalSquareRoot()
void SCIPintervalSquareRoot | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand | ||
) |
stores (positive part of) square root of operand in resultant
- Attention
- we assume a correctly rounded sqrt(double) function when rounding is to nearest
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand operand of operation
Definition at line 1429 of file intervalarith.c.
References SCIP_Interval::inf, infinity, intervalGetRoundingMode(), NULL, SCIP_Real, SCIP_REAL_MAX, SCIP_REAL_MIN, SCIP_ROUND_NEAREST, SCIPintervalIsEmpty(), SCIPintervalSetEmpty(), SCIPnextafter(), sqrt(), and SCIP_Interval::sup.
Referenced by exprgraphNodePropagateBounds(), propagateBounds(), SCIP_DECL_EXPRINTEVAL(), and sqrt().
◆ SCIPintervalPower()
void SCIPintervalPower | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_INTERVAL | operand2 | ||
) |
stores operand1 to the power of operand2 in resultant
uses SCIPintervalPowerScalar if operand2 is a scalar, otherwise computes exp(op2*log(op1))
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation
Definition at line 1490 of file intervalarith.c.
References SCIP_Interval::inf, NULL, SCIPintervalExp(), SCIPintervalIsEmpty(), SCIPintervalLog(), SCIPintervalMul(), SCIPintervalPowerScalar(), SCIPintervalSet(), SCIPintervalSetBounds(), and SCIP_Interval::sup.
Referenced by pow(), and SCIPintervalPowerScalarInverse().
◆ SCIPintervalPowerScalarIntegerInf()
computes lower bound on power of a scalar operand1 to an integer operand2 both operands need to be finite numbers need to have operand1 >= 0 and need to have operand2 >= 0 if operand1 == 0
- Parameters
-
operand1 first operand of operation operand2 second operand of operation
Definition at line 1535 of file intervalarith.c.
References intervalGetRoundingMode(), intervalSetRoundingMode(), SCIP_Real, SCIP_ROUND_DOWNWARDS, SCIPintervalPowerScalarIntegerSup(), and TRUE.
Referenced by SCIPintervalPowerScalar(), and SCIPintervalPowerScalarIntegerSup().
◆ SCIPintervalPowerScalarIntegerSup()
computes upper bound on power of a scalar operand1 to an integer operand2 both operands need to be finite numbers need to have operand1 >= 0 and need to have operand2 >= 0 if operand1 == 0
- Parameters
-
operand1 first operand of operation operand2 second operand of operation
Definition at line 1617 of file intervalarith.c.
References intervalGetRoundingMode(), intervalSetRoundingMode(), SCIP_Real, SCIP_ROUND_UPWARDS, SCIPintervalPowerScalarIntegerInf(), and TRUE.
Referenced by SCIPintervalPowerScalar(), and SCIPintervalPowerScalarIntegerInf().
◆ SCIPintervalPowerScalarInteger()
void SCIPintervalPowerScalarInteger | ( | SCIP_INTERVAL * | resultant, |
SCIP_Real | operand1, | ||
int | operand2 | ||
) |
computes bounds on power of a scalar operand1 to an integer operand2 both operands need to be finite numbers need to have operand1 >= 0 and need to have operand2 >= 0 if operand1 == 0
- Parameters
-
resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation
Definition at line 1691 of file intervalarith.c.
References SCIP_Interval::inf, intervalGetRoundingMode(), intervalSetRoundingMode(), negate(), SCIP_Real, SCIP_REAL_MAX, SCIP_ROUND_UPWARDS, SCIPintervalPowerScalarInteger(), SCIPintervalReciprocal(), SCIPintervalSet(), SCIP_Interval::sup, and TRUE.
Referenced by SCIPintervalPowerScalarInteger().
◆ SCIPintervalPowerScalarScalar()
void SCIPintervalPowerScalarScalar | ( | SCIP_INTERVAL * | resultant, |
SCIP_Real | operand1, | ||
SCIP_Real | operand2 | ||
) |
stores bounds on the power of a scalar operand1 to a scalar operand2 in resultant both operands need to be finite numbers need to have operand1 >= 0 or operand2 integer and need to have operand2 >= 0 if operand1 == 0
- Attention
- we assume a correctly rounded pow(double) function when rounding is to nearest
- Parameters
-
resultant resultant of operation operand1 first operand of operation operand2 second operand of operation
Definition at line 1782 of file intervalarith.c.
References SCIP_Interval::inf, intervalGetRoundingMode(), NULL, pow(), SCIP_Real, SCIP_REAL_MAX, SCIP_REAL_MIN, SCIP_ROUND_NEAREST, SCIPintervalSet(), SCIPnextafter(), and SCIP_Interval::sup.
◆ SCIPintervalPowerScalar()
void SCIPintervalPowerScalar | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_Real | operand2 | ||
) |
stores operand1 to the power of the scalar operand2 in resultant
- Attention
- we assume a correctly rounded pow(double) function when rounding is to nearest
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation
Definition at line 1825 of file intervalarith.c.
References SCIP_Interval::inf, infinity, intervalGetRoundingMode(), MAX, NULL, pow(), SCIP_Bool, SCIP_REAL_MAX, SCIP_REAL_MIN, SCIP_ROUND_NEAREST, SCIPintervalIsEmpty(), SCIPintervalPowerScalarIntegerInf(), SCIPintervalPowerScalarIntegerSup(), SCIPintervalSetEmpty(), SCIPnextafter(), and SCIP_Interval::sup.
Referenced by exprgraphNodePropagateBounds(), pow(), SCIP_DECL_EXPRINTEVAL(), and SCIPintervalPower().
◆ SCIPintervalPowerScalarInverse()
void SCIPintervalPowerScalarInverse | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | basedomain, | ||
SCIP_Real | exponent, | ||
SCIP_INTERVAL | image | ||
) |
given an interval for the image of a power operation, computes an interval for the origin that is, for y = x^p with p = exponent a given scalar and y = image a given interval, computes a subinterval x of basedomain such that y in x^p and such that for all z in basedomain less x, z^p not in y
- Parameters
-
infinity value for infinity resultant resultant interval of operation basedomain domain of base exponent exponent image interval image of power
Definition at line 2073 of file intervalarith.c.
References EPSISINT, SCIP_Interval::inf, MAX, NULL, SCIPintervalIntersect(), SCIPintervalPower(), SCIPintervalReciprocal(), SCIPintervalSetBounds(), SCIPintervalSetEmpty(), SCIPintervalUnify(), and SCIP_Interval::sup.
Referenced by exprgraphNodePropagateBounds().
◆ SCIPintervalSignPowerScalar()
void SCIPintervalSignPowerScalar | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_Real | operand2 | ||
) |
stores operand1 to the signed power of the scalar positive operand2 in resultant
the signed power of x w.r.t. an exponent n >= 0 is given as sign(x) * abs(x)^n
- Attention
- we assume correctly rounded sqrt(double) and pow(double) functions when rounding is to nearest
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation
Definition at line 2154 of file intervalarith.c.
References SCIP_Interval::inf, infinity, intervalGetRoundingMode(), intervalSetRoundingMode(), negate(), NULL, pow(), SCIP_REAL_MAX, SCIP_REAL_MIN, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_NEAREST, SCIP_ROUND_UPWARDS, SCIPintervalIsEmpty(), SCIPnextafter(), sqrt(), and SCIP_Interval::sup.
Referenced by exprgraphNodePropagateBounds(), SCIP_DECL_EXPRINTEVAL(), and signpow().
◆ SCIPintervalReciprocal()
void SCIPintervalReciprocal | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand | ||
) |
computes the reciprocal of an interval
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand operand of operation
Definition at line 2326 of file intervalarith.c.
References SCIP_Interval::inf, infinity, intervalGetRoundingMode(), intervalSetRoundingMode(), NULL, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalIsEmpty(), and SCIP_Interval::sup.
Referenced by SCIPintervalPowerScalarInteger(), and SCIPintervalPowerScalarInverse().
◆ SCIPintervalExp()
void SCIPintervalExp | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand | ||
) |
stores exponential of operand in resultant
- Attention
- we assume a correctly rounded exp(double) function when rounding is to nearest
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand operand of operation
Definition at line 2399 of file intervalarith.c.
References exp(), SCIP_Interval::inf, infinity, intervalGetRoundingMode(), NULL, SCIP_Real, SCIP_REAL_MAX, SCIP_REAL_MIN, SCIP_ROUND_NEAREST, SCIPintervalIsEmpty(), SCIPnextafter(), and SCIP_Interval::sup.
Referenced by exp(), exprgraphNodePropagateBounds(), SCIP_DECL_EXPRINTEVAL(), and SCIPintervalPower().
◆ SCIPintervalLog()
void SCIPintervalLog | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand | ||
) |
stores natural logarithm of operand in resultant
- Attention
- we assume a correctly rounded log(double) function when rounding is to nearest
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand operand of operation
Definition at line 2483 of file intervalarith.c.
References SCIP_Interval::inf, infinity, intervalGetRoundingMode(), log(), NULL, SCIP_Real, SCIP_REAL_MAX, SCIP_REAL_MIN, SCIP_ROUND_NEAREST, SCIPintervalIsEmpty(), SCIPintervalSetEmpty(), SCIPnextafter(), and SCIP_Interval::sup.
Referenced by exprgraphNodePropagateBounds(), log(), SCIP_DECL_EXPRINTEVAL(), and SCIPintervalPower().
◆ SCIPintervalMin()
void SCIPintervalMin | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_INTERVAL | operand2 | ||
) |
stores minimum of operands in resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation
Definition at line 2551 of file intervalarith.c.
References SCIP_Interval::inf, NULL, SCIPintervalIsEmpty(), and SCIP_Interval::sup.
Referenced by SCIP_DECL_EXPRINTEVAL().
◆ SCIPintervalMax()
void SCIPintervalMax | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand1, | ||
SCIP_INTERVAL | operand2 | ||
) |
stores maximum of operands in resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand1 first operand of operation operand2 second operand of operation
Definition at line 2567 of file intervalarith.c.
References SCIP_Interval::inf, MAX, NULL, SCIPintervalIsEmpty(), and SCIP_Interval::sup.
Referenced by SCIP_DECL_EXPRINTEVAL().
◆ SCIPintervalAbs()
void SCIPintervalAbs | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand | ||
) |
stores absolute value of operand in resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand operand of operation
Definition at line 2583 of file intervalarith.c.
References SCIP_Interval::inf, MAX, NULL, SCIPintervalIsEmpty(), and SCIP_Interval::sup.
Referenced by abs(), fabs(), and SCIP_DECL_EXPRINTEVAL().
◆ SCIPintervalSin()
void SCIPintervalSin | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand | ||
) |
stores sine value of operand in resultant NOTE: the operations are not applied rounding-safe here
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand operand of operation
Definition at line 2611 of file intervalarith.c.
References a, b, SCIP_Interval::inf, M_PI, MAX, NULL, REALABS, SCIP_Real, SCIPintervalIsEmpty(), SCIPintervalSetBounds(), sin(), sin_extremepoints, and SCIP_Interval::sup.
Referenced by SCIP_DECL_EXPRINTEVAL(), and sin().
◆ SCIPintervalCos()
void SCIPintervalCos | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand | ||
) |
stores cosine value of operand in resultant NOTE: the operations are not applied rounding-safe here
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand operand of operation
Definition at line 2695 of file intervalarith.c.
References a, b, cos(), cos_extremepoints, SCIP_Interval::inf, M_PI, MAX, NULL, REALABS, SCIP_Real, SCIPintervalIsEmpty(), SCIPintervalSetBounds(), and SCIP_Interval::sup.
Referenced by cos(), and SCIP_DECL_EXPRINTEVAL().
◆ SCIPintervalSign()
void SCIPintervalSign | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | operand | ||
) |
stores sign of operand in resultant
- Parameters
-
infinity value for infinity resultant resultant interval of operation operand operand of operation
Definition at line 2777 of file intervalarith.c.
References SCIP_Interval::inf, NULL, SCIPintervalIsEmpty(), and SCIP_Interval::sup.
Referenced by SCIP_DECL_EXPRINTEVAL(), and sign().
◆ SCIPintervalQuadUpperBound()
SCIP_Real SCIPintervalQuadUpperBound | ( | SCIP_Real | infinity, |
SCIP_Real | a, | ||
SCIP_INTERVAL | b_, | ||
SCIP_INTERVAL | x | ||
) |
computes exact upper bound on \( a x^2 + b x \) for x in [xlb, xub], b an interval, and a scalar
Uses Algorithm 2.2 from Domes and Neumaier: Constraint propagation on quadratic constraints (2008)
- Parameters
-
infinity value for infinity a coefficient of x^2 b_ coefficient of x x range of x
Definition at line 2806 of file intervalarith.c.
References b, SCIP_Interval::inf, infinity, intervalGetRoundingMode(), intervalSetRoundingMode(), MAX, negate(), SCIP_Real, SCIP_ROUND_UPWARDS, SCIPintervalIsEmpty(), SCIPintervalQuadUpperBound(), SCIP_Interval::sup, and x.
Referenced by propagateBoundsGetQuadActivity(), propagateBoundsQuadVar(), SCIPintervalQuad(), SCIPintervalQuadUpperBound(), and SCIPintervalSolveBivariateQuadExpressionAllScalar().
◆ SCIPintervalQuad()
void SCIPintervalQuad | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_Real | sqrcoeff, | ||
SCIP_INTERVAL | lincoeff, | ||
SCIP_INTERVAL | xrng | ||
) |
stores range of quadratic term in resultant
given scalar a and intervals b and x, computes interval for \( a x^2 + b x \)
- Parameters
-
infinity value for infinity resultant resultant interval of operation sqrcoeff coefficient of x^2 lincoeff coefficient of x xrng range of x
Definition at line 2901 of file intervalarith.c.
References SCIP_Interval::inf, SCIP_Real, SCIPintervalIsEmpty(), SCIPintervalMul(), SCIPintervalQuadUpperBound(), SCIPintervalSetEmpty(), and SCIP_Interval::sup.
Referenced by nlrowCalcActivityBounds(), propagateBoundsQuadVar(), SCIP_DECL_EXPRINTEVAL(), SCIPintervalQuadBivar(), and SCIPintervalSolveBivariateQuadExpressionAllScalar().
◆ SCIPintervalSolveUnivariateQuadExpressionPositive()
void SCIPintervalSolveUnivariateQuadExpressionPositive | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | sqrcoeff, | ||
SCIP_INTERVAL | lincoeff, | ||
SCIP_INTERVAL | rhs, | ||
SCIP_INTERVAL | xbnds | ||
) |
computes interval with positive solutions of a quadratic equation with interval coefficients
Given intervals a, b, and c, this function computes an interval that contains all positive solutions of \( a x^2 + b x \in c\) within xbnds.
- Parameters
-
infinity value for infinity resultant resultant interval of operation sqrcoeff coefficient of x^2 lincoeff coefficient of x rhs right hand side of equation xbnds bounds on x
Definition at line 2936 of file intervalarith.c.
References SCIP_Interval::inf, infinity, NULL, SCIPdebugMessage, SCIPdebugPrintf, SCIPintervalIntersect(), SCIPintervalSetEmpty(), SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar(), and SCIP_Interval::sup.
Referenced by SCIPintervalSolveBivariateQuadExpressionAllScalar(), SCIPintervalSolveUnivariateQuadExpression(), and SCIPintervalSolveUnivariateQuadExpressionNegative().
◆ SCIPintervalSolveUnivariateQuadExpressionNegative()
void SCIPintervalSolveUnivariateQuadExpressionNegative | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | sqrcoeff, | ||
SCIP_INTERVAL | lincoeff, | ||
SCIP_INTERVAL | rhs, | ||
SCIP_INTERVAL | xbnds | ||
) |
computes interval with negative solutions of a quadratic equation with interval coefficients
Given intervals a, b, and c, this function computes an interval that contains all negative solutions of \( a x^2 + b x \in c\) within xbnds.
- Parameters
-
infinity value for infinity resultant resultant interval of operation sqrcoeff coefficient of x^2 lincoeff coefficient of x rhs right hand side of equation xbnds bounds on x
Definition at line 2983 of file intervalarith.c.
References SCIP_Interval::inf, SCIP_Real, SCIPintervalSolveUnivariateQuadExpressionPositive(), and SCIP_Interval::sup.
Referenced by SCIPintervalSolveBivariateQuadExpressionAllScalar(), and SCIPintervalSolveUnivariateQuadExpression().
◆ SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar()
void SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_Real | sqrcoeff, | ||
SCIP_Real | lincoeff, | ||
SCIP_Real | rhs, | ||
SCIP_INTERVAL | xbnds | ||
) |
computes positive solutions of a quadratic equation with scalar coefficients
Given scalar a, b, and c, this function computes an interval that contains all positive solutions of \( a x^2 + b x \geq c\) within xbnds. Implements Algorithm 3.2 from Domes and Neumaier: Constraint propagation on quadratic constraints (2008).
- Parameters
-
infinity value for infinity resultant resultant interval of operation sqrcoeff coefficient of x^2 lincoeff coefficient of x rhs right hand side of equation xbnds bounds on x
Definition at line 3019 of file intervalarith.c.
References b, SCIP_Interval::inf, infinity, intervalGetRoundingMode(), intervalSetRoundingMode(), MAX, negate(), NULL, SCIP_Real, SCIP_REAL_MAX, SCIP_REAL_MIN, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_NEAREST, SCIP_ROUND_UPWARDS, SCIPintervalIntersect(), SCIPintervalSetEmpty(), SCIPnextafter(), sqrt(), and SCIP_Interval::sup.
Referenced by SCIPintervalSolveUnivariateQuadExpressionPositive().
◆ SCIPintervalSolveUnivariateQuadExpression()
void SCIPintervalSolveUnivariateQuadExpression | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_INTERVAL | sqrcoeff, | ||
SCIP_INTERVAL | lincoeff, | ||
SCIP_INTERVAL | rhs, | ||
SCIP_INTERVAL | xbnds | ||
) |
solves a quadratic equation with interval coefficients
Given intervals a, b and c, this function computes an interval that contains all solutions of \( a x^2 + b x \in c\) within xbnds
- Parameters
-
infinity value for infinity resultant resultant interval of operation sqrcoeff coefficient of x^2 lincoeff coefficient of x rhs right hand side of equation xbnds bounds on x
Definition at line 3223 of file intervalarith.c.
References SCIP_Interval::inf, MAX, NULL, SCIPdebugMessage, SCIPintervalDiv(), SCIPintervalGetInf(), SCIPintervalGetSup(), SCIPintervalIntersect(), SCIPintervalIsEmpty(), SCIPintervalSetEmpty(), SCIPintervalSolveUnivariateQuadExpressionNegative(), SCIPintervalSolveUnivariateQuadExpressionPositive(), SCIPintervalUnify(), and SCIP_Interval::sup.
Referenced by exprgraphNodePropagateBounds(), propagateBoundsQuadVar(), and SCIPintervalSolveBivariateQuadExpressionAllScalar().
◆ SCIPintervalQuadBivar()
void SCIPintervalQuadBivar | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_Real | ax, | ||
SCIP_Real | ay, | ||
SCIP_Real | axy, | ||
SCIP_Real | bx, | ||
SCIP_Real | by, | ||
SCIP_INTERVAL | xbnds, | ||
SCIP_INTERVAL | ybnds | ||
) |
stores range of bivariate quadratic term in resultant given scalars ax, ay, axy, bx, and by and intervals for x and y, computes interval for \( ax x^2 + ay y^2 + axy x y + bx x + by y \) NOTE: the operations are not applied rounding-safe here
- Parameters
-
infinity value for infinity in interval arithmetics resultant buffer where to store result of operation ax square coefficient of x ay square coefficient of y axy bilinear coefficients bx linear coefficient of x by linear coefficient of y xbnds bounds on x ybnds bounds on y
Definition at line 3286 of file intervalarith.c.
References SCIP_Interval::inf, infinity, MAX, NULL, REALABS, SCIP_Real, SCIPdebugMessage, SCIPintervalAdd(), SCIPintervalAddScalar(), SCIPintervalQuad(), SCIPintervalSet(), SCIPintervalSetBounds(), SCIP_Interval::sup, x, and y.
Referenced by SCIP_DECL_EXPRINTEVAL().
◆ SCIPintervalSolveBivariateQuadExpressionAllScalar()
void SCIPintervalSolveBivariateQuadExpressionAllScalar | ( | SCIP_Real | infinity, |
SCIP_INTERVAL * | resultant, | ||
SCIP_Real | ax, | ||
SCIP_Real | ay, | ||
SCIP_Real | axy, | ||
SCIP_Real | bx, | ||
SCIP_Real | by, | ||
SCIP_INTERVAL | rhs, | ||
SCIP_INTERVAL | xbnds, | ||
SCIP_INTERVAL | ybnds | ||
) |
solves a bivariate quadratic equation for the first variable given scalars ax, ay, axy, bx and by, and intervals for x, y, and rhs, computes \( \{ x \in \mathbf{x} : \exists y \in \mathbf{y} : a_x x^2 + a_y y^2 + a_{xy} x y + b_x x + b_y y \in \mathbf{\mbox{rhs}} \} \) NOTE: the operations are not applied rounding-safe here
- Parameters
-
infinity value for infinity in interval arithmetics resultant buffer where to store result of operation ax square coefficient of x ay square coefficient of y axy bilinear coefficients bx linear coefficient of x by linear coefficient of y rhs right-hand-side of equation xbnds bounds on x ybnds bounds on y
Definition at line 3545 of file intervalarith.c.
References b, CALCB, CALCR, EPSGE, EPSGT, EPSLE, EPSLT, EPSN, EPSZ, SCIP_Interval::inf, infinity, MAX, NULL, REALABS, SCIP_Real, SCIPintervalAddScalar(), SCIPintervalIntersect(), SCIPintervalIsEmpty(), SCIPintervalMulScalar(), SCIPintervalQuad(), SCIPintervalQuadUpperBound(), SCIPintervalSet(), SCIPintervalSetBounds(), SCIPintervalSetEmpty(), SCIPintervalSolveBivariateQuadExpressionAllScalar(), SCIPintervalSolveUnivariateQuadExpression(), SCIPintervalSolveUnivariateQuadExpressionNegative(), SCIPintervalSolveUnivariateQuadExpressionPositive(), SCIPintervalSub(), SCIPintervalUnify(), sqrt(), and SCIP_Interval::sup.
Referenced by exprgraphNodePropagateBounds(), propagateBoundsBilinearTerm(), and SCIPintervalSolveBivariateQuadExpressionAllScalar().
Variable Documentation
◆ sin_extremepoints
Definition at line 42 of file intervalarith.c.
Referenced by SCIPintervalSin().
◆ cos_extremepoints
Definition at line 44 of file intervalarith.c.
Referenced by SCIPintervalCos().