APRONXX 0.9.15
apron::lincons0_array Class Reference

Array of linear constraints (ap_lincons0_array_t wrapper). More...

#include <apxx_lincons0.hh>

Inherits apron::use_malloc.

Public Member Functions

Constructors
 lincons0_array (size_t size)
 Creates a new array of the given size containing uninitialized constraints.
 
 lincons0_array (const lincons0_array &x)
 (Deep) copy.
 
 lincons0_array (const lincons0_array &x, const dimchange &d)
 Makes a (deep) copy of the array and applies add_dimensions to all constraints.
 
 lincons0_array (const lincons0_array &x, const dimperm &d)
 Makes a (deep) copy of the array and applies permute_dimensions to all constraints.
 
 lincons0_array (size_t size, const lincons0 x[])
 Creates a lincons0_array from an array of constraints of the given size (copied).
 
 lincons0_array (const std::vector< lincons0 > &x)
 Creates a lincons0_array from a vector of constraints (copied).
 
Destructor
 ~lincons0_array ()
 Frees the space used by the array and all its constraints.
 
Assignments
lincons0_arrayoperator= (const lincons0_array &x)
 (Deep) copy.
 
lincons0_arrayoperator= (const lincons0 x[])
 Copies the constraints from the array into *this.
 
lincons0_arrayoperator= (const std::vector< lincons0 > &x)
 Copies the constraints from the vector into the array, changing its size if needed.
 
Dimension operations
void resize (size_t size)
 Resizes the array.
 
void add_dimensions (const dimchange &d)
 Applies add_dimensions to all constraints in the array.
 
void permute_dimensions (const dimperm &d)
 Applies permute_dimensions to all constraints in the array.
 
Accesses
size_t size () const
 Returns the size of the array.
 
lincons0contents ()
 Returns a pointer to the start of the internal array holding the constraints.
 
const lincons0contents () const
 Returns a pointer to the start of the internal array holding the constraints.
 
lincons0operator[] (size_t i)
 Returns a (modifiable) reference to an element, no bound checking.
 
const lincons0operator[] (size_t i) const
 Returns a reference to an element, no bound checking.
 
lincons0get (size_t i)
 Returns a (modifiable) reference to an element (bound-checked).
 
const lincons0get (size_t i) const
 Returns a reference to an element (bound-checked).
 
Conversion
 operator std::vector< lincons0 > () const
 Returns a copy of the linear constraints in the form of a vector.
 
Tests
bool is_linear () const
 Whether all constraints are linear.
 
bool is_quasilinear () const
 Whether all constraints are quasi-linear.
 
C API compatibility
const ap_lincons0_array_t * get_ap_lincons0_array_t () const
 Returns a pointer to the internal APRON object stored in *this.
 
ap_lincons0_array_t * get_ap_lincons0_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

 lincons0_array (ap_lincons0_array_t &a)
 Internal use only. Performs a shallow copy and takes ownership of the contents.
 

Protected Attributes

ap_lincons0_array_t a
 Structure managed by APRON.
 

Printing

void print (char **name_of_dim=NULL, FILE *stream=stdout) const
 Prints to a C stream.
 

Detailed Description

Array of linear constraints (ap_lincons0_array_t wrapper).

A lincons0_array represents an array of linear constraints.

Constructor & Destructor Documentation

◆ lincons0_array() [1/7]

apron::lincons0_array::lincons0_array ( ap_lincons0_array_t & a)
inlineprotected

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

◆ lincons0_array() [2/7]

lincons0_array::lincons0_array ( size_t size)
inline

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

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

◆ lincons0_array() [3/7]

lincons0_array::lincons0_array ( const lincons0_array & x)
inline

(Deep) copy.

◆ lincons0_array() [4/7]

lincons0_array::lincons0_array ( const lincons0_array & x,
const dimchange & d )
inline

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

◆ lincons0_array() [5/7]

lincons0_array::lincons0_array ( const lincons0_array & x,
const dimperm & d )
inline

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

◆ lincons0_array() [6/7]

lincons0_array::lincons0_array ( size_t size,
const lincons0 x[] )
inline

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

◆ lincons0_array() [7/7]

lincons0_array::lincons0_array ( const std::vector< lincons0 > & x)
inline

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

◆ ~lincons0_array()

lincons0_array::~lincons0_array ( )
inline

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

Member Function Documentation

◆ add_dimensions()

void lincons0_array::add_dimensions ( const dimchange & d)
inline

Applies add_dimensions to all constraints in the array.

◆ contents() [1/2]

lincons0 * lincons0_array::contents ( )
inline

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

◆ contents() [2/2]

const lincons0 * lincons0_array::contents ( ) const
inline

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

◆ get() [1/2]

lincons0 & lincons0_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 lincons0 & lincons0_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_lincons0_array_t() [1/2]

ap_lincons0_array_t * lincons0_array::get_ap_lincons0_array_t ( )
inline

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

◆ get_ap_lincons0_array_t() [2/2]

const ap_lincons0_array_t * lincons0_array::get_ap_lincons0_array_t ( ) const
inline

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

◆ is_linear()

bool lincons0_array::is_linear ( ) const
inline

Whether all constraints are linear.

◆ is_quasilinear()

bool lincons0_array::is_quasilinear ( ) const
inline

Whether all constraints are quasi-linear.

◆ operator std::vector< lincons0 >()

lincons0_array::operator std::vector< lincons0 > ( ) const
inline

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

◆ operator=() [1/3]

lincons0_array & lincons0_array::operator= ( const lincons0 x[])
inline

Copies the constraints from the array into *this.

  • x should contain (at least) size elements.

◆ operator=() [2/3]

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

(Deep) copy.

◆ operator=() [3/3]

lincons0_array & lincons0_array::operator= ( const std::vector< lincons0 > & x)
inline

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

◆ operator[]() [1/2]

lincons0 & lincons0_array::operator[] ( size_t i)
inline

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

◆ operator[]() [2/2]

const lincons0 & lincons0_array::operator[] ( size_t i) const
inline

Returns a reference to an element, no bound checking.

◆ permute_dimensions()

void lincons0_array::permute_dimensions ( const dimperm & d)
inline

Applies permute_dimensions to all constraints in the array.

◆ print()

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

Prints to a C stream.

◆ resize()

void lincons0_array::resize ( size_t size)
inline

Resizes the array.

◆ size()

size_t lincons0_array::size ( ) const
inline

Returns the size of the array.

Member Data Documentation

◆ a

ap_lincons0_array_t apron::lincons0_array::a
protected

Structure managed by APRON.


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