Scippy

SCIP

Solving Constraint Integer Programs

SCIPInterval Class Reference

Detailed Description

an interval that extends the SCIP_INTERVAL struct by various methods to allow calculating with intervals as with ordinary numbers

Definition at line 40 of file intervalarithext.h.

#include <intervalarithext.h>

Public Member Functions

 SCIPInterval ()
 
 SCIPInterval (const SCIP_INTERVAL &x)
 
 SCIPInterval (SCIP_Real infinum, SCIP_Real supremum)
 
 SCIPInterval (SCIP_Real number)
 
void setBounds (SCIP_Real newinf, SCIP_Real newsup)
 
bool operator== (const SCIP_INTERVAL &y) const
 
bool operator!= (const SCIP_INTERVAL &y) const
 
bool operator== (const SCIP_Real &y) const
 
SCIPIntervaloperator+= (const SCIPInterval &y)
 
SCIPIntervaloperator-= (const SCIPInterval &y)
 
SCIPIntervaloperator*= (const SCIPInterval &y)
 
SCIPIntervaloperator/= (const SCIPInterval &y)
 
SCIPIntervaloperator= (const SCIP_Real &y)
 
SCIPIntervaloperator= (const SCIP_INTERVAL &y)
 

Static Public Attributes

static SCIP_Real infinity = SCIP_DEFAULT_INFINITY
 

Constructor & Destructor Documentation

SCIPInterval::SCIPInterval ( )
inline

default constructor -> gives entire interval

Definition at line 49 of file intervalarithext.h.

SCIPInterval::SCIPInterval ( const SCIP_INTERVAL &  x)
inline
Parameters
xinterval to copy

Definition at line 55 of file intervalarithext.h.

SCIPInterval::SCIPInterval ( SCIP_Real  infinum,
SCIP_Real  supremum 
)
inline

constructor for an interval giving pointwise bounds

Parameters
infinumlower bound of interval
supremumupper bound of interval

Definition at line 63 of file intervalarithext.h.

SCIPInterval::SCIPInterval ( SCIP_Real  number)
inline

constructor for a singleton

Parameters
numbernumber to be represented by interval

Definition at line 72 of file intervalarithext.h.

Member Function Documentation

void SCIPInterval::setBounds ( SCIP_Real  newinf,
SCIP_Real  newsup 
)
inline

sets interval bounds

Parameters
newinflower bound of interval
newsupupper bound of interval

Definition at line 80 of file intervalarithext.h.

bool SCIPInterval::operator== ( const SCIP_INTERVAL &  y) const
inline

returns whether this interval is equal to another one

Parameters
yinterval to compare with

Definition at line 89 of file intervalarithext.h.

bool SCIPInterval::operator!= ( const SCIP_INTERVAL &  y) const
inline

returns whether this interval is not equal to another one

Parameters
yinterval to compare with

Definition at line 103 of file intervalarithext.h.

bool SCIPInterval::operator== ( const SCIP_Real y) const
inline

returns whether this interval is equal to a given number

Parameters
ynumber to compare with

Definition at line 111 of file intervalarithext.h.

SCIPInterval& SCIPInterval::operator+= ( const SCIPInterval y)
inline

adds another interval to this one

Parameters
yinterval to add in

Definition at line 121 of file intervalarithext.h.

References infinity.

SCIPInterval& SCIPInterval::operator-= ( const SCIPInterval y)
inline

subtracts an interval from this one

Parameters
yinterval to substract

Definition at line 130 of file intervalarithext.h.

References infinity.

SCIPInterval& SCIPInterval::operator*= ( const SCIPInterval y)
inline

multiplies an interval with this one

Parameters
yinterval to multiply with

Definition at line 139 of file intervalarithext.h.

References infinity.

SCIPInterval& SCIPInterval::operator/= ( const SCIPInterval y)
inline

divides this interval by another one

Parameters
yinterval to divide by

Definition at line 148 of file intervalarithext.h.

References infinity.

SCIPInterval& SCIPInterval::operator= ( const SCIP_Real y)
inline

assigns a number to this interval

Parameters
ynew value for both interval bounds

Definition at line 157 of file intervalarithext.h.

SCIPInterval& SCIPInterval::operator= ( const SCIP_INTERVAL &  y)
inline

assign an interval to this interval

Parameters
ynew value for this interval

Definition at line 166 of file intervalarithext.h.

Field Documentation

SCIP_Real SCIPInterval::infinity = SCIP_DEFAULT_INFINITY
static

value to use for infinity currently a global variable, thus use with care!

Definition at line 46 of file intervalarithext.h.

Referenced by exp(), log(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), pow(), SCIPexprintEvalInt(), signpow(), sqrt(), and square().