16 #ifndef __APXX_DIMENSION_HH 17 #define __APXX_DIMENSION_HH 19 #include "ap_dimension.h" 51 const std::vector<std::string>&
names;
70 template<
class charT,
class Traits>
72 std::basic_ostream<charT,Traits>&
80 template<
class charT,
class Traits>
82 std::vector<std::string>*
get_varname(std::basic_ostream<charT,Traits>& os);
117 dimchange(
size_t intdim=0,
size_t realdim=0);
123 dimchange(
size_t intdim,
size_t realdim,
const ap_dim_t d[]);
129 dimchange(
size_t intdim,
size_t realdim,
const std::vector<ap_dim_t>& d);
203 ap_dim_t&
get(
size_t dim);
209 const ap_dim_t&
get(
size_t dim)
const;
227 void print(FILE* stream=stdout)
const;
317 dimperm(
const std::vector<ap_dim_t>& d);
395 ap_dim_t&
get(
size_t dim);
401 const ap_dim_t&
get(
size_t dim)
const;
419 void print(FILE* stream=stdout)
const;
dimperm & operator=(const dimperm &x)
Copies x.
Definition: apxx_dimension.hh:274
Dimension permutation object (ap_dimperm_t wrapper).
Definition: apxx_dimension.hh:292
Dimension change object (ap_dimchange_t wrapper).
Definition: apxx_dimension.hh:102
Definition: apxx_abstract0.hh:27
ap_dim_t & get(size_t dim)
Returns a (modifiable) reference to an index in the underlying array (bound-checked).
Definition: apxx_dimension.hh:137
size_t size
Size of the permutation.
Definition: apxx_dimension.hh:274
friend std::ostream & operator<<(std::ostream &os, const dimperm &s)
Printing.
Definition: apxx_dimension.hh:347
friend std::basic_ostream< charT, Traits > & operator<<(std::basic_ostream< charT, Traits > &os, const varname &v)
Associates the modifier to the stream.
Definition: apxx_dimension.hh:32
dimperm(size_t size=0)
Makes an uninitialized dimperm of the given size.
Definition: apxx_dimension.hh:224
const ap_dimperm_t * get_ap_dimperm_t() const
Returns a pointer to the internal APRON object stored in *this.
Definition: apxx_dimension.hh:423
const std::vector< std::string > & names
Names of variables.
Definition: apxx_dimension.hh:51
size_t size() const
Returns the size of the permutation.
Definition: apxx_dimension.hh:316
const ap_dimchange_t * get_ap_dimchange_t() const
Returns a pointer to the internal APRON object stored in *this.
Definition: apxx_dimension.hh:205
dimchange operator-() const
Returns the inverse of *this.
Definition: apxx_dimension.hh:194
ap_dimchange_t c
Structure managed by APRON.
Definition: apxx_dimension.hh:106
dimchange(size_t intdim=0, size_t realdim=0)
Makes an uninitialized dimchange.
Definition: apxx_dimension.hh:59
~dimperm()
Definition: apxx_dimension.hh:265
ap_dim_t & operator[](size_t dim)
Returns a (modifiable) reference to the image of dim.
Definition: apxx_dimension.hh:321
varname(const std::vector< std::string > &names)
Creates a modifier to associate variable names to dimensions.
Definition: apxx_dimension.hh:25
id(size_t size)
Definition: apxx_dimension.hh:276
friend std::vector< std::string > * get_varname(std::basic_ostream< charT, Traits > &os)
Gets the variable name vector associated to the stream.
Definition: apxx_dimension.hh:44
void print(FILE *stream=stdout) const
Prints to a C stream.
Definition: apxx_dimension.hh:369
ap_dim_t & get(size_t dim)
Returns a (modifiable) reference to the image of dim (bound-checked).
Definition: apxx_dimension.hh:331
dimchange & operator=(const dimchange &x)
(Deep) copy.
Definition: apxx_dimension.hh:99
void print(FILE *stream=stdout) const
Prints to a C stream.
Definition: apxx_dimension.hh:180
friend dimperm operator *(const dimperm &x, const dimperm &y)
Returns a new dimperm that is the composition of x and y.
Definition: apxx_dimension.hh:393
Stream modifier to set variable names to dimensions.
Definition: apxx_dimension.hh:43
dimperm & operator *=(const dimperm &y)
Composes *this with y.
Definition: apxx_dimension.hh:380
size_t get_realdim() const
Returns the number of real dimensions to add/remove.
Definition: apxx_dimension.hh:132
size_t get_intdim() const
Returns the number of integer dimensions to add/remove.
Definition: apxx_dimension.hh:127
~dimchange()
Definition: apxx_dimension.hh:90
Inherited by most wrappers to map new and delete to malloc and free.
Definition: apxx_scalar.hh:69
friend std::ostream & operator<<(std::ostream &os, const dimchange &s)
Printing.
Definition: apxx_dimension.hh:163
void add_invert()
Inverts *this.
Definition: apxx_dimension.hh:189
The identity permutation, to simplify initialisations and assignments.
Definition: apxx_dimension.hh:273
ap_dim_t & operator[](size_t dim)
Returns a (modifiable) reference to an index in the underlying array.
Definition: apxx_dimension.hh:149
dimperm operator-() const
Returns a new dimperm that is the inverse of *this.
Definition: apxx_dimension.hh:411
Represents a dimension (i.e., variable by index) in an expression tree.
Definition: apxx_texpr0.hh:33
void invert()
Inverts *this.
Definition: apxx_dimension.hh:405
ap_dimperm_t c
Structure managed by APRON.
Definition: apxx_dimension.hh:296
static const int xindex
Index to stream-local data, allocated with xalloc.
Definition: apxx_dimension.hh:48