24 #ifndef PPL_Partial_Function_inlines_hh
25 #define PPL_Partial_Function_inlines_hh 1
27 #include "assertions.hh"
46 throw std::runtime_error(
"Partial_Function::max_in_codomain() called"
47 " when has_empty_codomain()");
58 std::pair<std::set<dimension_type>::iterator,
bool> s =
codomain.insert(j);
60 #endif // #ifndef NDEBUG
82 if (i >=
vec.size()) {
95 #endif // !defined(PPL_Partial_Function_inlines_hh)
std::set< dimension_type > codomain
size_t dimension_type
An unsigned integral type for representing space dimensions.
dimension_type not_a_dimension()
Returns a value that does not designate a valid dimension.
bool has_empty_codomain() const
Returns true if and only if the represented partial function has an empty codomain (i...
Partial_Function()
Default constructor: builds a function with empty codomain (i.e., always undefined).
std::vector< dimension_type > vec
dimension_type max_in_codomain() const
If the codomain is not empty, returns the maximum value in it.
The entire library is confined to this namespace.
bool maps(dimension_type i, dimension_type &j) const
If *this maps i to a value k, assigns k to j and returns true; otherwise, j is unchanged and false is...
void insert(dimension_type i, dimension_type j)
Modifies *this so that i is mapped to j.