Scippy

SCIP

Solving Constraint Integer Programs

intervalarithext.h File Reference

Detailed Description

C++ extensions to interval arithmetics for provable bounds.

Author
Stefan Vigerske

Definition in file intervalarithext.h.

Go to the source code of this file.

Macros

#define SCIP_INTERVALARITH_UNDEFFUNC(function)
 

Functions

SCIPInterval operator+ (const SCIPInterval &x, const SCIPInterval &y)
 
SCIPInterval operator- (const SCIPInterval &x, const SCIPInterval &y)
 
SCIPInterval operator- (const SCIPInterval &y)
 
SCIPInterval operator* (const SCIPInterval &x, const SCIPInterval &y)
 
SCIPInterval operator/ (const SCIPInterval &x, const SCIPInterval &y)
 
SCIPInterval cos (const SCIPInterval &x)
 
SCIPInterval exp (const SCIPInterval &x)
 
SCIPInterval log (const SCIPInterval &x)
 
SCIPInterval pow (const SCIPInterval &x, const SCIPInterval &y)
 
SCIPInterval pow (const SCIPInterval &x, const SCIP_Real &y)
 
SCIPInterval signpow (const SCIPInterval &x, const SCIP_Real p)
 
SCIPInterval sin (const SCIPInterval &x)
 
SCIPInterval square (const SCIPInterval &x)
 
SCIPInterval sqrt (const SCIPInterval &x)
 
SCIPInterval abs (const SCIPInterval &x)
 
SCIPInterval fabs (const SCIPInterval &x)
 
SCIPInterval sign (const SCIPInterval &x)
 

Macro Definition Documentation

◆ SCIP_INTERVALARITH_UNDEFFUNC

#define SCIP_INTERVALARITH_UNDEFFUNC (   function)
Value:
inline \
SCIPInterval function( \
const SCIPInterval& x /**< operand */ \
) \
{ \
SCIPerrorMessage("Error: " #function " not implemented for intervals.\n"); \
return SCIPInterval(); \
}
SCIP_VAR ** x
Definition: circlepacking.c:54

macro for easy definition of not implemented interval functions

Definition at line 410 of file intervalarithext.h.

Function Documentation

◆ operator+()

SCIPInterval operator+ ( const SCIPInterval &  x,
const SCIPInterval &  y 
)
inline

addition of two intervals

Parameters
xfirst operand
ysecond operand

Definition at line 183 of file intervalarithext.h.

References infinity, and SCIPintervalAdd().

◆ operator-() [1/2]

SCIPInterval operator- ( const SCIPInterval &  x,
const SCIPInterval &  y 
)
inline

substraction for two intervals

Parameters
xfirst operand
ysecond operand

Definition at line 197 of file intervalarithext.h.

References infinity, and SCIPintervalSub().

◆ operator-() [2/2]

SCIPInterval operator- ( const SCIPInterval &  y)
inline

negation of an interval

Parameters
yoperand

Definition at line 211 of file intervalarithext.h.

References SCIPintervalSetBounds().

◆ operator*()

SCIPInterval operator* ( const SCIPInterval &  x,
const SCIPInterval &  y 
)
inline

multiplication of two intervals

Parameters
xfirst operand
ysecond operand

Definition at line 224 of file intervalarithext.h.

References infinity, and SCIPintervalMul().

◆ operator/()

SCIPInterval operator/ ( const SCIPInterval &  x,
const SCIPInterval &  y 
)
inline

division for two intervals

Parameters
xfirst operand
ysecond operand

Definition at line 238 of file intervalarithext.h.

References infinity, and SCIPintervalDiv().

◆ cos()

SCIPInterval cos ( const SCIPInterval &  x)
inline

◆ exp()

SCIPInterval exp ( const SCIPInterval &  x)
inline

exponential of an interval

Parameters
xoperand

Definition at line 265 of file intervalarithext.h.

References infinity, and SCIPintervalExp().

Referenced by eval(), SCIP_DECL_BANDITUPDATE(), SCIP_DECL_EXPREVAL(), SCIPerf(), and SCIPintervalExp().

◆ log()

SCIPInterval log ( const SCIPInterval &  x)
inline

natural logarithm of an interval

Parameters
xoperand

Definition at line 278 of file intervalarithext.h.

References infinity, and SCIPintervalLog().

Referenced by enforceConflictgraph(), eval(), generateGaussianNoise(), getX(), readExpression(), SCIP_DECL_EXPREVAL(), SCIPhashmapCreate(), SCIPhashsetCreate(), and SCIPintervalLog().

◆ pow() [1/2]

◆ pow() [2/2]

SCIPInterval pow ( const SCIPInterval &  x,
const SCIP_Real y 
)
inline

power of an interval to a scalar

Parameters
xfirst operand
yexponent

Definition at line 305 of file intervalarithext.h.

References infinity, and SCIPintervalPowerScalar().

◆ signpow()

SCIPInterval signpow ( const SCIPInterval &  x,
const SCIP_Real  p 
)
inline

signpower of an interval to a scalar

Parameters
xfirst operand
pexponent

Definition at line 319 of file intervalarithext.h.

References infinity, and SCIPintervalSignPowerScalar().

Referenced by atomic_signpower< Type >::atomic_signpower().

◆ sin()

SCIPInterval sin ( const SCIPInterval &  x)
inline

◆ square()

SCIPInterval square ( const SCIPInterval &  x)
inline

square an interval

Parameters
xoperand

Definition at line 346 of file intervalarithext.h.

References infinity, and SCIPintervalSquare().

Referenced by atomic_signpower< Type >::atomic_signpower(), and SCIPcreateConsAbspower().

◆ sqrt()

◆ abs()

SCIPInterval abs ( const SCIPInterval &  x)
inline

absolute value of an interval

Parameters
xoperand

Definition at line 372 of file intervalarithext.h.

References infinity, and SCIPintervalAbs().

Referenced by atomic_signpower< Type >::atomic_signpower(), evalAbs(), and main().

◆ fabs()

◆ sign()