APRONXX  0.9.12
Protected Member Functions | Protected Attributes | List of all members
apron::interval_array Class Reference

array of interval(s). More...

#include <apxx_interval.hh>

Inherits apron::use_malloc.

Public Member Functions

Constructors
 interval_array (size_t size)
 Creates a new interval array. More...
 
 interval_array (const interval_array &x)
 Makes a copy of an interval array (copying all elements). More...
 
 interval_array (const std::vector< interval > &x)
 Makes a interval array from an interval vector (copying all elements). More...
 
 interval_array (size_t size, const interval x[])
 Makes a interval array from an interval array of give size (copying all elements). More...
 
Destructor
 ~interval_array ()
 Frees the space occupied by the array and all its elements. More...
 
Assignments
interval_arrayoperator= (const interval_array &x)
 Copies an interval array into *this. More...
 
interval_arrayoperator= (const std::vector< interval > &x)
 Copies an interval vector into *this. More...
 
interval_arrayoperator= (const interval x[])
 Copies an interval array into *this. More...
 
Conversion
 operator std::vector< interval > () const
 Makes an interval vector from an interval array (copying all elements). More...
 
Accesses
size_t size () const
 Returns the array size. More...
 
interval ** contents ()
 Returns a pointer to the start of the array of elements used internally. More...
 
intervaloperator[] (size_t i)
 Returns a (modifiable) reference to an element, no bound checking. More...
 
const intervaloperator[] (size_t i) const
 Returns a reference to an element, no bound checking. More...
 
intervalget (size_t i)
 
const intervalget (size_t i) const
 
C API compatibility
const ap_interval_t *const * get_ap_interval_t_array () const
 Returns a pointer to the internal APRON object stored in *this. More...
 
ap_interval_t ** get_ap_interval_t_array ()
 Returns a pointer to the internal APRON object stored in *this. More...
 
- Public Member Functions inherited from apron::use_malloc
void * operator new (size_t sz)
 
void * operator new[] (size_t sz)
 
void operator delete (void *p)
 
void operator delete[] (void *p)
 

Protected Member Functions

 interval_array (size_t size, ap_interval_t **c)
 Internal use only. Reference an array created with ap_interval_array_alloc. More...
 

Protected Attributes

size_t sz
 Array size. More...
 
ap_interval_t ** c
 Array of pointers to intervals. More...
 

Printing

std::ostream & operator<< (std::ostream &os, const interval_array &s)
 Printing. More...
 
void print (FILE *stream=stdout) const
 Prints to a C stream. More...
 

Detailed Description

array of interval(s).

Constructor & Destructor Documentation

◆ interval_array() [1/5]

interval_array::interval_array ( size_t  size,
ap_interval_t **  c 
)
inlineprotected

Internal use only. Reference an array created with ap_interval_array_alloc.

◆ interval_array() [2/5]

interval_array::interval_array ( size_t  size)
inline

Creates a new interval array.

All elements are initially [0;0] intervals with double scalar bounds.

◆ interval_array() [3/5]

interval_array::interval_array ( const interval_array x)
inline

Makes a copy of an interval array (copying all elements).

◆ interval_array() [4/5]

interval_array::interval_array ( const std::vector< interval > &  x)
inline

Makes a interval array from an interval vector (copying all elements).

◆ interval_array() [5/5]

interval_array::interval_array ( size_t  size,
const interval  x[] 
)
inline

Makes a interval array from an interval array of give size (copying all elements).

◆ ~interval_array()

interval_array::~interval_array ( )
inline

Frees the space occupied by the array and all its elements.

Member Function Documentation

◆ contents()

interval ** interval_array::contents ( )
inline

Returns a pointer to the start of the array of elements used internally.

◆ get() [1/2]

interval & interval_array::get ( size_t  i)
inline

Returns a (modifiable) reference to an element (bound-checked).

Exceptions
std::out_of_rangeif the index is invalid.

◆ get() [2/2]

const interval & interval_array::get ( size_t  i) const
inline

Returns a reference to an element (bound-checked).

Exceptions
std::out_of_rangeif the index is invalid.

◆ get_ap_interval_t_array() [1/2]

const ap_interval_t *const * interval_array::get_ap_interval_t_array ( ) const
inline

Returns a pointer to the internal APRON object stored in *this.

◆ get_ap_interval_t_array() [2/2]

ap_interval_t ** interval_array::get_ap_interval_t_array ( )
inline

Returns a pointer to the internal APRON object stored in *this.

◆ operator std::vector< interval >()

interval_array::operator std::vector< interval > ( ) const
inline

Makes an interval vector from an interval array (copying all elements).

◆ operator=() [1/3]

interval_array & interval_array::operator= ( const interval_array x)
inline

Copies an interval array into *this.

All elements are copied and the array size is updated if necessary.

◆ operator=() [2/3]

interval_array & interval_array::operator= ( const std::vector< interval > &  x)
inline

Copies an interval vector into *this.

All elements are copied and the array size is updated if necessary.

◆ operator=() [3/3]

interval_array & interval_array::operator= ( const interval  x[])
inline

Copies an interval array into *this.

The size of the interval_array is not changed. x should have enough elements to fill the interval_array.

◆ operator[]() [1/2]

interval & interval_array::operator[] ( size_t  i)
inline

Returns a (modifiable) reference to an element, no bound checking.

◆ operator[]() [2/2]

const interval & interval_array::operator[] ( size_t  i) const
inline

Returns a reference to an element, no bound checking.

◆ print()

void interval_array::print ( FILE *  stream = stdout) const
inline

Prints to a C stream.

◆ size()

size_t interval_array::size ( ) const
inline

Returns the array size.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const interval_array s 
)
friend

Printing.

Member Data Documentation

◆ c

ap_interval_t** apron::interval_array::c
protected

Array of pointers to intervals.

◆ sz

size_t apron::interval_array::sz
protected

Array size.


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