PPL  0.12.1
Parma_Polyhedra_Library::Boundary_NS Namespace Reference

Classes

struct  Property

Enumerations

enum  Boundary_Type { LOWER = ROUND_DOWN, UPPER = ROUND_UP }

Functions

Rounding_Dir round_dir_check (Boundary_Type t, bool check=false)
template<typename T , typename Info >
Result special_set_boundary_infinity (Boundary_Type type, T &, Info &info)
template<typename T , typename Info >
bool special_is_open (Boundary_Type, const T &, const Info &)
template<typename T , typename Info >
bool normal_is_open (Boundary_Type type, const T &x, const Info &info)
template<typename T , typename Info >
bool is_open (Boundary_Type type, const T &x, const Info &info)
template<typename T , typename Info >
Result set_unbounded (Boundary_Type type, T &x, Info &info)
template<typename T , typename Info >
Result set_minus_infinity (Boundary_Type type, T &x, Info &info, bool open=false)
template<typename T , typename Info >
Result set_plus_infinity (Boundary_Type type, T &x, Info &info, bool open=false)
template<typename T , typename Info >
Result set_boundary_infinity (Boundary_Type type, T &x, Info &info, bool open=false)
template<typename T , typename Info >
bool is_domain_inf (Boundary_Type type, const T &x, const Info &info)
template<typename T , typename Info >
bool is_domain_sup (Boundary_Type type, const T &x, const Info &info)
template<typename T , typename Info >
bool normal_is_boundary_infinity (Boundary_Type type, const T &x, const Info &)
template<typename T , typename Info >
bool is_boundary_infinity (Boundary_Type type, const T &x, const Info &info)
template<typename T , typename Info >
bool normal_is_reverse_infinity (Boundary_Type type, const T &x, const Info &)
template<typename T , typename Info >
bool is_minus_infinity (Boundary_Type type, const T &x, const Info &info)
template<typename T , typename Info >
bool is_plus_infinity (Boundary_Type type, const T &x, const Info &info)
template<typename T , typename Info >
bool is_reverse_infinity (Boundary_Type type, const T &x, const Info &info)
template<typename T , typename Info >
int infinity_sign (Boundary_Type type, const T &x, const Info &info)
template<typename T , typename Info >
bool is_boundary_infinity_closed (Boundary_Type type, const T &x, const Info &info)
template<typename Info >
bool boundary_infinity_is_open (Boundary_Type type, const Info &info)
template<typename T , typename Info >
int sgn_b (Boundary_Type type, const T &x, const Info &info)
template<typename T , typename Info >
int sgn (Boundary_Type type, const T &x, const Info &info)
template<typename T1 , typename Info1 , typename T2 , typename Info2 >
bool eq (Boundary_Type type1, const T1 &x1, const Info1 &info1, Boundary_Type type2, const T2 &x2, const Info2 &info2)
template<typename T1 , typename Info1 , typename T2 , typename Info2 >
bool lt (Boundary_Type type1, const T1 &x1, const Info1 &info1, Boundary_Type type2, const T2 &x2, const Info2 &info2)
template<typename T1 , typename Info1 , typename T2 , typename Info2 >
bool gt (Boundary_Type type1, const T1 &x1, const Info1 &info1, Boundary_Type type2, const T2 &x2, const Info2 &info2)
template<typename T1 , typename Info1 , typename T2 , typename Info2 >
bool le (Boundary_Type type1, const T1 &x1, const Info1 &info1, Boundary_Type type2, const T2 &x2, const Info2 &info2)
template<typename T1 , typename Info1 , typename T2 , typename Info2 >
bool ge (Boundary_Type type1, const T1 &x1, const Info1 &info1, Boundary_Type type2, const T2 &x2, const Info2 &info2)
template<typename T , typename Info >
Result adjust_boundary (Boundary_Type type, T &x, Info &info, bool open, Result r)
template<typename To , typename To_Info , typename T , typename Info >
Result complement (Boundary_Type to_type, To &to, To_Info &to_info, Boundary_Type type, const T &x, const Info &info)
template<typename To , typename To_Info , typename T , typename Info >
Result assign (Boundary_Type to_type, To &to, To_Info &to_info, Boundary_Type type, const T &x, const Info &info, bool should_shrink=false)
template<typename To , typename To_Info , typename T , typename Info >
Result min_assign (Boundary_Type to_type, To &to, To_Info &to_info, Boundary_Type type, const T &x, const Info &info)
template<typename To , typename To_Info , typename T1 , typename Info1 , typename T2 , typename Info2 >
Result min_assign (Boundary_Type to_type, To &to, To_Info &to_info, Boundary_Type type1, const T1 &x1, const Info1 &info1, Boundary_Type type2, const T2 &x2, const Info2 &info2)
template<typename To , typename To_Info , typename T , typename Info >
Result max_assign (Boundary_Type to_type, To &to, To_Info &to_info, Boundary_Type type, const T &x, const Info &info)
template<typename To , typename To_Info , typename T1 , typename Info1 , typename T2 , typename Info2 >
Result max_assign (Boundary_Type to_type, To &to, To_Info &to_info, Boundary_Type type1, const T1 &x1, const Info1 &info1, Boundary_Type type2, const T2 &x2, const Info2 &info2)
template<typename To , typename To_Info , typename T , typename Info >
Result neg_assign (Boundary_Type to_type, To &to, To_Info &to_info, Boundary_Type type, const T &x, const Info &info)
template<typename To , typename To_Info , typename T1 , typename Info1 , typename T2 , typename Info2 >
Result add_assign (Boundary_Type to_type, To &to, To_Info &to_info, Boundary_Type type1, const T1 &x1, const Info1 &info1, Boundary_Type type2, const T2 &x2, const Info2 &info2)
template<typename To , typename To_Info , typename T1 , typename Info1 , typename T2 , typename Info2 >
Result sub_assign (Boundary_Type to_type, To &to, To_Info &to_info, Boundary_Type type1, const T1 &x1, const Info1 &info1, Boundary_Type type2, const T2 &x2, const Info2 &info2)
template<typename To , typename To_Info , typename T1 , typename Info1 , typename T2 , typename Info2 >
Result mul_assign (Boundary_Type to_type, To &to, To_Info &to_info, Boundary_Type type1, const T1 &x1, const Info1 &info1, Boundary_Type type2, const T2 &x2, const Info2 &info2)
template<typename To , typename To_Info >
Result set_zero (Boundary_Type to_type, To &to, To_Info &to_info, bool should_shrink)
template<typename To , typename To_Info , typename T1 , typename Info1 , typename T2 , typename Info2 >
Result mul_assign_z (Boundary_Type to_type, To &to, To_Info &to_info, Boundary_Type type1, const T1 &x1, const Info1 &info1, int x1s, Boundary_Type type2, const T2 &x2, const Info2 &info2, int x2s)
template<typename To , typename To_Info , typename T1 , typename Info1 , typename T2 , typename Info2 >
Result div_assign (Boundary_Type to_type, To &to, To_Info &to_info, Boundary_Type type1, const T1 &x1, const Info1 &info1, Boundary_Type type2, const T2 &x2, const Info2 &info2)
template<typename To , typename To_Info , typename T1 , typename Info1 , typename T2 , typename Info2 >
Result div_assign_z (Boundary_Type to_type, To &to, To_Info &to_info, Boundary_Type type1, const T1 &x1, const Info1 &info1, int x1s, Boundary_Type type2, const T2 &x2, const Info2 &info2, int x2s)
template<typename To , typename To_Info , typename T , typename Info >
Result umod_2exp_assign (Boundary_Type to_type, To &to, To_Info &to_info, Boundary_Type type, const T &x, const Info &info, unsigned int exp)
template<typename To , typename To_Info , typename T , typename Info >
Result smod_2exp_assign (Boundary_Type to_type, To &to, To_Info &to_info, Boundary_Type type, const T &x, const Info &info, unsigned int exp)

Variables

static const Property SPECIAL (Property::SPECIAL_)
static const Property OPEN (Property::OPEN_)

Enumeration Type Documentation

Enumerator:
LOWER 
UPPER 

Definition at line 50 of file Boundary.defs.hh.


Function Documentation

template<typename To , typename To_Info , typename T1 , typename Info1 , typename T2 , typename Info2 >
Result Parma_Polyhedra_Library::Boundary_NS::add_assign ( Boundary_Type  to_type,
To &  to,
To_Info &  to_info,
Boundary_Type  type1,
const T1 &  x1,
const Info1 &  info1,
Boundary_Type  type2,
const T2 &  x2,
const Info2 &  info2 
)
inline

Definition at line 553 of file Boundary.defs.hh.

References adjust_boundary(), boundary_infinity_is_open(), is_boundary_infinity(), is_boundary_infinity_closed(), normal_is_open(), PPL_ASSERT, round_dir_check(), and set_boundary_infinity().

Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::add_assign(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::operator+=().

                                                                  {
  PPL_ASSERT(type1 == type2);
  bool should_shrink;
  if (is_boundary_infinity(type1, x1, info1)) {
    should_shrink = (boundary_infinity_is_open(type1, info1)
                     && !is_boundary_infinity_closed(type2, x2, info2));
    return set_boundary_infinity(to_type, to, to_info, should_shrink);
  }
  else if (is_boundary_infinity(type2, x2, info2)) {
    should_shrink = (boundary_infinity_is_open(type2, info2)
                     && !is_boundary_infinity_closed(type1, x1, info1));
    return set_boundary_infinity(to_type, to, to_info, should_shrink);
  }
  should_shrink = (normal_is_open(type1, x1, info1)
                   || normal_is_open(type2, x2, info2));
  bool check = (To_Info::check_inexact || (!should_shrink && To_Info::store_open));
  // FIXME: extended handling is not needed
  Result r = add_assign_r(to, x1, x2, round_dir_check(to_type, check));
  return adjust_boundary(to_type, to, to_info, should_shrink, r);
}
template<typename T , typename Info >
Result Parma_Polyhedra_Library::Boundary_NS::adjust_boundary ( Boundary_Type  type,
T &  x,
Info &  info,
bool  open,
Result  r 
)
inline

Definition at line 403 of file Boundary.defs.hh.

References LOWER, OPEN, PPL_UNREACHABLE, Parma_Polyhedra_Library::result_relation_class(), special_set_boundary_infinity(), Parma_Polyhedra_Library::V_EQ, Parma_Polyhedra_Library::V_EQ_MINUS_INFINITY, Parma_Polyhedra_Library::V_EQ_PLUS_INFINITY, Parma_Polyhedra_Library::V_GE, Parma_Polyhedra_Library::V_GT, Parma_Polyhedra_Library::V_GT_MINUS_INFINITY, Parma_Polyhedra_Library::V_LE, Parma_Polyhedra_Library::V_LT, Parma_Polyhedra_Library::V_LT_PLUS_INFINITY, and Parma_Polyhedra_Library::V_NAN.

Referenced by add_assign(), assign(), complement(), div_assign(), mul_assign(), neg_assign(), set_zero(), smod_2exp_assign(), sub_assign(), and umod_2exp_assign().

                                     {
  r = result_relation_class(r);
  if (type == LOWER) {
    switch (r) {
    case V_GT_MINUS_INFINITY:
      open = true;
      /* Fall through */
    case V_EQ_MINUS_INFINITY:
      if (!Info::store_special)
        return r;
      if (open)
        info.set_boundary_property(type, OPEN);
      return special_set_boundary_infinity(type, x, info);
    case V_GT:
      open = true;
      /* Fall through */
    case V_GE:
    case V_EQ:
      if (open)
        info.set_boundary_property(type, OPEN);
      return r;
    default:
      PPL_UNREACHABLE;
      return V_NAN;
    }
  }
  else {
    switch (r) {
    case V_LT_PLUS_INFINITY:
      open = true;
      /* Fall through */
    case V_EQ_PLUS_INFINITY:
      if (!Info::store_special)
        return r;
      if (open)
        info.set_boundary_property(type, OPEN);
      return special_set_boundary_infinity(type, x, info);
    case V_LT:
      open = true;
      /* Fall through */
    case V_LE:
    case V_EQ:
      if (open)
        info.set_boundary_property(type, OPEN);
      return r;
    default:
      PPL_UNREACHABLE;
      return V_NAN;
    }
  }
}
template<typename To , typename To_Info , typename T , typename Info >
Result Parma_Polyhedra_Library::Boundary_NS::assign ( Boundary_Type  to_type,
To &  to,
To_Info &  to_info,
Boundary_Type  type,
const T &  x,
const Info &  info,
bool  should_shrink = false 
)
inline

Definition at line 477 of file Boundary.defs.hh.

References adjust_boundary(), Parma_Polyhedra_Library::assign_r(), normal_is_open(), PPL_ASSERT, round_dir_check(), set_boundary_infinity(), SPECIAL, and special_is_open().

Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::add_assign(), Parma_Polyhedra_Library::Box< ITV >::Box(), Parma_Polyhedra_Library::Interval< Boundary, Info >::build(), Parma_Polyhedra_Library::Polyhedron::conversion(), Parma_Polyhedra_Library::Interval< Boundary, Info >::difference_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::div_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::empty_intersection_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::Interval(), Parma_Polyhedra_Library::Interval< Boundary, Info >::join_assign(), max_assign(), min_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::mul_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::neg_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::operator=(), Parma_Polyhedra_Library::operator>>(), Parma_Polyhedra_Library::Interval< Boundary, Info >::refine_existential(), Parma_Polyhedra_Library::Interval< Boundary, Info >::refine_universal(), Parma_Polyhedra_Library::MIP_Problem::steepest_edge_float_entering_index(), Parma_Polyhedra_Library::Interval< Boundary, Info >::sub_assign(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::wrap_assign().

                                   {
  PPL_ASSERT(to_type == type);
  if (info.get_boundary_property(type, SPECIAL)) {
    should_shrink = (should_shrink || special_is_open(type, x, info));
    return set_boundary_infinity(to_type, to, to_info, should_shrink);
  }
  should_shrink = (should_shrink || normal_is_open(type, x, info));
  bool check = (To_Info::check_inexact || (!should_shrink && To_Info::store_open));
  Result r = assign_r(to, x, round_dir_check(to_type, check));
  return adjust_boundary(to_type, to, to_info, should_shrink, r);
}
template<typename Info >
bool Parma_Polyhedra_Library::Boundary_NS::boundary_infinity_is_open ( Boundary_Type  type,
const Info &  info 
)
inline

Definition at line 299 of file Boundary.defs.hh.

References OPEN.

Referenced by add_assign(), div_assign(), mul_assign(), smod_2exp_assign(), sub_assign(), and umod_2exp_assign().

                                                                {
  return !Info::may_contain_infinity
    || info.get_boundary_property(type, OPEN);
}
template<typename To , typename To_Info , typename T , typename Info >
Result Parma_Polyhedra_Library::Boundary_NS::complement ( Boundary_Type  to_type,
To &  to,
To_Info &  to_info,
Boundary_Type  type,
const T &  x,
const Info &  info 
)
inline

Definition at line 458 of file Boundary.defs.hh.

References adjust_boundary(), Parma_Polyhedra_Library::assign_r(), LOWER, normal_is_open(), PPL_ASSERT, round_dir_check(), set_minus_infinity(), set_plus_infinity(), SPECIAL, and special_is_open().

Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::difference_assign().

                                                             {
  PPL_ASSERT(to_type != type);
  bool should_shrink;
  if (info.get_boundary_property(type, SPECIAL)) {
    should_shrink = !special_is_open(type, x, info);
    if (type == LOWER)
      return set_minus_infinity(to_type, to, to_info, should_shrink);
    else
      return set_plus_infinity(to_type, to, to_info, should_shrink);
  }
  should_shrink = !normal_is_open(type, x, info);
  bool check = (To_Info::check_inexact || (!should_shrink && To_Info::store_open));
  Result r = assign_r(to, x, round_dir_check(to_type, check));
  return adjust_boundary(to_type, to, to_info, should_shrink, r);
}
template<typename To , typename To_Info , typename T1 , typename Info1 , typename T2 , typename Info2 >
Result Parma_Polyhedra_Library::Boundary_NS::div_assign ( Boundary_Type  to_type,
To &  to,
To_Info &  to_info,
Boundary_Type  type1,
const T1 &  x1,
const Info1 &  info1,
Boundary_Type  type2,
const T2 &  x2,
const Info2 &  info2 
)
inline

Definition at line 657 of file Boundary.defs.hh.

References adjust_boundary(), boundary_infinity_is_open(), is_boundary_infinity(), normal_is_open(), PPL_ASSERT, round_dir_check(), set_boundary_infinity(), and set_zero().

Referenced by div_assign_z(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::operator/=().

                                                                  {
  bool should_shrink;
  if (is_boundary_infinity(type1, x1, info1)) {
    should_shrink = boundary_infinity_is_open(type1, info1);
    return set_boundary_infinity(to_type, to, to_info, should_shrink);
  }
  else if (is_boundary_infinity(type2, x2, info2)) {
    should_shrink = boundary_infinity_is_open(type2, info2);
    return set_zero(to_type, to, to_info, should_shrink);
  }
  should_shrink = (normal_is_open(type1, x1, info1)
                   || normal_is_open(type2, x2, info2));
  bool check = (To_Info::check_inexact || (!should_shrink && To_Info::store_open));
  PPL_ASSERT(x1 != Constant<0>::value && x2 != Constant<0>::value);
  // FIXME: extended handling is not needed
  Result r = div_assign_r(to, x1, x2, round_dir_check(to_type, check));
  return adjust_boundary(to_type, to, to_info, should_shrink, r);
}
template<typename To , typename To_Info , typename T1 , typename Info1 , typename T2 , typename Info2 >
Result Parma_Polyhedra_Library::Boundary_NS::div_assign_z ( Boundary_Type  to_type,
To &  to,
To_Info &  to_info,
Boundary_Type  type1,
const T1 &  x1,
const Info1 &  info1,
int  x1s,
Boundary_Type  type2,
const T2 &  x2,
const Info2 &  info2,
int  x2s 
)
inline

Definition at line 681 of file Boundary.defs.hh.

References div_assign(), is_boundary_infinity_closed(), OPEN, set_boundary_infinity(), and set_zero().

Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::div_assign().

                                                                             {
  if (x1s != 0) {
    if (x2s != 0)
      return div_assign(to_type, to, to_info,
                        type1, x1, info1,
                        type2, x2, info2);
    else {
      return set_boundary_infinity(to_type, to, to_info, true);
    }
  }
  else {
    bool should_shrink = info1.get_boundary_property(type1, OPEN)
      && !is_boundary_infinity_closed(type2, x2, info2);
    return set_zero(to_type, to, to_info, should_shrink);
  }
}
template<typename T1 , typename Info1 , typename T2 , typename Info2 >
bool Parma_Polyhedra_Library::Boundary_NS::eq ( Boundary_Type  type1,
const T1 &  x1,
const Info1 &  info1,
Boundary_Type  type2,
const T2 &  x2,
const Info2 &  info2 
)
inline

Definition at line 327 of file Boundary.defs.hh.

References is_minus_infinity(), is_open(), and is_plus_infinity().

Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::is_singleton().

                                                          {
  if (type1 == type2) {
    if (is_open(type1, x1, info1)
        != is_open(type2, x2, info2))
      return false;
  }
  else if (is_open(type1, x1, info1)
           || is_open(type2, x2, info2))
    return false;
  if (is_minus_infinity(type1, x1, info1))
    return is_minus_infinity(type2, x2, info2);
  else if (is_plus_infinity(type1, x1, info1))
    return is_plus_infinity(type2, x2, info2);
  else if (is_minus_infinity(type2, x2, info2)
           || is_plus_infinity(type2, x2, info2))
    return false;
  else
    return equal(x1, x2);
}
template<typename T1 , typename Info1 , typename T2 , typename Info2 >
bool Parma_Polyhedra_Library::Boundary_NS::ge ( Boundary_Type  type1,
const T1 &  x1,
const Info1 &  info1,
Boundary_Type  type2,
const T2 &  x2,
const Info2 &  info2 
)
inline
template<typename T , typename Info >
int Parma_Polyhedra_Library::Boundary_NS::infinity_sign ( Boundary_Type  type,
const T &  x,
const Info &  info 
)
inline

Definition at line 280 of file Boundary.defs.hh.

References is_boundary_infinity(), is_reverse_infinity(), LOWER, and UPPER.

                                                                {
  if (is_boundary_infinity(type, x, info))
    return (type == LOWER) ? -1 : 1;
  else if (is_reverse_infinity(type, x, info))
    return (type == UPPER) ? -1 : 1;
  else
    return 0;
}
template<typename T , typename Info >
bool Parma_Polyhedra_Library::Boundary_NS::is_boundary_infinity ( Boundary_Type  type,
const T &  x,
const Info &  info 
)
inline
template<typename T , typename Info >
bool Parma_Polyhedra_Library::Boundary_NS::is_boundary_infinity_closed ( Boundary_Type  type,
const T &  x,
const Info &  info 
)
inline

Definition at line 291 of file Boundary.defs.hh.

References is_boundary_infinity(), and OPEN.

Referenced by add_assign(), div_assign_z(), mul_assign(), and sub_assign().

                                                                              {
  return Info::may_contain_infinity
    && !info.get_boundary_property(type, OPEN)
    && is_boundary_infinity(type, x, info);
}
template<typename T , typename Info >
bool Parma_Polyhedra_Library::Boundary_NS::is_domain_inf ( Boundary_Type  type,
const T &  x,
const Info &  info 
)
inline

Definition at line 191 of file Boundary.defs.hh.

References is_minus_infinity(), LOWER, and SPECIAL.

Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::lower_is_domain_inf().

                                                                {
  if (Info::store_special && type == LOWER)
    return info.get_boundary_property(type, SPECIAL);
  else if (std::numeric_limits<T>::has_infinity)
    return Parma_Polyhedra_Library::is_minus_infinity(x);
  else if (std::numeric_limits<T>::is_bounded)
    return x == std::numeric_limits<T>::min();
  else
    return false;
}
template<typename T , typename Info >
bool Parma_Polyhedra_Library::Boundary_NS::is_domain_sup ( Boundary_Type  type,
const T &  x,
const Info &  info 
)
inline

Definition at line 204 of file Boundary.defs.hh.

References is_plus_infinity(), SPECIAL, and UPPER.

Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::upper_is_domain_sup().

                                                                {
  if (Info::store_special && type == UPPER)
    return info.get_boundary_property(type, SPECIAL);
  else if (std::numeric_limits<T>::has_infinity)
    return Parma_Polyhedra_Library::is_plus_infinity(x);
  else if (std::numeric_limits<T>::is_bounded)
      return x == std::numeric_limits<T>::max();
  else
    return false;
}
template<typename T , typename Info >
bool Parma_Polyhedra_Library::Boundary_NS::is_minus_infinity ( Boundary_Type  type,
const T &  x,
const Info &  info 
)
inline

Definition at line 248 of file Boundary.defs.hh.

References LOWER, normal_is_boundary_infinity(), normal_is_reverse_infinity(), and SPECIAL.

Referenced by eq(), is_domain_inf(), lt(), normal_is_boundary_infinity(), normal_is_reverse_infinity(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::OK().

                                                                    {
  if (type == LOWER) {
    if (Info::store_special)
      return info.get_boundary_property(type, SPECIAL);
    else
      return normal_is_boundary_infinity(type, x, info);
  }
  else
    return !Info::store_special && normal_is_reverse_infinity(type, x, info);
}
template<typename T , typename Info >
bool Parma_Polyhedra_Library::Boundary_NS::is_open ( Boundary_Type  type,
const T &  x,
const Info &  info 
)
inline
template<typename T , typename Info >
bool Parma_Polyhedra_Library::Boundary_NS::is_plus_infinity ( Boundary_Type  type,
const T &  x,
const Info &  info 
)
inline

Definition at line 261 of file Boundary.defs.hh.

References normal_is_boundary_infinity(), normal_is_reverse_infinity(), SPECIAL, and UPPER.

Referenced by eq(), is_domain_sup(), lt(), normal_is_boundary_infinity(), normal_is_reverse_infinity(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::OK().

                                                                   {
  if (type == UPPER) {
    if (Info::store_special)
      return info.get_boundary_property(type, SPECIAL);
    else
      return normal_is_boundary_infinity(type, x, info);
  }
  else
    return !Info::store_special && normal_is_reverse_infinity(type, x, info);
}
template<typename T , typename Info >
bool Parma_Polyhedra_Library::Boundary_NS::is_reverse_infinity ( Boundary_Type  type,
const T &  x,
const Info &  info 
)
inline
template<typename T1 , typename Info1 , typename T2 , typename Info2 >
bool Parma_Polyhedra_Library::Boundary_NS::le ( Boundary_Type  type1,
const T1 &  x1,
const Info1 &  info1,
Boundary_Type  type2,
const T2 &  x2,
const Info2 &  info2 
)
inline

Definition at line 389 of file Boundary.defs.hh.

References gt().

Referenced by lt(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::wrap_assign().

                                                          {
  return !gt(type1, x1, info1, type2, x2, info2);
}
template<typename T1 , typename Info1 , typename T2 , typename Info2 >
bool Parma_Polyhedra_Library::Boundary_NS::lt ( Boundary_Type  type1,
const T1 &  x1,
const Info1 &  info1,
Boundary_Type  type2,
const T2 &  x2,
const Info2 &  info2 
)
inline

Definition at line 350 of file Boundary.defs.hh.

References is_minus_infinity(), is_open(), is_plus_infinity(), le(), LOWER, and UPPER.

Referenced by ge(), gt(), Parma_Polyhedra_Library::Interval< Boundary, Info >::is_empty(), and min_assign().

                                                          {
  if (is_open(type1, x1, info1)) {
    if (type1 == UPPER
        && (type2 == LOWER
            || !is_open(type2, x2, info2)))
      goto le;
  }
  else if (type2 == LOWER
           && is_open(type2, x2, info2)) {
  le:
    if (is_minus_infinity(type1, x1, info1)
        || is_plus_infinity(type2, x2, info2))
      return true;
    if (is_plus_infinity(type1, x1, info1)
        || is_minus_infinity(type2, x2, info2))
      return false;
    else
      return less_or_equal(x1, x2);
  }
  if (is_plus_infinity(type1, x1, info1)
      || is_minus_infinity(type2, x2, info2))
    return false;
  if (is_minus_infinity(type1, x1, info1)
      || is_plus_infinity(type2, x2, info2))
    return true;
  else
    return less_than(x1, x2);
}
template<typename To , typename To_Info , typename T , typename Info >
Result Parma_Polyhedra_Library::Boundary_NS::max_assign ( Boundary_Type  to_type,
To &  to,
To_Info &  to_info,
Boundary_Type  type,
const T &  x,
const Info &  info 
)
inline

Definition at line 515 of file Boundary.defs.hh.

References assign(), gt(), and Parma_Polyhedra_Library::V_EQ.

                                                             {
  if (gt(type, x, info, to_type, to, to_info)) {
    to_info.clear_boundary_properties(to_type);
    return assign(to_type, to, to_info, type, x, info);
  }
  return V_EQ;
}
template<typename To , typename To_Info , typename T1 , typename Info1 , typename T2 , typename Info2 >
Result Parma_Polyhedra_Library::Boundary_NS::max_assign ( Boundary_Type  to_type,
To &  to,
To_Info &  to_info,
Boundary_Type  type1,
const T1 &  x1,
const Info1 &  info1,
Boundary_Type  type2,
const T2 &  x2,
const Info2 &  info2 
)
inline

Definition at line 526 of file Boundary.defs.hh.

References assign(), and gt().

                                                                  {
  if (gt(type1, x1, info1, type2, x2, info2))
    return assign(to_type, to, to_info, type1, x1, info1);
  else
    return assign(to_type, to, to_info, type2, x2, info2);
}
template<typename To , typename To_Info , typename T , typename Info >
Result Parma_Polyhedra_Library::Boundary_NS::min_assign ( Boundary_Type  to_type,
To &  to,
To_Info &  to_info,
Boundary_Type  type,
const T &  x,
const Info &  info 
)
inline

Definition at line 493 of file Boundary.defs.hh.

References assign(), lt(), and Parma_Polyhedra_Library::V_EQ.

                                                             {
  if (lt(type, x, info, to_type, to, to_info)) {
    to_info.clear_boundary_properties(to_type);
    return assign(to_type, to, to_info, type, x, info);
  }
  return V_EQ;
}
template<typename To , typename To_Info , typename T1 , typename Info1 , typename T2 , typename Info2 >
Result Parma_Polyhedra_Library::Boundary_NS::min_assign ( Boundary_Type  to_type,
To &  to,
To_Info &  to_info,
Boundary_Type  type1,
const T1 &  x1,
const Info1 &  info1,
Boundary_Type  type2,
const T2 &  x2,
const Info2 &  info2 
)
inline

Definition at line 504 of file Boundary.defs.hh.

References assign(), and lt().

                                                                  {
  if (lt(type1, x1, info1, type2, x2, info2))
    return assign(to_type, to, to_info, type1, x1, info1);
  else
    return assign(to_type, to, to_info, type2, x2, info2);
}
template<typename To , typename To_Info , typename T1 , typename Info1 , typename T2 , typename Info2 >
Result Parma_Polyhedra_Library::Boundary_NS::mul_assign ( Boundary_Type  to_type,
To &  to,
To_Info &  to_info,
Boundary_Type  type1,
const T1 &  x1,
const Info1 &  info1,
Boundary_Type  type2,
const T2 &  x2,
const Info2 &  info2 
)
inline

Definition at line 603 of file Boundary.defs.hh.

References adjust_boundary(), boundary_infinity_is_open(), is_boundary_infinity(), is_boundary_infinity_closed(), normal_is_open(), PPL_ASSERT, round_dir_check(), and set_boundary_infinity().

Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::mul_assign(), mul_assign_z(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::operator*=().

                                                                  {
  bool should_shrink;
  if (is_boundary_infinity(type1, x1, info1)) {
    should_shrink = (boundary_infinity_is_open(type1, info1)
                     && !is_boundary_infinity_closed(type2, x2, info2));
    return set_boundary_infinity(to_type, to, to_info, should_shrink);
  }
  else if (is_boundary_infinity(type2, x2, info2)) {
    should_shrink = (boundary_infinity_is_open(type2, info2)
                     && !is_boundary_infinity_closed(type1, x1, info1));
    return set_boundary_infinity(to_type, to, to_info, should_shrink);
  }
  should_shrink = (normal_is_open(type1, x1, info1)
                   || normal_is_open(type2, x2, info2));
  bool check = (To_Info::check_inexact || (!should_shrink && To_Info::store_open));
  PPL_ASSERT(x1 != Constant<0>::value && x2 != Constant<0>::value);
  // FIXME: extended handling is not needed
  Result r = mul_assign_r(to, x1, x2, round_dir_check(to_type, check));
  return adjust_boundary(to_type, to, to_info, should_shrink, r);
}
template<typename To , typename To_Info , typename T1 , typename Info1 , typename T2 , typename Info2 >
Result Parma_Polyhedra_Library::Boundary_NS::mul_assign_z ( Boundary_Type  to_type,
To &  to,
To_Info &  to_info,
Boundary_Type  type1,
const T1 &  x1,
const Info1 &  info1,
int  x1s,
Boundary_Type  type2,
const T2 &  x2,
const Info2 &  info2,
int  x2s 
)
inline

Definition at line 636 of file Boundary.defs.hh.

References mul_assign(), OPEN, and set_zero().

Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::mul_assign().

                                                                             {
  bool should_shrink;
  if (x1s != 0) {
    if (x2s != 0)
      return mul_assign(to_type, to, to_info,
                        type1, x1, info1,
                        type2, x2, info2);
    else
      should_shrink = info2.get_boundary_property(type2, OPEN);
  }
  else {
    should_shrink = (info1.get_boundary_property(type1, OPEN)
                     && (x2s != 0 || info2.get_boundary_property(type2, OPEN)));
  }
  return set_zero(to_type, to, to_info, should_shrink);
}
template<typename To , typename To_Info , typename T , typename Info >
Result Parma_Polyhedra_Library::Boundary_NS::neg_assign ( Boundary_Type  to_type,
To &  to,
To_Info &  to_info,
Boundary_Type  type,
const T &  x,
const Info &  info 
)
inline

Definition at line 537 of file Boundary.defs.hh.

References adjust_boundary(), normal_is_open(), PPL_ASSERT, round_dir_check(), set_boundary_infinity(), SPECIAL, and special_is_open().

Referenced by Parma_Polyhedra_Library::Linear_System::back_substitute(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::neg_assign().

                                                             {
  PPL_ASSERT(to_type != type);
  bool should_shrink;
  if (info.get_boundary_property(type, SPECIAL)) {
    should_shrink = special_is_open(type, x, info);
    return set_boundary_infinity(to_type, to, to_info, should_shrink);
  }
  should_shrink = normal_is_open(type, x, info);
  bool check = (To_Info::check_inexact || (!should_shrink && To_Info::store_open));
  Result r = neg_assign_r(to, x, round_dir_check(to_type, check));
  return adjust_boundary(to_type, to, to_info, should_shrink, r);
}
template<typename T , typename Info >
bool Parma_Polyhedra_Library::Boundary_NS::normal_is_boundary_infinity ( Boundary_Type  type,
const T &  x,
const Info &   
)
inline

Definition at line 217 of file Boundary.defs.hh.

References is_minus_infinity(), is_plus_infinity(), and LOWER.

Referenced by is_boundary_infinity(), is_minus_infinity(), is_plus_infinity(), and normal_is_open().

                                                                         {
  if (!std::numeric_limits<T>::has_infinity)
    return false;
  if (type == LOWER)
    return Parma_Polyhedra_Library::is_minus_infinity(x);
  else
    return Parma_Polyhedra_Library::is_plus_infinity(x);
}
template<typename T , typename Info >
bool Parma_Polyhedra_Library::Boundary_NS::normal_is_open ( Boundary_Type  type,
const T &  x,
const Info &  info 
)
inline

Definition at line 79 of file Boundary.defs.hh.

References normal_is_boundary_infinity(), and OPEN.

Referenced by add_assign(), assign(), complement(), div_assign(), mul_assign(), neg_assign(), smod_2exp_assign(), sub_assign(), and umod_2exp_assign().

                                                                 {
  if (Info::store_open)
    return info.get_boundary_property(type, OPEN);
  else
    return !Info::store_special && !Info::may_contain_infinity
      && normal_is_boundary_infinity(type, x, info);
}
template<typename T , typename Info >
bool Parma_Polyhedra_Library::Boundary_NS::normal_is_reverse_infinity ( Boundary_Type  type,
const T &  x,
const Info &   
)
inline

Definition at line 237 of file Boundary.defs.hh.

References is_minus_infinity(), is_plus_infinity(), and LOWER.

Referenced by is_minus_infinity(), is_plus_infinity(), and is_reverse_infinity().

                                                                        {
  if (!Info::may_contain_infinity)
    return false;
  else if (type == LOWER)
    return Parma_Polyhedra_Library::is_plus_infinity(x);
  else
    return Parma_Polyhedra_Library::is_minus_infinity(x);
}
template<typename T , typename Info >
Result Parma_Polyhedra_Library::Boundary_NS::set_boundary_infinity ( Boundary_Type  type,
T &  x,
Info &  info,
bool  open = false 
)
inline
template<typename T , typename Info >
Result Parma_Polyhedra_Library::Boundary_NS::set_minus_infinity ( Boundary_Type  type,
T &  x,
Info &  info,
bool  open = false 
)
inline

Definition at line 118 of file Boundary.defs.hh.

References Parma_Polyhedra_Library::assign_r(), LOWER, Parma_Polyhedra_Library::MINUS_INFINITY, OPEN, PPL_ASSERT, Parma_Polyhedra_Library::result_relation(), Parma_Polyhedra_Library::result_representable(), round_dir_check(), special_set_boundary_infinity(), and Parma_Polyhedra_Library::VR_EQ.

Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::assign(), complement(), Parma_Polyhedra_Library::Interval< Boundary, Info >::Interval(), Parma_Polyhedra_Library::operator>>(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::set_infinities().

                                                                            {
  /*
  PPL_COMPILE_TIME_CHECK(Info::store_special
                         || std::numeric_limits<T>::has_infinity,
                         "minus infinity is not representable");
  */
  if (open) {
    PPL_ASSERT(type == LOWER);
  }
  else {
    PPL_ASSERT(Info::may_contain_infinity);
  }
  Result r;
  if (Info::store_special) {
    PPL_ASSERT(type == LOWER);
    r = special_set_boundary_infinity(type, x, info);
  }
  else {
    r = assign_r(x, MINUS_INFINITY, round_dir_check(type));
    PPL_ASSERT(result_representable(r));
  }
  if (open || result_relation(r) != VR_EQ)
    info.set_boundary_property(type, OPEN);
  return r;
}
template<typename T , typename Info >
Result Parma_Polyhedra_Library::Boundary_NS::set_plus_infinity ( Boundary_Type  type,
T &  x,
Info &  info,
bool  open = false 
)
inline

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

References Parma_Polyhedra_Library::assign_r(), OPEN, Parma_Polyhedra_Library::PLUS_INFINITY, PPL_ASSERT, Parma_Polyhedra_Library::result_relation(), Parma_Polyhedra_Library::result_representable(), round_dir_check(), special_set_boundary_infinity(), UPPER, and Parma_Polyhedra_Library::VR_EQ.

Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::assign(), complement(), Parma_Polyhedra_Library::Interval< Boundary, Info >::Interval(), Parma_Polyhedra_Library::operator>>(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::set_infinities().

                                                                           {
  /*
  PPL_COMPILE_TIME_CHECK(Info::store_special
                         || std::numeric_limits<T>::has_infinity,
                         "minus infinity is not representable");
  */
  if (open) {
    PPL_ASSERT(type == UPPER);
  }
  else {
    PPL_ASSERT(Info::may_contain_infinity);
  }
  Result r;
  if (Info::store_special) {
    PPL_ASSERT(type == UPPER);
    r = special_set_boundary_infinity(type, x, info);
  }
  else {
    r = assign_r(x, PLUS_INFINITY, round_dir_check(type));
    PPL_ASSERT(result_representable(r));
  }
  if (open || result_relation(r) != VR_EQ)
    info.set_boundary_property(type, OPEN);
  return r;
}
template<typename To , typename To_Info >
Result Parma_Polyhedra_Library::Boundary_NS::set_zero ( Boundary_Type  to_type,
To &  to,
To_Info &  to_info,
bool  should_shrink 
)
inline

Definition at line 628 of file Boundary.defs.hh.

References adjust_boundary(), Parma_Polyhedra_Library::assign_r(), and round_dir_check().

Referenced by div_assign(), div_assign_z(), and mul_assign_z().

                                                                              {
  bool check = (To_Info::check_inexact || (!should_shrink && To_Info::store_open));
  Result r = assign_r(to, Constant<0>::value, round_dir_check(to_type, check));
  return adjust_boundary(to_type, to, to_info, should_shrink, r);
}
template<typename T , typename Info >
int Parma_Polyhedra_Library::Boundary_NS::sgn ( Boundary_Type  type,
const T &  x,
const Info &  info 
)
inline

Definition at line 317 of file Boundary.defs.hh.

References LOWER, OPEN, and sgn_b().

Referenced by Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::affine_image(), Parma_Polyhedra_Library::Checked::assign_float_mpq(), Parma_Polyhedra_Library::Checked::assign_float_mpz(), Parma_Polyhedra_Library::Checked::assign_signed_int_mpz(), Parma_Polyhedra_Library::Checked::assign_unsigned_int_mpz(), Parma_Polyhedra_Library::Polyhedron::BHRZ03_evolving_rays(), Parma_Polyhedra_Library::Octagonal_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::bounded_affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_preimage(), Parma_Polyhedra_Library::Box< ITV >::bounds(), Parma_Polyhedra_Library::Box< ITV >::Box(), Parma_Polyhedra_Library::Checked::classify_mpq(), Parma_Polyhedra_Library::Linear_Row::compare(), Parma_Polyhedra_Library::Polyhedron::constrains(), Parma_Polyhedra_Library::Grid::constrains(), Parma_Polyhedra_Library::Polyhedron::conversion(), Parma_Polyhedra_Library::Checked::div_mpq(), Parma_Polyhedra_Library::Checked::div_mpz(), Parma_Polyhedra_Library::Polyhedron::drop_some_non_integer_points(), Parma_Polyhedra_Library::Polyhedron::frequency(), Parma_Polyhedra_Library::Grid::frequency_no_check(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::Box< ITV >::generalized_affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Polyhedron::generalized_affine_preimage(), Parma_Polyhedra_Library::MIP_Problem::get_exiting_base_index(), Parma_Polyhedra_Library::Scalar_Products::homogeneous_sign(), Parma_Polyhedra_Library::Checked::idiv_mpq(), Parma_Polyhedra_Library::Checked::idiv_mpz(), Parma_Polyhedra_Library::BD_Shape< T >::incremental_shortest_path_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::incremental_strong_closure_assign(), Parma_Polyhedra_Library::interval_relation(), Parma_Polyhedra_Library::Checked::is_int_mpq(), Parma_Polyhedra_Library::Checked::is_minf_mpq(), Parma_Polyhedra_Library::Checked::is_nan_mpq(), Parma_Polyhedra_Library::Checked::is_pinf_mpq(), Parma_Polyhedra_Library::Constraint::is_tautological(), Parma_Polyhedra_Library::DB_Matrix< T >::l_m_distance_assign(), Parma_Polyhedra_Library::Generator::l_m_distance_assign(), Parma_Polyhedra_Library::OR_Matrix< T >::l_m_distance_assign(), Parma_Polyhedra_Library::Box< ITV >::l_m_distance_assign(), Parma_Polyhedra_Library::BD_Shape< T >::max_min(), Parma_Polyhedra_Library::Box< ITV >::max_min(), Parma_Polyhedra_Library::Octagonal_Shape< T >::max_min(), Parma_Polyhedra_Library::Polyhedron::max_min(), Parma_Polyhedra_Library::Dense_Row::normalize(), Parma_Polyhedra_Library::Sparse_Row::normalize(), Parma_Polyhedra_Library::BD_Shape< T >::operator<<(), Parma_Polyhedra_Library::Octagonal_Shape< T >::operator<<(), Parma_Polyhedra_Library::MIP_Problem::parse_constraints(), Parma_Polyhedra_Library::Box< ITV >::propagate_constraint_no_check(), Parma_Polyhedra_Library::Scalar_Products::reduced_sign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine(), Parma_Polyhedra_Library::BD_Shape< T >::refine(), Parma_Polyhedra_Library::Box< ITV >::relation_with(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), Parma_Polyhedra_Library::BD_Shape< T >::relation_with(), Parma_Polyhedra_Library::Checked::rem_mpq(), Parma_Polyhedra_Library::Checked::rem_mpz(), sgn_b(), Parma_Polyhedra_Library::Checked::sgn_mp(), Parma_Polyhedra_Library::BD_Shape< T >::shortest_path_closure_assign(), Parma_Polyhedra_Library::Scalar_Products::sign(), Parma_Polyhedra_Library::MIP_Problem::steepest_edge_exact_entering_index(), Parma_Polyhedra_Library::MIP_Problem::steepest_edge_float_entering_index(), Parma_Polyhedra_Library::Octagonal_Shape< T >::strong_closure_assign(), and Parma_Polyhedra_Library::MIP_Problem::textbook_entering_index().

                                                      {
  int sign = sgn_b(type, x, info);
  if (x == 0 && info.get_boundary_property(type, OPEN))
    return (type == LOWER) ? -1 : 1;
  else
    return sign;
}
template<typename T , typename Info >
int Parma_Polyhedra_Library::Boundary_NS::sgn_b ( Boundary_Type  type,
const T &  x,
const Info &  info 
)
inline

Definition at line 306 of file Boundary.defs.hh.

References LOWER, sgn(), and SPECIAL.

Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::div_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::mul_assign(), Parma_Polyhedra_Library::MIP_Problem::parse_constraints(), and sgn().

                                                        {
  if (info.get_boundary_property(type, SPECIAL))
    return (type == LOWER) ? -1 : 1;
  else
    // The following Parma_Polyhedra_Library:: qualification is to work
    // around a bug of GCC 4.0.x.
    return Parma_Polyhedra_Library::sgn(x);
}
template<typename To , typename To_Info , typename T , typename Info >
Result Parma_Polyhedra_Library::Boundary_NS::smod_2exp_assign ( Boundary_Type  to_type,
To &  to,
To_Info &  to_info,
Boundary_Type  type,
const T &  x,
const Info &  info,
unsigned int  exp 
)
inline

Definition at line 719 of file Boundary.defs.hh.

References adjust_boundary(), boundary_infinity_is_open(), is_boundary_infinity(), normal_is_open(), PPL_ASSERT, round_dir_check(), and set_boundary_infinity().

Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::wrap_assign().

                                   {
  PPL_ASSERT(to_type == type);
  bool should_shrink;
  if (is_boundary_infinity(type, x, info)) {
    should_shrink = boundary_infinity_is_open(type, info);
    return set_boundary_infinity(to_type, to, to_info, should_shrink);
  }
  should_shrink = normal_is_open(type, x, info);
  bool check = (To_Info::check_inexact || (!should_shrink && To_Info::store_open));
  Result r = smod_2exp_assign_r(to, x, exp, round_dir_check(to_type, check));
  return adjust_boundary(to_type, to, to_info, should_shrink, r);
}
template<typename T , typename Info >
bool Parma_Polyhedra_Library::Boundary_NS::special_is_open ( Boundary_Type  ,
const T &  ,
const Info &   
)
inline

Definition at line 73 of file Boundary.defs.hh.

Referenced by assign(), complement(), and neg_assign().

                                                      {
  return !Info::may_contain_infinity;
}
template<typename T , typename Info >
Result Parma_Polyhedra_Library::Boundary_NS::special_set_boundary_infinity ( Boundary_Type  type,
T &  ,
Info &  info 
)
inline

Definition at line 65 of file Boundary.defs.hh.

References PPL_ASSERT, SPECIAL, and Parma_Polyhedra_Library::V_EQ.

Referenced by adjust_boundary(), set_boundary_infinity(), set_minus_infinity(), set_plus_infinity(), and set_unbounded().

                                                                  {
  PPL_ASSERT(Info::store_special);
  info.set_boundary_property(type, SPECIAL);
  return V_EQ;
}
template<typename To , typename To_Info , typename T1 , typename Info1 , typename T2 , typename Info2 >
Result Parma_Polyhedra_Library::Boundary_NS::sub_assign ( Boundary_Type  to_type,
To &  to,
To_Info &  to_info,
Boundary_Type  type1,
const T1 &  x1,
const Info1 &  info1,
Boundary_Type  type2,
const T2 &  x2,
const Info2 &  info2 
)
inline

Definition at line 578 of file Boundary.defs.hh.

References adjust_boundary(), boundary_infinity_is_open(), is_boundary_infinity(), is_boundary_infinity_closed(), normal_is_open(), PPL_ASSERT, round_dir_check(), and set_boundary_infinity().

Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::operator-=(), Parma_Polyhedra_Library::Interval< Boundary, Info >::sub_assign(), and Parma_Polyhedra_Library::PIP_Solution_Node::update_tableau().

                                                                  {
  PPL_ASSERT(type1 != type2);
  bool should_shrink;
  if (is_boundary_infinity(type1, x1, info1)) {
    should_shrink = (boundary_infinity_is_open(type1, info1)
                     && !is_boundary_infinity_closed(type2, x2, info2));
    return set_boundary_infinity(to_type, to, to_info, should_shrink);
  }
  else if (is_boundary_infinity(type2, x2, info2)) {
    should_shrink = (boundary_infinity_is_open(type2, info2)
                     && !is_boundary_infinity_closed(type1, x1, info1));
    return set_boundary_infinity(to_type, to, to_info, should_shrink);
  }
  should_shrink = (normal_is_open(type1, x1, info1)
                   || normal_is_open(type2, x2, info2));
  bool check = (To_Info::check_inexact || (!should_shrink && To_Info::store_open));
  // FIXME: extended handling is not needed
  Result r = sub_assign_r(to, x1, x2, round_dir_check(to_type, check));
  return adjust_boundary(to_type, to, to_info, should_shrink, r);
}
template<typename To , typename To_Info , typename T , typename Info >
Result Parma_Polyhedra_Library::Boundary_NS::umod_2exp_assign ( Boundary_Type  to_type,
To &  to,
To_Info &  to_info,
Boundary_Type  type,
const T &  x,
const Info &  info,
unsigned int  exp 
)
inline

Definition at line 702 of file Boundary.defs.hh.

References adjust_boundary(), boundary_infinity_is_open(), is_boundary_infinity(), normal_is_open(), PPL_ASSERT, round_dir_check(), and set_boundary_infinity().

Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::wrap_assign().

                                   {
  PPL_ASSERT(to_type == type);
  bool should_shrink;
  if (is_boundary_infinity(type, x, info)) {
    should_shrink = boundary_infinity_is_open(type, info);
    return set_boundary_infinity(to_type, to, to_info, should_shrink);
  }
  should_shrink = normal_is_open(type, x, info);
  bool check = (To_Info::check_inexact || (!should_shrink && To_Info::store_open));
  Result r = umod_2exp_assign_r(to, x, exp, round_dir_check(to_type, check));
  return adjust_boundary(to_type, to, to_info, should_shrink, r);
}

Variable Documentation