CACAO
Public Member Functions | Static Public Member Functions | Private Attributes
Interval Class Reference

An integer interval of the form constant_0 + instruction_0 . More...

Public Member Functions

 Interval ()
 Creates the interval MIN . More...
 
 Interval (const Scalar &s)
 
 Interval (const Scalar &lower, const Scalar &upper)
 
Scalar lower () const
 
void lower (const Scalar &s)
 
Scalar upper () const
 
void upper (const Scalar &s)
 
bool isWithinBounds (s4 arrayVariable) const
 true if it can be proven that arrayVariable can be accessed at an index whose value lies within this interval. More...
 
void intersectWith (const Interval &)
 Computes a superset of the intersection of this interval with the specified interval. More...
 
void unionWith (const Interval &)
 Computes a superset of the union of this interval with the specified interval. More...
 
void tryRemove (const Scalar &)
 Tries to remove the specified scalar from this interval. More...
 

Static Public Member Functions

static s4 min ()
 
static s4 max ()
 

Private Attributes

Scalar _lower
 
Scalar _upper
 

Detailed Description

An integer interval of the form constant_0 + instruction_0 .

. constant_1 + instruction_1 where both bounds are included.

Definition at line 39 of file Interval.hpp.

Constructor & Destructor Documentation

Interval::Interval ( )
inline

Creates the interval MIN .

. MAX

Definition at line 52 of file Interval.hpp.

Interval::Interval ( const Scalar s)
inlineexplicit

Definition at line 57 of file Interval.hpp.

Interval::Interval ( const Scalar lower,
const Scalar upper 
)
inline

Definition at line 62 of file Interval.hpp.

Member Function Documentation

void Interval::intersectWith ( const Interval other)
inline

Computes a superset of the intersection of this interval with the specified interval.

The result is stored in this object.

Definition at line 106 of file Interval.hpp.

bool Interval::isWithinBounds ( s4  arrayVariable) const
inline

true if it can be proven that arrayVariable can be accessed at an index whose value lies within this interval.

Definition at line 98 of file Interval.hpp.

Scalar Interval::lower ( ) const
inline

Definition at line 67 of file Interval.hpp.

void Interval::lower ( const Scalar s)
inline

Definition at line 68 of file Interval.hpp.

static s4 Interval::max ( )
inlinestatic

Definition at line 47 of file Interval.hpp.

static s4 Interval::min ( )
inlinestatic

Definition at line 46 of file Interval.hpp.

void Interval::tryRemove ( const Scalar point)
inline

Tries to remove the specified scalar from this interval.

This interval is only changed if the result can be represented as an interval.

Definition at line 118 of file Interval.hpp.

void Interval::unionWith ( const Interval other)
inline

Computes a superset of the union of this interval with the specified interval.

The result is stored in this object.

Definition at line 112 of file Interval.hpp.

Scalar Interval::upper ( ) const
inline

Definition at line 70 of file Interval.hpp.

void Interval::upper ( const Scalar s)
inline

Definition at line 71 of file Interval.hpp.

Field Documentation

Scalar Interval::_lower
private

Definition at line 41 of file Interval.hpp.

Scalar Interval::_upper
private

Definition at line 42 of file Interval.hpp.


The documentation for this class was generated from the following file: