APRONXX 0.9.15
apron::generator1_array Class Reference

Array of generators (ap_generator1_array_t wrapper). More...

#include <apxx_generator1.hh>

Inherits apron::use_malloc.

Public Member Functions

Constructors
 generator1_array (const environment &e, const generator0_array &x)
 Creates a new generator array from a generator0_array (copied) and an environment (reference count incremented) associating names to dimensions.
 
 generator1_array (const environment &e, size_t size)
 Creates a new array of the given size containing uninitialized generators.
 
 generator1_array (const generator1_array &x)
 (Deep) copy.
 
 generator1_array (const generator1_array &x, const environment &e)
 Makes a (deep) copy of x and extends its environment.
 
 generator1_array (size_t size, const generator1 x[])
 Creates a generator1_array from an array (of size >0) of generators of the given size (copied).
 
 generator1_array (const std::vector< generator1 > &x)
 Creates a generator1_array from an vector (of size >0) of generators of the given size (copied).
 
Destructor
 ~generator1_array ()
 Frees the space used by the array and all its generators, and decrements the reference count of the environment.
 
Assignments
generator1_arrayoperator= (const generator1_array &x)
 (Deep) copy.
 
generator1_arrayoperator= (const generator1 x[])
 Copies the generators from the array into *this.
 
generator1_arrayoperator= (const std::vector< generator1 > &x)
 
Dimension operations
void resize (size_t size)
 Resizes the array.
 
void extend_environment (const environment &e)
 Extends the environment of all generators in the array.
 
Accesses
size_t size () const
 Returns the size of the array.
 
environment get_environment () const
 Returns the environment shared by all generators (with incremented reference count).
 
const generator0_arrayget_generator0_array () const
 Returns a reference to the underlying generator0_array.
 
generator0_arrayget_generator0_array ()
 Returns a (modifiable) reference to the underlying generator0_array.
 
generator1 get (size_t i) const
 Returns a copy of the generator at index i.
 
void set (size_t i, const generator1 &x)
 Changes the generator at index i.
 
Conversion
 operator std::vector< generator1 > () const
 Returns a copy of the linear generators in the form of a vector.
 
C API compatibility
const ap_generator1_array_t * get_ap_generator1_array_t () const
 Returns a pointer to the internal APRON object stored in *this.
 
ap_generator1_array_t * get_ap_generator1_array_t ()
 Returns a pointer to the internal APRON object stored in *this.
 
- 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

 generator1_array (ap_generator1_array_t &a)
 Internal use only. Shallow copy (no copy of generator0_array or environment).
 

Protected Attributes

ap_generator1_array_t a
 Structure managed by APRON.
 

Printing

void print (FILE *stream=stdout) const
 Prints to a C stream.
 

Detailed Description

Array of generators (ap_generator1_array_t wrapper).

Level 1 version of linear generator arrays. Internally, a generator1_array wraps together a generator0_array (memory managed) and an environment (holding a reference count). Please note that all generators share the same environment!

Constructor & Destructor Documentation

◆ generator1_array() [1/7]

generator1_array::generator1_array ( ap_generator1_array_t & a)
inlineprotected

Internal use only. Shallow copy (no copy of generator0_array or environment).

◆ generator1_array() [2/7]

generator1_array::generator1_array ( const environment & e,
const generator0_array & x )
inline

Creates a new generator array from a generator0_array (copied) and an environment (reference count incremented) associating names to dimensions.

◆ generator1_array() [3/7]

generator1_array::generator1_array ( const environment & e,
size_t size )
inline

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

has_linexpr will return false on all elements of the array.

  • e associates a variable name to each dimension (reference count incremented).

◆ generator1_array() [4/7]

generator1_array::generator1_array ( const generator1_array & x)
inline

(Deep) copy.

◆ generator1_array() [5/7]

generator1_array::generator1_array ( const generator1_array & x,
const environment & e )
inline

Makes a (deep) copy of x and extends its environment.

Exceptions
std::invalid_argumentif e is not a super-environment of that of x.

◆ generator1_array() [6/7]

apron::generator1_array::generator1_array ( size_t size,
const generator1 x[] )
inline

Creates a generator1_array from an array (of size >0) of generators of the given size (copied).

Warning
assumes that all generators have the same environment (unchecked).
Exceptions
std::invalid_argumentif size<1.

◆ generator1_array() [7/7]

generator1_array::generator1_array ( const std::vector< generator1 > & x)
inline

Creates a generator1_array from an vector (of size >0) of generators of the given size (copied).

Warning
assumes that all generators have the same environment (unchecked).
Exceptions
std::invalid_argumentif vector size<1.

◆ ~generator1_array()

generator1_array::~generator1_array ( )
inline

Frees the space used by the array and all its generators, and decrements the reference count of the environment.

Member Function Documentation

◆ extend_environment()

void generator1_array::extend_environment ( const environment & e)
inline

Extends the environment of all generators in the array.

Exceptions
std::invalid_argumentif e is not a super-environment of that of *this.

◆ get()

generator1 generator1_array::get ( size_t i) const
inline

Returns a copy of the generator at index i.

Exceptions
std::out_of_rangeif i exceeds the dimension of the array.

◆ get_ap_generator1_array_t() [1/2]

ap_generator1_array_t * generator1_array::get_ap_generator1_array_t ( )
inline

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

◆ get_ap_generator1_array_t() [2/2]

const ap_generator1_array_t * generator1_array::get_ap_generator1_array_t ( ) const
inline

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

◆ get_environment()

environment generator1_array::get_environment ( ) const
inline

Returns the environment shared by all generators (with incremented reference count).

◆ get_generator0_array() [1/2]

generator0_array & generator1_array::get_generator0_array ( )
inline

Returns a (modifiable) reference to the underlying generator0_array.

◆ get_generator0_array() [2/2]

const generator0_array & generator1_array::get_generator0_array ( ) const
inline

Returns a reference to the underlying generator0_array.

◆ operator std::vector< generator1 >()

generator1_array::operator std::vector< generator1 > ( ) const
inline

Returns a copy of the linear generators in the form of a vector.

◆ operator=() [1/3]

generator1_array & generator1_array::operator= ( const generator1 x[])
inline

Copies the generators from the array into *this.

Warning
assumes that all generators have the same environment (unchecked).
  • x should contain (at least) size elements.

◆ operator=() [2/3]

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

(Deep) copy.

◆ operator=() [3/3]

generator1_array & generator1_array::operator= ( const std::vector< generator1 > & x)
inline

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

Warning
assumes that all generators have the same environment (unchecked).

◆ print()

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

Prints to a C stream.

◆ resize()

void generator1_array::resize ( size_t size)
inline

Resizes the array.

◆ set()

void generator1_array::set ( size_t i,
const generator1 & x )
inline

Changes the generator at index i.

Warning
assumes that x and *this have equal environments.
Exceptions
std::out_of_rangeif i exceeds the dimension of the array.

◆ size()

size_t generator1_array::size ( ) const
inline

Returns the size of the array.

Member Data Documentation

◆ a

ap_generator1_array_t apron::generator1_array::a
protected

Structure managed by APRON.


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