Parma_Polyhedra_Library::Interval_Restriction_Integer< Base > Class Template Reference

#include <Interval_Restriction.defs.hh>

Inheritance diagram for Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >:

Inheritance graph
[legend]
Collaboration diagram for Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Interval_Restriction_Integer ()
void set_integer (bool v=true)
bool get_integer () const
 const_int_nodef (integer_bit, Base::next_bit)
 const_int_nodef (next_bit, integer_bit+1)
bool has_restriction () const
void normalize () const
template<typename T>
Result restrict (T &x, Result dir) const


Detailed Description

template<typename Base>
class Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >

Definition at line 142 of file Interval_Restriction.defs.hh.


Constructor & Destructor Documentation

Definition at line 144 of file Interval_Restriction.defs.hh.

00144                                  {
00145   }


Member Function Documentation

template<typename Base>
void Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::set_integer ( bool  v = true  )  [inline]

template<typename Base>
bool Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::get_integer (  )  const [inline]

template<typename Base>
Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::const_int_nodef ( integer_bit  ,
Base::next_bit   
)

template<typename Base>
Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::const_int_nodef ( next_bit  ,
integer_bit+  1 
)

template<typename Base>
bool Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::has_restriction (  )  const [inline]

template<typename Base>
void Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::normalize (  )  const [inline]

Definition at line 158 of file Interval_Restriction.defs.hh.

00158                          {
00159   }

template<typename Base>
template<typename T>
Result Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::restrict ( T &  x,
Result  dir 
) const [inline]

Definition at line 161 of file Interval_Restriction.defs.hh.

References Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::has_restriction(), and Parma_Polyhedra_Library::is_integer().

00161                                           {
00162     if (!has_restriction())
00163       return dir;
00164     switch (dir) {
00165     case V_GT:
00166       if (is_integer(x))
00167         return add_assign_r(x, x, static_cast<T>(1), ROUND_DOWN);
00168       /* Fall through */
00169     case V_GE:
00170       return ceil_assign_r(x, x, ROUND_DOWN);
00171     case V_LT:
00172       if (is_integer(x))
00173         sub_assign_r(x, x, static_cast<T>(1), ROUND_UP);
00174       /* Fall through */
00175     case V_LE:
00176       return floor_assign_r(x, x, ROUND_UP);
00177     default:
00178       assert(false);
00179       return dir;
00180     }
00181   }


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

Generated on Sat Oct 11 10:41:11 2008 for PPL by  doxygen 1.5.6