#include <Interval_Restriction.defs.hh>
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 |
Definition at line 142 of file Interval_Restriction.defs.hh.
Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::Interval_Restriction_Integer | ( | ) | [inline] |
void Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::set_integer | ( | bool | v = true |
) | [inline] |
Definition at line 146 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Interval_NS::set_bit().
Referenced by Parma_Polyhedra_Library::add_restriction(), Parma_Polyhedra_Library::assign_restriction(), Parma_Polyhedra_Library::diff_restriction(), Parma_Polyhedra_Library::div_restriction(), Parma_Polyhedra_Library::intersect_restriction(), Parma_Polyhedra_Library::join_restriction(), Parma_Polyhedra_Library::mul_restriction(), Parma_Polyhedra_Library::neg_restriction(), and Parma_Polyhedra_Library::sub_restriction().
00146 { 00147 return set_bit(Base::bitset, integer_bit, v); 00148 }
bool Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::get_integer | ( | ) | const [inline] |
Definition at line 149 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Interval_NS::get_bit().
Referenced by Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::has_restriction(), and Parma_Polyhedra_Library::output_restriction().
00149 { 00150 return get_bit(Base::bitset, integer_bit); 00151 }
Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::const_int_nodef | ( | integer_bit | , | |
Base::next_bit | ||||
) |
Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::const_int_nodef | ( | next_bit | , | |
integer_bit+ | 1 | |||
) |
bool Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::has_restriction | ( | ) | const [inline] |
Definition at line 155 of file Interval_Restriction.defs.hh.
References Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::get_integer().
Referenced by Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::restrict().
00155 { 00156 return get_integer(); 00157 }
void Parma_Polyhedra_Library::Interval_Restriction_Integer< Base >::normalize | ( | ) | const [inline] |
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 }