Scippy

SCIP

Solving Constraint Integer Programs

SCIPInterval Class Reference

Detailed Description

an interval that extends the SCIP_INTERVAL struct

Used by various methods to allow calculating with intervals as with ordinary numbers.

Definition at line 42 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 52 of file intervalarithext.h.

References infinity.

SCIPInterval::SCIPInterval ( const SCIP_INTERVAL &  x)
inline

constructor for an SCIP_INTERVAL struct

Parameters
xinterval to copy

Definition at line 58 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 66 of file intervalarithext.h.

SCIPInterval::SCIPInterval ( SCIP_Real  number)
inline

constructor for a singleton

Parameters
numbernumber to be represented by interval

Definition at line 75 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 83 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 92 of file intervalarithext.h.

References infinity.

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 106 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 114 of file intervalarithext.h.

References infinity.

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

adds another interval to this one

Parameters
yinterval to add in

Definition at line 124 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 133 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 142 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 151 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 160 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 169 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 49 of file intervalarithext.h.

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