Scippy

SCIP

Solving Constraint Integer Programs

intervalarith.h File Reference

Detailed Description

interval arithmetics for provable bounds

Author
Tobias Achterberg
Stefan Vigerske
Kati Wolter

Definition in file intervalarith.h.

#include "scip/def.h"

Go to the source code of this file.

Typedefs

typedef struct SCIP_Interval SCIP_INTERVAL
 
typedef int SCIP_ROUNDMODE
 

Functions

SCIP_Bool SCIPintervalHasRoundingControl (void)
 
void SCIPintervalSetRoundingMode (SCIP_ROUNDMODE roundmode)
 
SCIP_ROUNDMODE SCIPintervalGetRoundingMode (void)
 
void SCIPintervalSetRoundingModeDownwards (void)
 
void SCIPintervalSetRoundingModeUpwards (void)
 
void SCIPintervalSetRoundingModeToNearest (void)
 
void SCIPintervalSetRoundingModeTowardsZero (void)
 
SCIP_Real SCIPintervalNegateReal (SCIP_Real x)
 
SCIP_Real SCIPintervalGetInf (SCIP_INTERVAL interval)
 
SCIP_Real SCIPintervalGetSup (SCIP_INTERVAL interval)
 
void SCIPintervalSet (SCIP_INTERVAL *resultant, SCIP_Real value)
 
void SCIPintervalSetBounds (SCIP_INTERVAL *resultant, SCIP_Real inf, SCIP_Real sup)
 
void SCIPintervalSetEmpty (SCIP_INTERVAL *resultant)
 
SCIP_Bool SCIPintervalIsEmpty (SCIP_Real infinity, SCIP_INTERVAL operand)
 
void SCIPintervalSetEntire (SCIP_Real infinity, SCIP_INTERVAL *resultant)
 
SCIP_Bool SCIPintervalIsEntire (SCIP_Real infinity, SCIP_INTERVAL operand)
 
SCIP_Bool SCIPintervalIsPositiveInfinity (SCIP_Real infinity, SCIP_INTERVAL operand)
 
SCIP_Bool SCIPintervalIsNegativeInfinity (SCIP_Real infinity, SCIP_INTERVAL operand)
 
SCIP_Bool SCIPintervalIsSubsetEQ (SCIP_Real infinity, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
 
SCIP_Bool SCIPintervalAreDisjoint (SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
 
void SCIPintervalIntersect (SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
 
void SCIPintervalUnify (SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
 
void SCIPintervalAddInf (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
 
void SCIPintervalAddSup (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
 
void SCIPintervalAdd (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
 
void SCIPintervalAddScalar (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_Real operand2)
 
void SCIPintervalAddVectors (SCIP_Real infinity, SCIP_INTERVAL *resultant, int length, SCIP_INTERVAL *operand1, SCIP_INTERVAL *operand2)
 
void SCIPintervalSub (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
 
void SCIPintervalSubScalar (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_Real operand2)
 
void SCIPintervalMulInf (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
 
void SCIPintervalMulSup (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
 
void SCIPintervalMul (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
 
void SCIPintervalMulScalarInf (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_Real operand2)
 
void SCIPintervalMulScalarSup (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_Real operand2)
 
void SCIPintervalMulScalar (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_Real operand2)
 
void SCIPintervalDiv (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
 
void SCIPintervalDivScalar (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_Real operand2)
 
void SCIPintervalScalprod (SCIP_Real infinity, SCIP_INTERVAL *resultant, int length, SCIP_INTERVAL *operand1, SCIP_INTERVAL *operand2)
 
void SCIPintervalScalprodScalarsInf (SCIP_Real infinity, SCIP_INTERVAL *resultant, int length, SCIP_INTERVAL *operand1, SCIP_Real *operand2)
 
void SCIPintervalScalprodScalarsSup (SCIP_Real infinity, SCIP_INTERVAL *resultant, int length, SCIP_INTERVAL *operand1, SCIP_Real *operand2)
 
void SCIPintervalScalprodScalars (SCIP_Real infinity, SCIP_INTERVAL *resultant, int length, SCIP_INTERVAL *operand1, SCIP_Real *operand2)
 
void SCIPintervalSquare (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand)
 
void SCIPintervalSquareRoot (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand)
 
void SCIPintervalPower (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
 
void SCIPintervalPowerScalar (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_Real operand2)
 
void SCIPintervalPowerScalarScalar (SCIP_INTERVAL *resultant, SCIP_Real operand1, SCIP_Real operand2)
 
SCIP_Real SCIPintervalPowerScalarIntegerInf (SCIP_Real operand1, int operand2)
 
SCIP_Real SCIPintervalPowerScalarIntegerSup (SCIP_Real operand1, int operand2)
 
void SCIPintervalPowerScalarInteger (SCIP_INTERVAL *resultant, SCIP_Real operand1, int operand2)
 
void SCIPintervalPowerScalarInverse (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL basedomain, SCIP_Real exponent, SCIP_INTERVAL image)
 
void SCIPintervalSignPowerScalar (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_Real operand2)
 
void SCIPintervalReciprocal (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand)
 
void SCIPintervalExp (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand)
 
void SCIPintervalLog (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand)
 
void SCIPintervalMin (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
 
void SCIPintervalMax (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
 
void SCIPintervalAbs (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand)
 
void SCIPintervalSin (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand)
 
void SCIPintervalCos (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand)
 
void SCIPintervalSign (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand)
 
SCIP_Real SCIPintervalQuadUpperBound (SCIP_Real infinity, SCIP_Real a, SCIP_INTERVAL b, SCIP_INTERVAL xrng)
 
void SCIPintervalQuad (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_Real sqrcoeff, SCIP_INTERVAL lincoeff, SCIP_INTERVAL xrng)
 
void SCIPintervalSolveUnivariateQuadExpressionPositive (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL sqrcoeff, SCIP_INTERVAL lincoeff, SCIP_INTERVAL rhs)
 
void SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_Real sqrcoeff, SCIP_Real lincoeff, SCIP_Real rhs)
 
void SCIPintervalSolveUnivariateQuadExpression (SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL sqrcoeff, SCIP_INTERVAL lincoeff, SCIP_INTERVAL rhs)
 
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)
 
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)
 

Typedef Documentation

◆ SCIP_INTERVAL

typedef struct SCIP_Interval SCIP_INTERVAL

Definition at line 42 of file intervalarith.h.

◆ SCIP_ROUNDMODE

typedef int SCIP_ROUNDMODE

rounding mode of floating point operations (upwards, downwards, nearest, ...) exact values depend on machine and compiler, so we define a corresponding enum in the header file

Definition at line 46 of file intervalarith.h.

Function Documentation

◆ SCIPintervalHasRoundingControl()

SCIP_Bool SCIPintervalHasRoundingControl ( void  )

returns whether rounding mode control is available

Definition at line 183 of file intervalarith.c.

References FALSE.

Referenced by SCIPfindSimpleRational().

◆ SCIPintervalSetRoundingMode()

◆ SCIPintervalGetRoundingMode()

◆ SCIPintervalSetRoundingModeDownwards()

◆ SCIPintervalSetRoundingModeUpwards()

void SCIPintervalSetRoundingModeUpwards ( void  )

◆ SCIPintervalSetRoundingModeToNearest()

void SCIPintervalSetRoundingModeToNearest ( void  )

sets rounding mode of floating point operations to nearest rounding

Definition at line 419 of file intervalarith.c.

References SCIP_ROUND_NEAREST, and SCIPintervalSetRoundingMode().

◆ SCIPintervalSetRoundingModeTowardsZero()

void SCIPintervalSetRoundingModeTowardsZero ( void  )

sets rounding mode of floating point operations to towards zero rounding

Definition at line 427 of file intervalarith.c.

References SCIP_ROUND_ZERO, and SCIPintervalSetRoundingMode().

◆ SCIPintervalNegateReal()

SCIP_Real SCIPintervalNegateReal ( SCIP_Real  x)

negates a number in a way that the compiler does not optimize it away

Parameters
xnumber to negate

Definition at line 435 of file intervalarith.c.

References negate().

Referenced by consdataUpdateLinearActivityLbChange(), consdataUpdateLinearActivityUbChange(), exprgraphNodePropagateBounds(), propagateBoundsCons(), and propagateConstraintSides().

◆ SCIPintervalGetInf()

◆ SCIPintervalGetSup()

◆ SCIPintervalSet()

◆ SCIPintervalSetBounds()

◆ SCIPintervalSetEmpty()

◆ SCIPintervalIsEmpty()

SCIP_Bool SCIPintervalIsEmpty ( SCIP_Real  infinity,
SCIP_INTERVAL  operand 
)

◆ SCIPintervalSetEntire()

◆ SCIPintervalIsEntire()

SCIP_Bool SCIPintervalIsEntire ( SCIP_Real  infinity,
SCIP_INTERVAL  operand 
)

indicates whether interval is entire, i.e., whether inf <= -infinity and sup >= infinity

Parameters
infinityvalue for infinity
operandoperand of operation

Definition at line 541 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
infinityvalue for infinity
operandoperand of operation

Definition at line 550 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
infinityvalue for infinity
operandoperand of operation

Definition at line 559 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
infinityvalue for infinity
operand1first operand of operation
operand2second operand of operation

Definition at line 568 of file intervalarith.c.

References FALSE, SCIP_Interval::inf, MAX, MIN, 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
operand1first operand of operation
operand2second operand of operation

Definition at line 587 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
resultantresultant interval of operation
operand1first operand of operation
operand2second operand of operation

Definition at line 596 of file intervalarith.c.

References SCIP_Interval::inf, MAX, MIN, NULL, and SCIP_Interval::sup.

Referenced by exprgraphNodeUpdateBounds(), SCIPexprgraphTightenNodeBounds(), SCIPexprgraphUpdateNodeBoundsCurvature(), SCIPintervalPowerScalarInverse(), SCIPintervalSolveBivariateQuadExpressionAllScalar(), and SCIPintervalSolveUnivariateQuadExpressionPositive().

◆ SCIPintervalUnify()

void SCIPintervalUnify ( SCIP_INTERVAL resultant,
SCIP_INTERVAL  operand1,
SCIP_INTERVAL  operand2 
)

interval enclosure of the union of two intervals

Parameters
resultantresultant interval of operation
operand1first operand of operation
operand2second operand of operation

Definition at line 609 of file intervalarith.c.

References SCIP_Interval::inf, MAX, MIN, 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
infinityvalue for infinity
resultantresultant interval of operation
operand1first operand of operation
operand2second operand of operation

Definition at line 636 of file intervalarith.c.

References SCIP_Interval::inf, infinity, NULL, SCIP_ROUND_DOWNWARDS, and SCIPintervalGetRoundingMode().

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
infinityvalue for infinity
resultantresultant interval of operation
operand1first operand of operation
operand2second operand of operation

Definition at line 663 of file intervalarith.c.

References infinity, NULL, SCIP_ROUND_UPWARDS, SCIPintervalGetRoundingMode(), 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 
)

◆ 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
infinityvalue for infinity
resultantresultant interval of operation
operand1first operand of operation
operand2second operand of operation

Definition at line 717 of file intervalarith.c.

References SCIP_Interval::inf, infinity, NULL, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalGetRoundingMode(), SCIPintervalIsEmpty(), SCIPintervalSetRoundingMode(), 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
infinityvalue for infinity
resultantarray of resultant intervals of operation
lengthlength of arrays
operand1array of first operands of operation
operand2array of second operands of operation

Definition at line 767 of file intervalarith.c.

References SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalAddInf(), SCIPintervalAddSup(), SCIPintervalGetRoundingMode(), and SCIPintervalSetRoundingMode().

◆ 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
infinityvalue for infinity
resultantresultant interval of operation
operand1first operand of operation
operand2second operand of operation

Definition at line 797 of file intervalarith.c.

References SCIP_Interval::inf, infinity, NULL, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalGetRoundingMode(), SCIPintervalIsEmpty(), SCIPintervalSetRoundingMode(), 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
infinityvalue for infinity
resultantresultant interval of operation
operand1first operand of operation
operand2second operand of operation

Definition at line 845 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
infinityvalue for infinity
resultantresultant interval of operation
operand1first operand of operation; can be +/-inf
operand2second operand of operation; can be +/-inf

Definition at line 856 of file intervalarith.c.

References SCIP_Interval::inf, infinity, MIN, NULL, SCIP_Real, SCIP_ROUND_DOWNWARDS, SCIPintervalGetRoundingMode(), 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
infinityvalue for infinity
resultantresultant interval of operation
operand1first operand of operation; can be +/-inf
operand2second operand of operation; can be +/-inf

Definition at line 916 of file intervalarith.c.

References SCIP_Interval::inf, infinity, MAX, NULL, SCIP_Real, SCIP_ROUND_UPWARDS, SCIPintervalGetRoundingMode(), 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
infinityvalue for infinity
resultantresultant interval of operation
operand1first operand of operation; can be +/-inf
operand2second operand of operation; can be +/-inf

Definition at line 976 of file intervalarith.c.

References NULL, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalGetRoundingMode(), SCIPintervalIsEmpty(), SCIPintervalMulInf(), SCIPintervalMulSup(), and SCIPintervalSetRoundingMode().

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
infinityvalue for infinity
resultantresultant interval of operation
operand1first operand of operation
operand2second operand of operation; can be +/- inf

Definition at line 1003 of file intervalarith.c.

References SCIP_Interval::inf, infinity, NULL, SCIP_ROUND_DOWNWARDS, SCIPintervalGetRoundingMode(), 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
infinityvalue for infinity
resultantresultant interval of operation
operand1first operand of operation
operand2second operand of operation; can be +/- inf

Definition at line 1059 of file intervalarith.c.

References SCIP_Interval::inf, infinity, NULL, SCIP_ROUND_UPWARDS, SCIPintervalGetRoundingMode(), 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 
)

◆ 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
infinityvalue for infinity
resultantresultant interval of operation
operand1first operand of operation
operand2second operand of operation

Definition at line 1141 of file intervalarith.c.

References SCIP_Interval::inf, infinity, NULL, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalGetRoundingMode(), SCIPintervalIsEmpty(), SCIPintervalMul(), SCIPintervalSet(), SCIPintervalSetRoundingMode(), 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
infinityvalue for infinity
resultantresultant interval of operation
operand1first operand of operation
operand2second operand of operation

Definition at line 1195 of file intervalarith.c.

References SCIP_Interval::inf, infinity, NULL, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalGetRoundingMode(), SCIPintervalIsEmpty(), SCIPintervalSetRoundingMode(), 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
infinityvalue for infinity
resultantresultant interval of operation
lengthlength of vectors
operand1first vector as array of intervals; can have +/-inf entries
operand2second vector as array of intervals; can have +/-inf entries

Definition at line 1298 of file intervalarith.c.

References SCIP_Interval::inf, infinity, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalAddInf(), SCIPintervalAddSup(), SCIPintervalGetRoundingMode(), SCIPintervalMulInf(), SCIPintervalMulSup(), SCIPintervalSetEntire(), SCIPintervalSetRoundingMode(), and SCIP_Interval::sup.

◆ SCIPintervalScalprodScalarsInf()

void SCIPintervalScalprodScalarsInf ( 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 infimum of result in infimum of resultant

computes scalar product of a vector of intervals and a vector of scalars and stores infimum of result in infimum of resultant

Parameters
infinityvalue for infinity
resultantresultant interval of operation
lengthlength of vectors
operand1first vector as array of intervals
operand2second vector as array of scalars; can have +/-inf entries

Definition at line 1340 of file intervalarith.c.

References SCIP_Interval::inf, infinity, SCIP_ROUND_DOWNWARDS, SCIPintervalAddInf(), SCIPintervalGetRoundingMode(), 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
infinityvalue for infinity
resultantresultant interval of operation
lengthlength of vectors
operand1first vector as array of intervals
operand2second vector as array of scalars; can have +/-inf entries

Definition at line 1368 of file intervalarith.c.

References SCIP_Interval::inf, infinity, SCIP_ROUND_UPWARDS, SCIPintervalAddSup(), SCIPintervalGetRoundingMode(), 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
infinityvalue for infinity
resultantresultant interval of operation
lengthlength of vectors
operand1first vector as array of intervals
operand2second vector as array of scalars; can have +/-inf entries

Definition at line 1394 of file intervalarith.c.

References SCIP_Interval::inf, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalGetRoundingMode(), SCIPintervalScalprodScalarsInf(), SCIPintervalScalprodScalarsSup(), SCIPintervalSetRoundingMode(), 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
infinityvalue for infinity
resultantresultant interval of operation
operandoperand of operation

Definition at line 1422 of file intervalarith.c.

References SCIP_Interval::inf, infinity, MAX, NULL, SCIP_Real, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalGetRoundingMode(), SCIPintervalIsEmpty(), SCIPintervalSetRoundingMode(), and SCIP_Interval::sup.

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
infinityvalue for infinity
resultantresultant interval of operation
operandoperand of operation

Definition at line 1494 of file intervalarith.c.

References SCIP_Interval::inf, infinity, NULL, SCIP_Real, SCIP_REAL_MAX, SCIP_REAL_MIN, SCIP_ROUND_NEAREST, SCIPintervalGetRoundingMode(), SCIPintervalIsEmpty(), SCIPintervalSetEmpty(), sqrt(), and SCIP_Interval::sup.

Referenced by exprgraphNodePropagateBounds(), propagateBounds(), SCIP_DECL_EXPRINTEVAL(), SCIPintervalSolveUnivariateQuadExpression(), 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
infinityvalue for infinity
resultantresultant interval of operation
operand1first operand of operation
operand2second operand of operation

Definition at line 1555 of file intervalarith.c.

References SCIP_Interval::inf, NULL, SCIPintervalExp(), SCIPintervalIsEmpty(), SCIPintervalLog(), SCIPintervalMul(), SCIPintervalPowerScalar(), and SCIP_Interval::sup.

Referenced by pow(), and SCIPintervalPowerScalarInverse().

◆ 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

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
infinityvalue for infinity
resultantresultant interval of operation
operand1first operand of operation
operand2second operand of operation

Definition at line 1878 of file intervalarith.c.

References SCIP_Interval::inf, infinity, MAX, NULL, pow(), SCIP_Bool, SCIP_REAL_MAX, SCIP_REAL_MIN, SCIP_ROUND_NEAREST, SCIPintervalGetRoundingMode(), SCIPintervalIsEmpty(), SCIPintervalPowerScalarIntegerInf(), SCIPintervalPowerScalarIntegerSup(), SCIPintervalSetEmpty(), and SCIP_Interval::sup.

Referenced by exprgraphNodePropagateBounds(), pow(), SCIP_DECL_EXPRINTEVAL(), and SCIPintervalPower().

◆ 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
resultantresultant of operation
operand1first operand of operation
operand2second operand of operation

Definition at line 1835 of file intervalarith.c.

References SCIP_Interval::inf, NULL, pow(), SCIP_Real, SCIP_REAL_MAX, SCIP_REAL_MIN, SCIP_ROUND_NEAREST, SCIPintervalGetRoundingMode(), SCIPintervalSet(), and SCIP_Interval::sup.

◆ SCIPintervalPowerScalarIntegerInf()

SCIP_Real SCIPintervalPowerScalarIntegerInf ( SCIP_Real  operand1,
int  operand2 
)

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
operand1first operand of operation
operand2second operand of operation

Definition at line 1588 of file intervalarith.c.

References SCIP_Real, SCIP_ROUND_DOWNWARDS, SCIPintervalGetRoundingMode(), SCIPintervalPowerScalarIntegerSup(), SCIPintervalSetRoundingMode(), and TRUE.

Referenced by SCIPintervalPowerScalar(), and SCIPintervalPowerScalarIntegerSup().

◆ SCIPintervalPowerScalarIntegerSup()

SCIP_Real SCIPintervalPowerScalarIntegerSup ( SCIP_Real  operand1,
int  operand2 
)

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
operand1first operand of operation
operand2second operand of operation

Definition at line 1670 of file intervalarith.c.

References SCIP_Real, SCIP_ROUND_UPWARDS, SCIPintervalGetRoundingMode(), SCIPintervalPowerScalarIntegerInf(), SCIPintervalSetRoundingMode(), 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
resultantresultant interval of operation
operand1first operand of operation
operand2second operand of operation

Definition at line 1744 of file intervalarith.c.

References SCIP_Interval::inf, negate(), SCIP_Real, SCIP_REAL_MAX, SCIP_ROUND_UPWARDS, SCIPintervalGetRoundingMode(), SCIPintervalPowerScalarInteger(), SCIPintervalReciprocal(), SCIPintervalSet(), SCIPintervalSetRoundingMode(), SCIP_Interval::sup, and TRUE.

Referenced by SCIPintervalPowerScalarInteger().

◆ 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
infinityvalue for infinity
resultantresultant interval of operation
basedomaindomain of base
exponentexponent
imageinterval image of power

Definition at line 2126 of file intervalarith.c.

References EPSISINT, SCIP_Interval::inf, MAX, MIN, 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
infinityvalue for infinity
resultantresultant interval of operation
operand1first operand of operation
operand2second operand of operation

Definition at line 2207 of file intervalarith.c.

References SCIP_Interval::inf, infinity, negate(), NULL, pow(), SCIP_REAL_MAX, SCIP_REAL_MIN, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_NEAREST, SCIP_ROUND_UPWARDS, SCIPintervalGetRoundingMode(), SCIPintervalIsEmpty(), SCIPintervalSetRoundingMode(), 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
infinityvalue for infinity
resultantresultant interval of operation
operandoperand of operation

Definition at line 2379 of file intervalarith.c.

References SCIP_Interval::inf, infinity, NULL, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_UPWARDS, SCIPintervalGetRoundingMode(), SCIPintervalIsEmpty(), SCIPintervalSetRoundingMode(), 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
infinityvalue for infinity
resultantresultant interval of operation
operandoperand of operation

Definition at line 2452 of file intervalarith.c.

References exp(), SCIP_Interval::inf, infinity, NULL, SCIP_Real, SCIP_REAL_MAX, SCIP_REAL_MIN, SCIP_ROUND_NEAREST, SCIPintervalGetRoundingMode(), SCIPintervalIsEmpty(), 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
infinityvalue for infinity
resultantresultant interval of operation
operandoperand of operation

Definition at line 2532 of file intervalarith.c.

References SCIP_Interval::inf, infinity, log(), NULL, SCIP_Real, SCIP_REAL_MAX, SCIP_REAL_MIN, SCIP_ROUND_NEAREST, SCIPintervalGetRoundingMode(), SCIPintervalIsEmpty(), SCIPintervalSetEmpty(), 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
infinityvalue for infinity
resultantresultant interval of operation
operand1first operand of operation
operand2second operand of operation

Definition at line 2600 of file intervalarith.c.

References SCIP_Interval::inf, MIN, 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
infinityvalue for infinity
resultantresultant interval of operation
operand1first operand of operation
operand2second operand of operation

Definition at line 2616 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
infinityvalue for infinity
resultantresultant interval of operation
operandoperand of operation

Definition at line 2632 of file intervalarith.c.

References SCIP_Interval::inf, MAX, NULL, SCIPintervalIsEmpty(), and SCIP_Interval::sup.

Referenced by abs(), 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
infinityvalue for infinity
resultantresultant interval of operation
operandoperand of operation

Definition at line 2660 of file intervalarith.c.

References SCIP_Interval::inf, M_PI, MAX, MIN, NULL, REALABS, SCIP_Real, SCIPintervalIsEmpty(), SCIPintervalSetBounds(), sin(), 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
infinityvalue for infinity
resultantresultant interval of operation
operandoperand of operation

Definition at line 2746 of file intervalarith.c.

References cos(), SCIP_Interval::inf, M_PI, MAX, MIN, 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
infinityvalue for infinity
resultantresultant interval of operation
operandoperand of operation

Definition at line 2830 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
infinityvalue for infinity
acoefficient of x^2
b_coefficient of x
xrange of x

Definition at line 2859 of file intervalarith.c.

References SCIP_Interval::inf, infinity, MAX, negate(), SCIP_Real, SCIP_ROUND_UPWARDS, SCIPintervalGetRoundingMode(), SCIPintervalIsEmpty(), SCIPintervalQuadUpperBound(), SCIPintervalSetRoundingMode(), and SCIP_Interval::sup.

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
infinityvalue for infinity
resultantresultant interval of operation
sqrcoeffcoefficient of x^2
lincoeffcoefficient of x
xrngrange of x

Definition at line 2954 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 
)

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\).

Parameters
infinityvalue for infinity
resultantresultant interval of operation
sqrcoeffcoefficient of x^2
lincoeffcoefficient of x
rhsright hand side of equation

Definition at line 2989 of file intervalarith.c.

References SCIP_Interval::inf, infinity, NULL, SCIPdebugMessage, SCIPdebugPrintf, SCIPintervalIntersect(), SCIPintervalSetEmpty(), SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar(), and SCIP_Interval::sup.

Referenced by propagateBoundsQuadVar(), SCIPintervalSolveBivariateQuadExpressionAllScalar(), and SCIPintervalSolveUnivariateQuadExpression().

◆ SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar()

void SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar ( SCIP_Real  infinity,
SCIP_INTERVAL resultant,
SCIP_Real  sqrcoeff,
SCIP_Real  lincoeff,
SCIP_Real  rhs 
)

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\). Implements Algorithm 3.2 from Domes and Neumaier: Constraint propagation on quadratic constraints (2008).

Parameters
infinityvalue for infinity
resultantresultant interval of operation
sqrcoeffcoefficient of x^2
lincoeffcoefficient of x
rhsright hand side of equation

Definition at line 3035 of file intervalarith.c.

References SCIP_Interval::inf, infinity, negate(), NULL, SCIP_Real, SCIP_REAL_MAX, SCIP_ROUND_DOWNWARDS, SCIP_ROUND_NEAREST, SCIP_ROUND_UPWARDS, SCIPintervalGetRoundingMode(), SCIPintervalSetEmpty(), SCIPintervalSetRoundingMode(), 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 
)

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\)

Parameters
infinityvalue for infinity
resultantresultant interval of operation
sqrcoeffcoefficient of x^2
lincoeffcoefficient of x
rhsright hand side of equation

Definition at line 3136 of file intervalarith.c.

References SCIP_Interval::inf, NULL, SCIP_Real, SCIPdebugMessage, SCIPintervalDiv(), SCIPintervalGetInf(), SCIPintervalGetSup(), SCIPintervalSetEmpty(), SCIPintervalSetEntire(), SCIPintervalSolveUnivariateQuadExpressionPositive(), SCIPintervalSquareRoot(), SCIPintervalUnify(), and SCIP_Interval::sup.

Referenced by exprgraphNodePropagateBounds(), and propagateBoundsQuadVar().

◆ 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
infinityvalue for infinity in interval arithmetics
resultantbuffer where to store result of operation
axsquare coefficient of x
aysquare coefficient of y
axybilinear coefficients
bxlinear coefficient of x
bylinear coefficient of y
xbndsbounds on x
ybndsbounds on y

Definition at line 3198 of file intervalarith.c.

References SCIP_Interval::inf, infinity, MAX, MIN, NULL, REALABS, SCIP_Real, SCIPdebugMessage, SCIPintervalAdd(), SCIPintervalAddScalar(), SCIPintervalQuad(), SCIPintervalSet(), SCIPintervalSetBounds(), and SCIP_Interval::sup.

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
infinityvalue for infinity in interval arithmetics
resultantbuffer where to store result of operation
axsquare coefficient of x
aysquare coefficient of y
axybilinear coefficients
bxlinear coefficient of x
bylinear coefficient of y
rhsright-hand-side of equation
xbndsbounds on x
ybndsbounds on y

Definition at line 3457 of file intervalarith.c.

References CALCB, CALCR, EPSGE, EPSGT, EPSLE, EPSLT, EPSN, EPSZ, SCIP_Interval::inf, infinity, MAX, MIN, NULL, REALABS, SCIP_Real, SCIPintervalAddScalar(), SCIPintervalIntersect(), SCIPintervalIsEmpty(), SCIPintervalMulScalar(), SCIPintervalQuad(), SCIPintervalQuadUpperBound(), SCIPintervalSet(), SCIPintervalSetBounds(), SCIPintervalSetEmpty(), SCIPintervalSetEntire(), SCIPintervalSolveBivariateQuadExpressionAllScalar(), SCIPintervalSolveUnivariateQuadExpressionPositive(), SCIPintervalSub(), SCIPintervalUnify(), sqrt(), and SCIP_Interval::sup.

Referenced by exprgraphNodePropagateBounds(), propagateBoundsBilinearTerm(), and SCIPintervalSolveBivariateQuadExpressionAllScalar().