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

Array of arbitrary constraints (ap_tcons0_array_t wrapper). More...

#include <apxx_tcons0.hh>

Inherits apron::use_malloc.

Public Member Functions

Constructors
 tcons0_array (size_t size)
 Creates a new array of the given size containing uninitialized constraints. More...
 
 tcons0_array (const tcons0_array &x)
 (Deep) copy. More...
 
 tcons0_array (const tcons0_array &x, const dimchange &d, bool add=true)
 Makes a (deep) copy of the array and applies add_dimensions to all constraints. More...
 
 tcons0_array (const tcons0_array &x, const dimperm &d)
 Makes a (deep) copy of the array and applies permute_dimensions to all constraints. More...
 
 tcons0_array (size_t size, const tcons0 x[])
 Creates a tcons0_array from an array of constraints of the given size (copied). More...
 
 tcons0_array (const std::vector< tcons0 > &x)
 Creates a tcons0_array from a vector of constraints (copied). More...
 
 tcons0_array (const lincons0_array &x)
 Makes a constraint array from a linear constraint array (copying coefficients). More...
 
Destructor
 ~tcons0_array ()
 Frees the space used by the array and all its constraints. More...
 
Assignments
tcons0_arrayoperator= (const tcons0_array &x)
 (Deep) copy. More...
 
tcons0_arrayoperator= (const tcons0 x[])
 Copies the constraints from the array into *this. More...
 
tcons0_arrayoperator= (const std::vector< tcons0 > &x)
 Copies the constraints from the vector into the array, changing its size if needed. More...
 
tcons0_arrayoperator= (const lincons0_array &x)
 Makes *this equal to the linear constraint array x (coefficients are copied), deleting the previous value of *this. More...
 
Dimension operations
void resize (size_t size)
 Resizes the array. More...
 
void add_dimensions (const dimchange &d)
 Applies add_dimensions to all constraints in the array. More...
 
void remove_dimensions (const dimchange &d)
 Applies remove_dimensions to all constraints in the array. More...
 
void permute_dimensions (const dimperm &d)
 Applies permute_dimensions to all constraints in the array. More...
 
Accesses
size_t size () const
 Returns the size of the array. More...
 
tcons0contents ()
 Returns a pointer to the start of the internal array holding the constraints. More...
 
const tcons0contents () const
 Returns a pointer to the start of the internal array holding the constraints. More...
 
tcons0operator[] (size_t i)
 Returns a (modifiable) reference to an element, no bound checking. More...
 
const tcons0operator[] (size_t i) const
 Returns a reference to an element, no bound checking. More...
 
tcons0get (size_t i)
 Returns a (modifiable) reference to an element (bound-checked). More...
 
const tcons0get (size_t i) const
 Returns a reference to an element (bound-checked). More...
 
Conversion
 operator std::vector< tcons0 > () const
 Returns a copy of the constraints in the form of a vector. More...
 
Tests
bool is_interval_linear () const
 Whether all constraints are linear. More...
 
C API compatibility
const ap_tcons0_array_t * get_ap_tcons0_array_t () const
 Returns a pointer to the internal APRON object stored in *this. More...
 
ap_tcons0_array_t * get_ap_tcons0_array_t ()
 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

 tcons0_array (ap_tcons0_array_t &a)
 Internal use only. Performs a shallow copy and takes ownership of the contents. More...
 

Protected Attributes

ap_tcons0_array_t a
 Structure managed by APRON. More...
 

Printing

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

Detailed Description

Array of arbitrary constraints (ap_tcons0_array_t wrapper).

A tcons0_array represents an array of constraints on arbitrary expressions.

Constructor & Destructor Documentation

◆ tcons0_array() [1/8]

apron::tcons0_array::tcons0_array ( ap_tcons0_array_t &  a)
inlineprotected

Internal use only. Performs a shallow copy and takes ownership of the contents.

◆ tcons0_array() [2/8]

tcons0_array::tcons0_array ( size_t  size)
inline

Creates a new array of the given size containing uninitialized constraints.

has_modulo and has_texpr will return false on all elements of the array.

◆ tcons0_array() [3/8]

tcons0_array::tcons0_array ( const tcons0_array x)
inline

(Deep) copy.

◆ tcons0_array() [4/8]

apron::tcons0_array::tcons0_array ( const tcons0_array x,
const dimchange d,
bool  add = true 
)
inline

Makes a (deep) copy of the array and applies add_dimensions to all constraints.

◆ tcons0_array() [5/8]

tcons0_array::tcons0_array ( const tcons0_array x,
const dimperm d 
)
inline

Makes a (deep) copy of the array and applies permute_dimensions to all constraints.

◆ tcons0_array() [6/8]

tcons0_array::tcons0_array ( size_t  size,
const tcons0  x[] 
)
inline

Creates a tcons0_array from an array of constraints of the given size (copied).

◆ tcons0_array() [7/8]

tcons0_array::tcons0_array ( const std::vector< tcons0 > &  x)
inline

Creates a tcons0_array from a vector of constraints (copied).

◆ tcons0_array() [8/8]

tcons0_array::tcons0_array ( const lincons0_array x)
inline

Makes a constraint array from a linear constraint array (copying coefficients).

Real-valued addition and multiplication operators are used (i.e., no rounding).

◆ ~tcons0_array()

tcons0_array::~tcons0_array ( )
inline

Frees the space used by the array and all its constraints.

Member Function Documentation

◆ add_dimensions()

void tcons0_array::add_dimensions ( const dimchange d)
inline

Applies add_dimensions to all constraints in the array.

◆ contents() [1/2]

tcons0 * tcons0_array::contents ( )
inline

Returns a pointer to the start of the internal array holding the constraints.

◆ contents() [2/2]

const tcons0 * tcons0_array::contents ( ) const
inline

Returns a pointer to the start of the internal array holding the constraints.

◆ get() [1/2]

tcons0 & tcons0_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 tcons0 & tcons0_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_tcons0_array_t() [1/2]

const ap_tcons0_array_t * tcons0_array::get_ap_tcons0_array_t ( ) const
inline

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

◆ get_ap_tcons0_array_t() [2/2]

ap_tcons0_array_t * tcons0_array::get_ap_tcons0_array_t ( )
inline

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

◆ is_interval_linear()

bool tcons0_array::is_interval_linear ( ) const
inline

Whether all constraints are linear.

◆ operator std::vector< tcons0 >()

tcons0_array::operator std::vector< tcons0 > ( ) const
inline

Returns a copy of the constraints in the form of a vector.

◆ operator=() [1/4]

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

(Deep) copy.

◆ operator=() [2/4]

tcons0_array & tcons0_array::operator= ( const tcons0  x[])
inline

Copies the constraints from the array into *this.

  • x should contain (at least) size elements.

◆ operator=() [3/4]

tcons0_array & tcons0_array::operator= ( const std::vector< tcons0 > &  x)
inline

Copies the constraints from the vector into the array, changing its size if needed.

◆ operator=() [4/4]

tcons0_array & tcons0_array::operator= ( const lincons0_array x)
inline

Makes *this equal to the linear constraint array x (coefficients are copied), deleting the previous value of *this.

Real-valued addition and multiplication operators are used (i.e., no rounding).

◆ operator[]() [1/2]

tcons0 & tcons0_array::operator[] ( size_t  i)
inline

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

◆ operator[]() [2/2]

const tcons0 & tcons0_array::operator[] ( size_t  i) const
inline

Returns a reference to an element, no bound checking.

◆ permute_dimensions()

void tcons0_array::permute_dimensions ( const dimperm d)
inline

Applies permute_dimensions to all constraints in the array.

◆ print()

void tcons0_array::print ( char **  name_of_dim = NULL,
FILE *  stream = stdout 
) const
inline

Prints to a C stream.

◆ remove_dimensions()

void tcons0_array::remove_dimensions ( const dimchange d)
inline

Applies remove_dimensions to all constraints in the array.

◆ resize()

void tcons0_array::resize ( size_t  size)
inline

Resizes the array.

◆ size()

size_t tcons0_array::size ( ) const
inline

Returns the size of the array.

Friends And Related Function Documentation

◆ operator<<

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

Printing.

Variable naming can be configured through the varname stream modifier.

Exceptions
std::invalid_argumentan underlying expression is missing, or an extra scalar is missing (for modulo constraint).

Member Data Documentation

◆ a

ap_tcons0_array_t apron::tcons0_array::a
protected

Structure managed by APRON.


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