PPL: Parma_Polyhedra_Library::Interval< Boundary, Info > Class Template Reference

PPL 1.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Related Functions | List of all members
Parma_Polyhedra_Library::Interval< Boundary, Info > Class Template Reference
C++ Language Interface

A generic, not necessarily closed, possibly restricted interval. More...

`#include <ppl.hh>`

Inherits Parma_Polyhedra_Library::Interval_Base, and Info.

## Public Member Functions
void | m_swap (Interval &y)
| Swaps `*this` with `y`.
void | topological_closure_assign ()
| Assigns to `*this` its topological closure.
memory_size_type | total_memory_in_bytes () const
| Returns the total size in bytes of the memory occupied by `*this`.
memory_size_type | external_memory_in_bytes () const
| Returns the size in bytes of the memory managed by `*this`.
| Interval (const char *s)
| Builds the smallest interval containing the number whose textual representation is contained in `s`.
template<typename From >
Enable_If< Is_Singleton< From >::value||Is_Interval< From >::value, I_Result >::type | difference_assign (const From &x)
| Assigns to `*this` the smallest interval containing the set-theoretic difference of `*this` and `x`.
template<typename From1 , typename From2 >
Enable_If<((Is_Singleton< From1 >::value||Is_Interval< From1 >::value)&&(Is_Singleton< From2 >::value||Is_Interval< From2 >::value)), I_Result >::type | difference_assign (const From1 &x, const From2 &y)
| Assigns to `*this` the smallest interval containing the set-theoretic difference of `x` and `y`.
template<typename From >
Enable_If< Is_Singleton< From >::value||Is_Interval< From >::value, I_Result >::type | lower_approximation_difference_assign (const From &x)
| Assigns to `*this` the largest interval contained in the set-theoretic difference of `*this` and `x`.
template<typename From >
Enable_If< Is_Interval< From >::value, bool >::type | simplify_using_context_assign (const From &y)
| Assigns to `*this` a meet-preserving simplification of `*this` with respect to `y`. More...
template<typename From >
Enable_If< Is_Interval< From >::value, void >::type | empty_intersection_assign (const From &y)
| Assigns to `*this` an interval having empty intersection with `y`. The assigned interval should be as large as possible.
template<typename From >
Enable_If< Is_Singleton< From >::value||Is_Interval< From >::value, I_Result >::type | refine_existential (Relation_Symbol rel, const From &x)
| Refines `to` according to the existential relation `rel` with `x`. More...
template<typename From >
Enable_If< Is_Singleton< From >::value||Is_Interval< From >::value, I_Result >::type | refine_universal (Relation_Symbol rel, const From &x)
| Refines `to` so that it satisfies the universal relation `rel` with `x`. More...
template<typename From1 , typename From2 >
Enable_If<((Is_Singleton< From1 >::value||Is_Interval< From1 >::value)&&(Is_Singleton< From2 >::value||Is_Interval< From2 >::value)), I_Result >::type | mul_assign (const From1 &x, const From2 &y)
template<typename From1 , typename From2 >
Enable_If<((Is_Singleton< From1 >::value||Is_Interval< From1 >::value)&&(Is_Singleton< From2 >::value||Is_Interval< From2 >::value)), I_Result >::type | div_assign (const From1 &x, const From2 &y)

## Related Functions
(Note that these are not member functions.)
template<typename Boundary , typename Info >
void | swap (Interval< Boundary, Info > &x, Interval< Boundary, Info > &y)
| Swaps `x` with `y`. More...
template<typename Boundary , typename Info >
void | swap (Interval< Boundary, Info > &x, Interval< Boundary, Info > &y)

## Detailed Description

### template<typename Boundary, typename Info>
class Parma_Polyhedra_Library::Interval< Boundary, Info >

A generic, not necessarily closed, possibly restricted interval.

The class template type parameter `Boundary` represents the type of the interval boundaries, and can be chosen, among other possibilities, within one of the following number families:

- a bounded precision native integer type (that is, from `signed char` to `long long` and from `int8_t` to `int64_t`);
- a bounded precision floating point type (`float`, `double` or `long double`);
- an unbounded integer or rational type, as provided by the C++ interface of GMP (`mpz_class` or `mpq_class`).

The class template type parameter `Info` allows to control a number of features of the class, among which:

- the ability to support open as well as closed boundaries;
- the ability to represent empty intervals in addition to nonempty ones;
- the ability to represent intervals of extended number families that contain positive and negative infinities;

## Member Function Documentation

template<typename Boundary , typename Info >
template<typename From >

Enable_If<Is_Interval<From>::value, bool>::type Parma_Polyhedra_Library::Interval< Boundary, Info >::simplify_using_context_assign | ( | const From & | y | ) |

Assigns to `*this` a meet-preserving simplification of `*this` with respect to `y`.

Returns
  `false` if and only if the meet of `*this` and `y` is empty.

template<typename Boundary , typename Info >
template<typename From >

Enable_If<Is_Singleton<From>::value || Is_Interval<From>::value, I_Result>::type Parma_Polyhedra_Library::Interval< Boundary, Info >::refine_existential | ( | Relation_Symbol | rel,
|  | const From & | x
| ) |  |

Refines `to` according to the existential relation `rel` with `x`.

The `to` interval is restricted to become, upon successful exit, the smallest interval of its type that contains the set

Returns
  ???

template<typename Boundary , typename Info >
template<typename From >

Enable_If<Is_Singleton<From>::value || Is_Interval<From>::value, I_Result>::type Parma_Polyhedra_Library::Interval< Boundary, Info >::refine_universal | ( | Relation_Symbol | rel,
|  | const From & | x
| ) |  |

Refines `to` so that it satisfies the universal relation `rel` with `x`.

The `to` interval is restricted to become, upon successful exit, the smallest interval of its type that contains the set

Returns
  ???

template<typename Boundary , typename Info >
template<typename From1 , typename From2 >

Enable_If<((Is_Singleton<From1>::value || Is_Interval<From1>::value) && (Is_Singleton<From2>::value || Is_Interval<From2>::value)), I_Result>::type Parma_Polyhedra_Library::Interval< Boundary, Info >::mul_assign | ( | const From1 & | x,
|  | const From2 & | y
| ) |  |
| inline

+———+———–+———–+—————–+ | * | yl > 0 | yu < 0 | yl < 0, yu > 0 | +———+———–+———–+—————–+ | xl > 0 |xl*yl,xu*yu|xu*yl,xl*yu| xu*yl,xu*yu | +———+———–+———–+—————–+ | xu < 0 |xl*yu,xu*yl|xu*yu,xl*yl| xl*yu,xl*yl | +———+———–+———–+—————–+ |xl<0 xu>0|xl*yu,xu*yu|xu*yl,xl*yl|min(xl*yu,xu*yl),| | | | |max(xl*yl,xu*yu) | +———+———–+———–+—————–+

template<typename Boundary , typename Info >
template<typename From1 , typename From2 >

Enable_If<((Is_Singleton<From1>::value || Is_Interval<From1>::value) && (Is_Singleton<From2>::value || Is_Interval<From2>::value)), I_Result>::type Parma_Polyhedra_Library::Interval< Boundary, Info >::div_assign | ( | const From1 & | x,
|  | const From2 & | y
| ) |  |
| inline

+———–+———–+———–+ | / | yu < 0 | yl > 0 | +———–+———–+———–+ | xu<=0 |xu/yl,xl/yu|xl/yl,xu/yu| +———–+———–+———–+ |xl<=0 xu>=0|xu/yu,xl/yu|xl/yl,xu/yl| +———–+———–+———–+ | xl>=0 |xu/yu,xl/yl|xl/yu,xu/yl| +———–+———–+———–+

## Friends And Related Function Documentation

template<typename Boundary , typename Info >

void swap | ( | Interval< Boundary, Info > & | x,
|  | Interval< Boundary, Info > & | y
| ) |  |
| related

Swaps `x` with `y`.

template<typename Boundary , typename Info >

void swap | ( | Interval< Boundary, Info > & | x,
|  | Interval< Boundary, Info > & | y
| ) |  |
| related

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

- ppl.hh