A class to wrap an array of fixed length into a partial function interface suitable for the map_space_dimension() methods. More...
#include <ppl_c_implementation_common.defs.hh>
Public Member Functions | |
| Array_Partial_Function_Wrapper (dimension_type *v, size_t n) | |
Construct a partial function wrapping the first n positions of v. | |
| bool | has_empty_codomain () const |
Returns true if and only if the represented partial function has an empty codomain (i.e., it is always undefined). | |
| dimension_type | max_in_codomain () const |
| Returns the maximum value that belongs to the codomain of the partial function. | |
| bool | maps (dimension_type i, dimension_type &j) const |
Assigns to j the value associated to i by *this, if any. | |
Private Attributes | |
| dimension_type * | vec |
| Holds the vector implementing the map. | |
| size_t | vec_size |
Holds the size of vec. | |
| dimension_type | max_in_codomain_ |
| Cache for computing the maximum dimension in the codomain. | |
| int | empty |
A class to wrap an array of fixed length into a partial function interface suitable for the map_space_dimension() methods.
Definition at line 60 of file ppl_c_implementation_common.defs.hh.
| Parma_Polyhedra_Library::Interfaces::C::Array_Partial_Function_Wrapper::Array_Partial_Function_Wrapper | ( | dimension_type * | v, | |
| size_t | n | |||
| ) | [inline] |
Construct a partial function wrapping the first n positions of v.
Definition at line 167 of file ppl_c_implementation_common.inlines.hh.
| bool Parma_Polyhedra_Library::Interfaces::C::Array_Partial_Function_Wrapper::has_empty_codomain | ( | ) | const [inline] |
Returns true if and only if the represented partial function has an empty codomain (i.e., it is always undefined).
Definition at line 172 of file ppl_c_implementation_common.inlines.hh.
References empty, Parma_Polyhedra_Library::not_a_dimension(), vec, and vec_size.
| bool Parma_Polyhedra_Library::Interfaces::C::Array_Partial_Function_Wrapper::maps | ( | dimension_type | i, | |
| dimension_type & | j | |||
| ) | const [inline] |
Assigns to j the value associated to i by *this, if any.
Let
be the function represented by *this and
be the value of i. If
is defined in
, then
is assigned to j and true is returned. If
is undefined in
, then false is returned.
Definition at line 199 of file ppl_c_implementation_common.inlines.hh.
References Parma_Polyhedra_Library::not_a_dimension(), vec, and vec_size.
| dimension_type Parma_Polyhedra_Library::Interfaces::C::Array_Partial_Function_Wrapper::max_in_codomain | ( | ) | const [inline] |
Returns the maximum value that belongs to the codomain of the partial function.
Definition at line 185 of file ppl_c_implementation_common.inlines.hh.
References max_in_codomain_, Parma_Polyhedra_Library::not_a_dimension(), vec, and vec_size.
int Parma_Polyhedra_Library::Interfaces::C::Array_Partial_Function_Wrapper::empty [mutable, private] |
Cache for computing emptiness: -1 if we still don't know, 0 if not empty, 1 if empty.
Definition at line 103 of file ppl_c_implementation_common.defs.hh.
Referenced by has_empty_codomain().
dimension_type Parma_Polyhedra_Library::Interfaces::C::Array_Partial_Function_Wrapper::max_in_codomain_ [mutable, private] |
Cache for computing the maximum dimension in the codomain.
Definition at line 99 of file ppl_c_implementation_common.defs.hh.
Referenced by max_in_codomain().
dimension_type* Parma_Polyhedra_Library::Interfaces::C::Array_Partial_Function_Wrapper::vec [private] |
Holds the vector implementing the map.
Definition at line 93 of file ppl_c_implementation_common.defs.hh.
Referenced by has_empty_codomain(), maps(), and max_in_codomain().
Holds the size of vec.
Definition at line 96 of file ppl_c_implementation_common.defs.hh.
Referenced by has_empty_codomain(), maps(), and max_in_codomain().
1.6.3