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 (Rounding_Dir rdir, T &x, Result dir) const

Detailed Description

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

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


Constructor & Destructor Documentation

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

00148                                  {
00149   }


Member Function Documentation

template<typename Base>
Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::const_int_nodef ( next_bit  ,
integer_bit+  1 
)
template<typename Base>
Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::const_int_nodef ( integer_bit  ,
Base::next_bit   
)
template<typename Base>
bool Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::get_integer (  )  const [inline]
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 162 of file Interval_Restriction.defs.hh.

00162                          {
00163   }

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

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

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

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

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

The documentation for this class was generated from the following file:
Generated on Sun Feb 27 16:20:27 2011 for PPL by  doxygen 1.6.3