PPL  1.2
Parma_Polyhedra_Library Namespace Reference

The entire library is confined to this namespace. More...

Namespaces

 Boundary_NS
 
 Checked
 Types and functions implementing checked numbers.
 
 Implementation
 Implementation related data and functions.
 
 Interfaces
 Data and functions related to language interfaces.
 
 Interval_NS
 
 IO_Operators
 All input/output operators are confined to this namespace.
 

Classes

class  Affine_Space
 An affine space. More...
 
class  Any_Pointset
 Any PPL pointset. More...
 
class  Approximable_Reference
 A concrete expression representing a reference to some approximable. More...
 
class  Approximable_Reference_Common
 Base class for references to some approximable. More...
 
class  Ask_Tell
 The ask and tell construction on a base-level domain. More...
 
class  Ask_Tell_Pair
 A pair of ask and tell descriptions. More...
 
class  BD_Shape
 A bounded difference shape. More...
 
class  BD_Shape_Helpers
 
class  BHRZ03_Certificate
 The convergence certificate for the BHRZ03 widening operator. More...
 
class  Binary_Operator
 A binary operator applied to two concrete expressions. More...
 
class  Binary_Operator_Common
 Base class for binary operator applied to two concrete expressions. More...
 
class  Bit_Matrix
 A matrix of bits. More...
 
class  Bit_Row
 A row in a matrix of bits. More...
 
struct  Bool
 A class holding a constant called value that evaluates to b. More...
 
class  Box
 A not necessarily closed, iso-oriented hyperrectangle. More...
 
class  Box_Helpers
 
struct  C_Integer
 
struct  C_Integer< char >
 
struct  C_Integer< signed char >
 
struct  C_Integer< signed int >
 
struct  C_Integer< signed long >
 
struct  C_Integer< signed long long >
 
struct  C_Integer< signed short >
 
struct  C_Integer< unsigned char >
 
struct  C_Integer< unsigned int >
 
struct  C_Integer< unsigned long >
 
struct  C_Integer< unsigned long long >
 
struct  C_Integer< unsigned short >
 
class  C_Polyhedron
 A closed convex polyhedron. More...
 
class  c_streambuf
 
class  Cast_Floating_Point_Expression
 A generic Cast Floating Point Expression. More...
 
class  Cast_Operator
 A cast operator converting one concrete expression to some type. More...
 
class  Cast_Operator_Common
 Base class for cast operator concrete expressions. More...
 
struct  Check_Overflow_Policy
 A policy checking for overflows. More...
 
class  Checked_Number
 A wrapper for numeric types implementing a given policy. More...
 
struct  Checked_Number_Transparent_Policy
 
class  CO_Tree
 A cache-oblivious binary search tree of pairs. More...
 
struct  Coefficient_traits_template
 Coefficient traits. More...
 
struct  Coefficient_traits_template< GMP_Integer >
 Coefficient traits specialization for unbounded integers. More...
 
struct  Compile_Time_Check
 A class that is only defined if b evaluates to true. More...
 
struct  Compile_Time_Check< true >
 A class that is only defined if b evaluates to true. More...
 
class  Concrete_Expression
 The base class of all concrete expressions. More...
 
class  Concrete_Expression_Common
 Base class for all concrete expressions. More...
 
class  Concrete_Expression_Type
 The type of a concrete expression. More...
 
class  Congruence
 A linear congruence. More...
 
class  Congruence_System
 A system of congruences. More...
 
class  Congruences_Reduction
 This class provides the reduction method for the Congruences_Product domain. More...
 
class  const_iterator_to_const
 A const_iterator on a sequence of read-only objects. More...
 
struct  Constant
 
struct  Constant_
 
class  Constant_Floating_Point_Expression
 A generic Constant Floating Point Expression. More...
 
class  Constraint
 A linear equality or inequality. More...
 
class  Constraint_System
 A system of constraints. More...
 
class  Constraint_System_const_iterator
 An iterator over a system of constraints. More...
 
class  Constraints_Reduction
 This class provides the reduction method for the Constraints_Product domain. More...
 
class  DB_Matrix
 The base class for the square matrices. More...
 
class  DB_Row
 The base class for the single rows of matrices. More...
 
class  DB_Row_Impl_Handler
 The handler of the actual DB_Row implementation. More...
 
struct  Debug_WRD_Extended_Number_Policy
 
class  Dense_Row
 A finite sequence of coefficients. More...
 
class  Determinate
 A wrapper for PPL pointsets, providing them with a determinate constraint system interface, as defined in [Bag98]. More...
 
class  Difference_Floating_Point_Expression
 A generic Difference Floating Point Expression. More...
 
class  Dirty_Temp
 A structure for the efficient handling of temporaries. More...
 
class  Dirty_Temp< T, typename Enable_If< Slow_Copy< T >::value >::type >
 Specialization for the handling of temporaries with a free list. More...
 
class  Dirty_Temp< T, typename Enable_If<!Slow_Copy< T >::value >::type >
 Specialization for the handling of temporaries with local variables. More...
 
class  Division_Floating_Point_Expression
 A generic Division Floating Point Expression. More...
 
class  Domain_Product
 This class is temporary and will be removed when template typedefs will be supported in C++. More...
 
struct  Enable_If
 A class that provides a type member called type equivalent to T if and only if b is true. More...
 
struct  Enable_If< true, T >
 A class that provides a type member called type equivalent to T if and only if b is true. More...
 
struct  Enable_If_Is
 
struct  Euclidean_Distance_Specialization
 
class  Expression_Adapter
 An adapter for Linear_Expression objects. More...
 
class  Expression_Adapter_Base
 Adapters' base type (for template meta-programming). More...
 
class  Expression_Adapter_Transparent
 A transparent adapter for Linear_Expression objects. More...
 
class  Expression_Hide_Inhomo
 An adapter for Linear_Expression that hides the inhomogeneous term. More...
 
class  Expression_Hide_Last
 An adapter for Linear_Expression that maybe hides the last coefficient. More...
 
struct  Extended_Number_Policy
 
struct  False
 A class holding a constant called value that evaluates to false. More...
 
struct  Fit
 
struct  Fit< T, v, typename Enable_If< C_Integer< T >::value >::type >
 
class  Float
 
struct  float_ibm_double
 
struct  float_ibm_single
 
struct  float_ieee754_double
 
struct  float_ieee754_half
 
struct  float_ieee754_quad
 
struct  float_ieee754_single
 
struct  float_intel_double_extended
 
class  Floating_Point_Constant
 A floating-point constant concrete expression. More...
 
class  Floating_Point_Constant_Common
 Base class for floating-point constant concrete expression. More...
 
class  Floating_Point_Expression
 
class  FP_Oracle
 An abstract class to be implemented by an external analyzer such as ECLAIR in order to provide to the PPL the necessary information for performing the analysis of floating point computations. More...
 
struct  FPU_Related
 
struct  FPU_Related< Checked_Number< T, Policy > >
 
struct  FPU_Related< double >
 
struct  FPU_Related< float >
 
struct  FPU_Related< long double >
 
class  Generator
 A line, ray, point or closure point. More...
 
class  Generator_System
 A system of generators. More...
 
class  Generator_System_const_iterator
 An iterator over a system of generators. More...
 
class  GMP_Integer
 Unbounded integers as provided by the GMP library. More...
 
class  Grid
 A grid. More...
 
class  Grid_Certificate
 The convergence certificate for the Grid widening operator. More...
 
class  Grid_Generator
 A grid line, parameter or grid point. More...
 
class  Grid_Generator_System
 A system of grid generators. More...
 
class  H79_Certificate
 A convergence certificate for the H79 widening operator. More...
 
struct  Has_Assign_Or_Swap
 
struct  Has_Assign_Or_Swap< T, typename Enable_If_Is< void(T::*)(T &x), &T::assign_or_swap >::type >
 
struct  Has_OK
 
struct  Has_OK< T, typename Enable_If_Is< bool(T::*)() const,&T::OK >::type >
 
class  I_Constraint
 
class  I_Constraint_Base
 
class  I_Constraint_Common
 
struct  I_Constraint_Rel
 
struct  ia32_fenv_t
 
class  In_Assert
 
class  Init
 Class for initialization and finalization. More...
 
class  Integer_Constant
 An integer constant concrete expression. More...
 
class  Integer_Constant_Common
 Base class for integer constant concrete expressions. More...
 
struct  Integer_Interval_Info_Policy
 
class  Interval
 A generic, not necessarily closed, possibly restricted interval. More...
 
struct  Interval_Base
 
class  Interval_Info_Bitset
 
class  Interval_Info_Null
 
class  Interval_Info_Null_Open
 
struct  Is_Checked
 
struct  Is_Checked< Checked_Number< T, P > >
 
struct  Is_Interval
 
struct  Is_Native
 
struct  Is_Native< char >
 
struct  Is_Native< mpq_class >
 
struct  Is_Native< mpz_class >
 
struct  Is_Native< signed char >
 
struct  Is_Native< signed int >
 
struct  Is_Native< signed long >
 
struct  Is_Native< signed long long >
 
struct  Is_Native< signed short >
 
struct  Is_Native< unsigned char >
 
struct  Is_Native< unsigned int >
 
struct  Is_Native< unsigned long >
 
struct  Is_Native< unsigned long long >
 
struct  Is_Native< unsigned short >
 
struct  Is_Native_Or_Checked
 
struct  Is_Same
 A class holding a constant called value that evaluates to true if and only if T1 is the same type as T2. More...
 
struct  Is_Same< T, T >
 A class holding a constant called value that evaluates to true if and only if T1 is the same type as T2. More...
 
struct  Is_Same_Or_Derived
 A class holding a constant called value that evaluates to true if and only if Base is the same type as Derived or Derived is a class derived from Base. More...
 
struct  Is_Singleton
 
struct  Is_Special
 
struct  Is_Special< Minus_Infinity >
 
struct  Is_Special< Not_A_Number >
 
struct  Is_Special< Plus_Infinity >
 
class  iterator_to_const
 An iterator on a sequence of read-only objects. More...
 
struct  L_Infinity_Distance_Specialization
 
class  Limited_Widening_Function
 Wraps a limited widening method into a function object. More...
 
class  Linear_Expression
 A linear expression. More...
 
class  Linear_Expression_Impl
 A linear expression. More...
 
class  Linear_Expression_Interface
 A linear expression. More...
 
class  Linear_Form
 A linear form with interval coefficients. More...
 
class  Linear_System
 The base class for systems of constraints and generators. More...
 
class  Linear_System_With_Bit_Matrix_iterator
 
class  Matrix
 A sparse matrix of Coefficient. More...
 
struct  maybe_assign_struct
 
struct  maybe_assign_struct< Type, Type >
 
struct  Minus_Infinity
 
class  MIP_Problem
 A Mixed Integer (linear) Programming problem. More...
 
class  Multiplication_Floating_Point_Expression
 A generic Multiplication Floating Point Expression. More...
 
struct  Native_Checked_From_Wrapper
 
struct  Native_Checked_From_Wrapper< Checked_Number< T, P > >
 
struct  Native_Checked_From_Wrapper< T, typename Enable_If< Is_Native< T >::value >::type >
 
struct  Native_Checked_To_Wrapper
 
struct  Native_Checked_To_Wrapper< Checked_Number< T, P > >
 
struct  Native_Checked_To_Wrapper< T, typename Enable_If< Is_Native< T >::value >::type >
 
class  NNC_Polyhedron
 A not necessarily closed convex polyhedron. More...
 
class  No_Reduction
 This class provides the reduction method for the Direct_Product domain. More...
 
struct  Not_A_Number
 
class  Numeric_Format
 
class  Octagonal_Shape
 An octagonal shape. More...
 
class  Octagonal_Shape_Helper
 
class  Opposite_Floating_Point_Expression
 A generic Opposite Floating Point Expression. More...
 
class  OR_Matrix
 A matrix representing octagonal constraints. More...
 
class  Partial_Function
 
class  Partially_Reduced_Product
 The partially reduced product of two abstractions. More...
 
class  PIP_Decision_Node
 A tree node representing a decision in the space of solutions. More...
 
class  PIP_Problem
 A Parametric Integer (linear) Programming problem. More...
 
class  PIP_Solution_Node
 A tree node representing part of the space of solutions. More...
 
class  PIP_Tree_Node
 A node of the PIP solution tree. More...
 
struct  Plus_Infinity
 
class  Pointset_Ask_Tell
 The ask-and-tell construction instantiated on PPL polyhedra. More...
 
class  Pointset_Powerset
 The powerset construction instantiated on PPL pointset domains. More...
 
class  Poly_Con_Relation
 The relation between a polyhedron and a constraint. More...
 
class  Poly_Gen_Relation
 The relation between a polyhedron and a generator. More...
 
class  Polyhedron
 The base class for convex polyhedra. More...
 
class  Powerset
 The powerset construction on a base-level domain. More...
 
struct  Rational_Interval_Info_Policy
 
struct  Rectilinear_Distance_Specialization
 
struct  Recycle_Input
 A tag class. More...
 
class  Scalar_Products
 A class implementing various scalar product functions. More...
 
struct  Select_Temp_Boundary_Type
 Helper class to select the appropriate numerical type to perform boundary computations so as to reduce the chances of overflow without incurring too much overhead. More...
 
struct  Select_Temp_Boundary_Type< char >
 
struct  Select_Temp_Boundary_Type< signed char >
 
struct  Select_Temp_Boundary_Type< signed int >
 
struct  Select_Temp_Boundary_Type< signed long >
 
struct  Select_Temp_Boundary_Type< signed short >
 
struct  Select_Temp_Boundary_Type< unsigned char >
 
struct  Select_Temp_Boundary_Type< unsigned int >
 
struct  Select_Temp_Boundary_Type< unsigned long >
 
struct  Select_Temp_Boundary_Type< unsigned long long >
 
struct  Select_Temp_Boundary_Type< unsigned short >
 
class  Shape_Preserving_Reduction
 This class provides the reduction method for the Shape_Preserving_Product domain. More...
 
struct  Slow_Copy
 
struct  Slow_Copy< Checked_Number< T, P > >
 
struct  Slow_Copy< mpq_class >
 
struct  Slow_Copy< mpz_class >
 
class  Smash_Reduction
 This class provides the reduction method for the Smash_Product domain. More...
 
class  Sparse_Row
 A finite sparse sequence of coefficients. More...
 
class  stdiobuf
 
class  Sum_Floating_Point_Expression
 A generic Sum Floating Point Expression. More...
 
struct  Suppress_Uninitialized_Warnings_Type
 
class  Swapping_Vector
 
struct  TConstant
 
class  Temp_Item
 A pool of temporary items of type T. More...
 
class  Temp_Reference_Holder
 An holder for a reference to a temporary object. More...
 
class  Temp_Value_Holder
 An (fake) holder for the value of a temporary object. More...
 
class  Termination_Helpers
 
class  Threshold_Watcher
 A class of watchdogs controlling the exceeding of a threshold. More...
 
class  Throwable
 User objects the PPL can throw. More...
 
class  Topology_Adjusted_Scalar_Product_Sign
 Scalar product sign function object depending on topology. More...
 
struct  True
 A class holding a constant called value that evaluates to true. More...
 
class  Unary_Operator
 A unary operator applied to one concrete expression. More...
 
class  Unary_Operator_Common
 Base class for unary operator applied to one concrete expression. More...
 
struct  Use_By_Ref
 
struct  Use_By_Ref< By_Ref, T >
 
struct  Use_By_Ref< By_Value, T >
 
struct  Use_By_Ref< Use_Slow_Copy, T >
 
class  Val_Or_Ref
 
class  Val_Or_Ref< T, Criteria, typename Enable_If< Use_By_Ref< Criteria, T >::value >::type >
 
class  Val_Or_Ref< T, Criteria, typename Enable_If<!Use_By_Ref< Criteria, T >::value >::type >
 
class  Variable
 A dimension of the vector space. More...
 
class  Variable_Floating_Point_Expression
 A generic Variable Floating Point Expression. More...
 
class  Variables_Set
 An std::set of variables' indexes. More...
 
class  Watchdog
 A watchdog timer. More...
 
struct  Watchdog_Traits
 
class  Weight_Profiler
 
struct  Weightwatch_Traits
 Traits class for the deterministic timeout mechanism. More...
 
class  Widening_Function
 Wraps a widening method into a function object. More...
 
struct  WRD_Extended_Number_Policy
 

Typedefs

typedef PPL_COEFFICIENT_TYPE Coefficient
 An alias for easily naming the type of PPL coefficients. More...
 
typedef Coefficient_traits_template< CoefficientCoefficient_traits
 An alias for easily naming the coefficient traits. More...
 
typedef int Concrete_Expression_Kind
 Encodes the kind of concrete expression. More...
 
typedef int Concrete_Expression_BOP
 Encodes a binary operator of concrete expressions. More...
 
typedef int Concrete_Expression_UOP
 Encodes a unary operator of concrete expressions. More...
 
typedef size_t dimension_type
 An unsigned integral type for representing space dimensions. More...
 
typedef size_t memory_size_type
 An unsigned integral type for representing memory size in bytes. More...
 
typedef mpz_class GMP_Integer
 
typedef Interval_Info_Bitset< unsigned int, Integer_Interval_Info_PolicyInteger_Interval_Info
 
typedef Interval< mpz_class, Integer_Interval_InfoInteger_Interval
 An interval with integral, necessarily closed boundaries. More...
 
typedef const PIP_Tree_NodePIP_Tree
 
typedef Box< Rational_IntervalRational_Box
 A box with rational, possibly open boundaries. More...
 
typedef Interval_Info_Bitset< unsigned int, Rational_Interval_Info_PolicyRational_Interval_Info
 
typedef Interval< mpq_class, Rational_Interval_InfoRational_Interval
 An interval with rational, possibly open boundaries. More...
 

Enumerations

enum  fpu_rounding_direction_type
 
enum  fpu_rounding_control_word_type
 
enum  Degenerate_Element { UNIVERSE, EMPTY }
 Kinds of degenerate abstract elements. More...
 
enum  Relation_Symbol {
  EQUAL, LESS_THAN, LESS_OR_EQUAL, GREATER_THAN,
  GREATER_OR_EQUAL, NOT_EQUAL
}
 Relation symbols. More...
 
enum  Complexity_Class { POLYNOMIAL_COMPLEXITY, SIMPLEX_COMPLEXITY, ANY_COMPLEXITY }
 Complexity pseudo-classes. More...
 
enum  Optimization_Mode { MINIMIZATION, MAXIMIZATION }
 Possible optimization modes. More...
 
enum  Bounded_Integer_Type_Width {
  BITS_8, BITS_16, BITS_32, BITS_64,
  BITS_128
}
 
enum  Bounded_Integer_Type_Representation { UNSIGNED, SIGNED_2_COMPLEMENT }
 
enum  Bounded_Integer_Type_Overflow { OVERFLOW_WRAPS, OVERFLOW_UNDEFINED, OVERFLOW_IMPOSSIBLE }
 
enum  Representation { DENSE, SPARSE }
 
enum  Floating_Point_Format {
  IEEE754_HALF, IEEE754_SINGLE, IEEE754_DOUBLE, IEEE754_QUAD,
  INTEL_DOUBLE_EXTENDED, IBM_SINGLE, IBM_DOUBLE
}
 
enum  Ternary { T_YES, T_NO, T_MAYBE }
 
enum  I_Result {
  I_EMPTY, I_SINGLETON, I_SOME, I_UNIVERSE,
  I_NOT_EMPTY, I_ANY, I_NOT_UNIVERSE, I_NOT_DEGENERATE,
  I_EXACT, I_INEXACT, I_CHANGED, I_UNCHANGED,
  I_SINGULARITIES
}
 The result of an operation on intervals. More...
 
enum  MIP_Problem_Status { UNFEASIBLE_MIP_PROBLEM, UNBOUNDED_MIP_PROBLEM, OPTIMIZED_MIP_PROBLEM }
 Possible outcomes of the MIP_Problem solver. More...
 
enum  PIP_Problem_Status { UNFEASIBLE_PIP_PROBLEM, OPTIMIZED_PIP_PROBLEM }
 Possible outcomes of the PIP_Problem solver. More...
 
enum  Result_Class {
  VC_NORMAL, VC_MINUS_INFINITY, VC_PLUS_INFINITY, VC_NAN,
  VC_MASK = VC_NAN
}
 
enum  Result_Relation {
  VR_EMPTY, VR_EQ, VR_LT, VR_GT,
  VR_NE, VR_LE, VR_GE, VR_LGE,
  VR_MASK = VR_LGE
}
 
enum  Result {
  V_EMPTY, V_EQ, V_LT, V_GT,
  V_NE, V_LE, V_GE, V_LGE,
  V_OVERFLOW, V_LT_INF, V_GT_SUP, V_LT_PLUS_INFINITY,
  V_GT_MINUS_INFINITY, V_EQ_MINUS_INFINITY, V_EQ_PLUS_INFINITY, V_NAN,
  V_CVT_STR_UNK, V_DIV_ZERO, V_INF_ADD_INF, V_INF_DIV_INF,
  V_INF_MOD, V_INF_MUL_ZERO, V_INF_SUB_INF, V_MOD_ZERO,
  V_SQRT_NEG, V_UNKNOWN_NEG_OVERFLOW, V_UNKNOWN_POS_OVERFLOW, V_UNREPRESENTABLE
}
 Possible outcomes of a checked arithmetic computation. More...
 
enum  Rounding_Dir {
  ROUND_DOWN, ROUND_UP, ROUND_IGNORE, ROUND_NATIVE = ROUND_IGNORE,
  ROUND_NOT_NEEDED, ROUND_DIRECT = ROUND_UP, ROUND_INVERSE = ROUND_DOWN, ROUND_DIR_MASK = 7U,
  ROUND_STRICT_RELATION, ROUND_CHECK = ROUND_DIRECT | ROUND_STRICT_RELATION
}
 Rounding directions for arithmetic computations. More...
 
enum  Topology { NECESSARILY_CLOSED = 0, NOT_NECESSARILY_CLOSED = 1 }
 Kinds of polyhedra domains. More...
 

Functions

template<typename T >
Enable_If< Has_Assign_Or_Swap< T >::value, void >::type assign_or_swap (T &to, T &from)
 
template<typename T >
Enable_If<!Has_Assign_Or_Swap< T >::value &&!Slow_Copy< T >::value, void >::type assign_or_swap (T &to, T &from)
 
template<typename T >
Enable_If<!Has_Assign_Or_Swap< T >::value &&Slow_Copy< T >::value, void >::type assign_or_swap (T &to, T &from)
 
template<typename ITV >
Poly_Con_Relation interval_relation (const ITV &i, const Constraint::Type constraint_type, Coefficient_traits::const_reference numer, Coefficient_traits::const_reference denom=Coefficient_one())
 Returns the relations holding between an interval and an interval constraint. More...
 
template<typename ITV >
bool operator!= (const Box< ITV > &x, const Box< ITV > &y)
 
template<typename ITV >
bool operator== (const Box< ITV > &x, const Box< ITV > &y)
 
unsigned irrational_precision ()
 Returns the precision parameter used for irrational calculations. More...
 
void set_irrational_precision (const unsigned p)
 Sets the precision parameter used for irrational calculations. More...
 
void throw_result_exception (Result r)
 
template<typename T >
plus_infinity ()
 
template<typename T >
minus_infinity ()
 
template<typename T >
not_a_number ()
 
template<typename T >
void maybe_reset_fpu_inexact ()
 
template<typename T >
int maybe_check_fpu_inexact ()
 
Rounding_Dir rounding_dir (Rounding_Dir dir)
 
Result check_result (Result r, Rounding_Dir dir)
 
template<typename To , typename From >
Enable_If< Is_Native_Or_Checked< To >::value &&Is_Special< From >::value, Result >::type assign_r (To &to, const From &, Rounding_Dir dir)
 
template<typename To , typename From >
Enable_If< Is_Native_Or_Checked< To >::value &&Is_Special< From >::value, Result >::type construct (To &to, const From &, Rounding_Dir dir)
 
template<typename T >
Enable_If< Is_Native_Or_Checked< T >::value, bool >::type is_minus_infinity (const T &x)
 
template<typename T >
Enable_If< Is_Native_Or_Checked< T >::value, bool >::type is_plus_infinity (const T &x)
 
template<typename T >
Enable_If< Is_Native_Or_Checked< T >::value, int >::type infinity_sign (const T &x)
 
template<typename T >
Enable_If< Is_Native_Or_Checked< T >::value, bool >::type is_not_a_number (const T &x)
 
template<typename T >
Enable_If< Is_Native_Or_Checked< T >::value, bool >::type is_integer (const T &x)
 
template<typename T , typename Policy >
bool is_not_a_number (const Checked_Number< T, Policy > &x)
 
template<typename T , typename Policy >
bool is_minus_infinity (const Checked_Number< T, Policy > &x)
 
template<typename T , typename Policy >
bool is_plus_infinity (const Checked_Number< T, Policy > &x)
 
template<typename T , typename Policy >
void exact_div_assign (Checked_Number< T, Policy > &x, const Checked_Number< T, Policy > &y, const Checked_Number< T, Policy > &z)
 
template<typename T >
Enable_If< Is_Native_Or_Checked< T >::value, void >::type ascii_dump (std::ostream &s, const T &t)
 
template<typename T >
Enable_If< Is_Native_Or_Checked< T >::value, bool >::type ascii_load (std::istream &s, T &t)
 
void swap (CO_Tree &x, CO_Tree &y)
 
void swap (CO_Tree::const_iterator &x, CO_Tree::const_iterator &y)
 
void swap (CO_Tree::iterator &x, CO_Tree::iterator &y)
 
void Coefficient_constants_initialize ()
 Initializes the Coefficient constants. More...
 
void Coefficient_constants_finalize ()
 Finalizes the Coefficient constants. More...
 
Coefficient_traits::const_reference Coefficient_zero ()
 Returns a const reference to a Coefficient with value 0. More...
 
Coefficient_traits::const_reference Coefficient_one ()
 Returns a const reference to a Coefficient with value 1. More...
 
template<typename T >
void PPL_CC_FLUSH (const T &x)
 No-op function that force the compiler to store the argument and to reread it from memory if needed (thus preventing CSE). More...
 
unsigned int clz32 (uint32_t w)
 
unsigned int clz64 (uint64_t w)
 
unsigned int ctz32 (uint32_t w)
 
unsigned int ctz64 (uint64_t w)
 
unsigned int clz (unsigned int u)
 
unsigned int clz (unsigned long ul)
 
unsigned int clz (unsigned long long ull)
 
unsigned int ctz (unsigned int u)
 
unsigned int ctz (unsigned long ul)
 
unsigned int ctz (unsigned long long ull)
 
bool operator== (const Constraint_System &x, const Constraint_System &y)
 
bool operator!= (const Constraint_System &x, const Constraint_System &y)
 
void linear_combine (Dense_Row &x, const Dense_Row &y, Coefficient_traits::const_reference coeff1, Coefficient_traits::const_reference coeff2)
 
void linear_combine (Dense_Row &x, const Dense_Row &y, Coefficient_traits::const_reference c1, Coefficient_traits::const_reference c2, dimension_type start, dimension_type end)
 
template<typename To , typename From >
Result maybe_assign (const To *&top, To &tmp, const From &from, Rounding_Dir dir)
 Assigns to top a pointer to a location that holds the conversion, according to dir, of from to type To. When necessary, and only when necessary, the variable tmp is used to hold the result of conversion. More...
 
unsigned int msb_position (unsigned long long v)
 If v is nonzero, returns the position of the most significant bit in a. More...
 
bool is_less_precise_than (Floating_Point_Format f1, Floating_Point_Format f2)
 
template<typename FP_Interval_Type >
void affine_form_image (std::map< dimension_type, Linear_Form< FP_Interval_Type > > &lf_store, const Variable var, const Linear_Form< FP_Interval_Type > &lf)
 
template<typename FP_Interval_Type >
const FP_Interval_Type & compute_absolute_error (const Floating_Point_Format analyzed_format)
 
template<typename FP_Interval_Type >
void discard_occurrences (std::map< dimension_type, Linear_Form< FP_Interval_Type > > &lf_store, Variable var)
 
template<typename FP_Interval_Type >
void upper_bound_assign (std::map< dimension_type, Linear_Form< FP_Interval_Type > > &ls1, const std::map< dimension_type, Linear_Form< FP_Interval_Type > > &ls2)
 
int fpu_get_control ()
 
void fpu_set_control (int c)
 
int fpu_get_status ()
 
void fpu_clear_status (unsigned short bits)
 
void fpu_clear_exceptions ()
 
void fpu_set_rounding_direction (int)
 
int fpu_save_rounding_direction (int)
 
void fpu_restore_rounding_direction (int)
 
bool operator== (const Generator_System &x, const Generator_System &y)
 
bool operator!= (const Generator_System &x, const Generator_System &y)
 
dimension_type check_space_dimension_overflow (const dimension_type dim, const dimension_type max, const char *domain, const char *method, const char *reason)
 
dimension_type not_a_dimension ()
 Returns a value that does not designate a valid dimension. More...
 
int32_t hash_code_from_dimension (dimension_type dim)
 Returns the hash code for space dimension dim. More...
 
template<typename T >
Enable_If< Slow_Copy< T >::value, void >::type swap (T &, T &)
 Make sure swap() is specialized when needed. More...
 
dimension_type compute_capacity (dimension_type requested_size, dimension_type maximum_size)
 Speculative allocation function. More...
 
bool is_space (char c)
 Returns true if c is any kind of space character. More...
 
template<typename T >
Enable_If< Has_OK< T >::value, bool >::type f_OK (const T &to)
 
void ascii_dump (std::ostream &s, Representation r)
 
bool ascii_load (std::istream &s, Representation &r)
 
template<typename RA_Container >
RA_Container::iterator nth_iter (RA_Container &cont, dimension_type n)
 
template<typename RA_Container >
RA_Container::const_iterator nth_iter (const RA_Container &cont, dimension_type n)
 
dimension_type least_significant_one_mask (dimension_type i)
 
void maybe_abandon ()
 
void neg_assign (GMP_Integer &x)
 
void neg_assign (GMP_Integer &x, const GMP_Integer &y)
 
void abs_assign (GMP_Integer &x)
 
void abs_assign (GMP_Integer &x, const GMP_Integer &y)
 
void gcd_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z)
 
void rem_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z)
 
void gcdext_assign (GMP_Integer &x, GMP_Integer &s, GMP_Integer &t, const GMP_Integer &y, const GMP_Integer &z)
 
void lcm_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z)
 
void add_mul_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z)
 
void sub_mul_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z)
 
void mul_2exp_assign (GMP_Integer &x, const GMP_Integer &y, unsigned int exp)
 
void div_2exp_assign (GMP_Integer &x, const GMP_Integer &y, unsigned int exp)
 
void exact_div_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z)
 
void sqrt_assign (GMP_Integer &x, const GMP_Integer &y)
 
int cmp (const GMP_Integer &x, const GMP_Integer &y)
 
const mpz_class & raw_value (const GMP_Integer &x)
 
mpz_class & raw_value (GMP_Integer &x)
 
void set_rounding_for_PPL ()
 Sets the FPU rounding mode so that the PPL abstractions based on floating point numbers work correctly. More...
 
void restore_pre_PPL_rounding ()
 Sets the FPU rounding mode as it was before initialization of the PPL. More...
 
void initialize ()
 Initializes the library. More...
 
void finalize ()
 Finalizes the library. More...
 
I_Result combine (Result l, Result u)
 
template<typename Boundary , typename Info >
bool f_is_empty (const Interval< Boundary, Info > &x)
 
template<typename Boundary , typename Info >
bool f_is_singleton (const Interval< Boundary, Info > &x)
 
template<typename Boundary , typename Info >
int infinity_sign (const Interval< Boundary, Info > &x)
 
template<typename T >
Enable_If< Is_Singleton< T >::value||Is_Interval< T >::value, bool >::type is_singleton_integer (const T &x)
 
template<typename T >
Enable_If< Is_Singleton< T >::value||Is_Interval< T >::value, bool >::type check_empty_arg (const T &x)
 
template<typename T1 , typename T2 >
Enable_If<((Is_Singleton< T1 >::value||Is_Interval< T1 >::value)&&(Is_Singleton< T2 >::value||Is_Interval< T2 >::value)&&(Is_Interval< T1 >::value||Is_Interval< T2 >::value)), bool >::type operator== (const T1 &x, const T2 &y)
 
template<typename T1 , typename T2 >
Enable_If<((Is_Singleton< T1 >::value||Is_Interval< T1 >::value)&&(Is_Singleton< T2 >::value||Is_Interval< T2 >::value)&&(Is_Interval< T1 >::value||Is_Interval< T2 >::value)), bool >::type operator!= (const T1 &x, const T2 &y)
 
template<typename B , typename Info , typename T >
Enable_If< Is_Singleton< T >::value, Interval< B, Info > >::type operator+ (const Interval< B, Info > &x, const T &y)
 
template<typename B , typename Info , typename T >
Enable_If< Is_Singleton< T >::value, Interval< B, Info > >::type operator+ (const T &x, const Interval< B, Info > &y)
 
template<typename B , typename Info >
Interval< B, Info > operator+ (const Interval< B, Info > &x, const Interval< B, Info > &y)
 
template<typename B , typename Info , typename T >
Enable_If< Is_Singleton< T >::value, Interval< B, Info > >::type operator- (const Interval< B, Info > &x, const T &y)
 
template<typename B , typename Info , typename T >
Enable_If< Is_Singleton< T >::value, Interval< B, Info > >::type operator- (const T &x, const Interval< B, Info > &y)
 
template<typename B , typename Info >
Interval< B, Info > operator- (const Interval< B, Info > &x, const Interval< B, Info > &y)
 
template<typename B , typename Info , typename T >
Enable_If< Is_Singleton< T >::value, Interval< B, Info > >::type operator* (const Interval< B, Info > &x, const T &y)
 
template<typename B , typename Info , typename T >
Enable_If< Is_Singleton< T >::value, Interval< B, Info > >::type operator* (const T &x, const Interval< B, Info > &y)
 
template<typename B , typename Info >
Interval< B, Info > operator* (const Interval< B, Info > &x, const Interval< B, Info > &y)
 
template<typename B , typename Info , typename T >
Enable_If< Is_Singleton< T >::value, Interval< B, Info > >::type operator/ (const Interval< B, Info > &x, const T &y)
 
template<typename B , typename Info , typename T >
Enable_If< Is_Singleton< T >::value, Interval< B, Info > >::type operator/ (const T &x, const Interval< B, Info > &y)
 
template<typename B , typename Info >
Interval< B, Info > operator/ (const Interval< B, Info > &x, const Interval< B, Info > &y)
 
template<typename Boundary , typename Info >
std::ostream & operator<< (std::ostream &os, const Interval< Boundary, Info > &x)
 
template<typename Boundary , typename Info >
std::istream & operator>> (std::istream &is, Interval< Boundary, Info > &x)
 
I_Result operator| (I_Result a, I_Result b)
 
I_Result operator& (I_Result a, I_Result b)
 
I_Result operator- (I_Result a, I_Result b)
 
template<typename T >
I_Constraint< T > i_constraint (I_Constraint_Rel rel, const T &v)
 
template<typename T >
I_Constraint< T > i_constraint (I_Constraint_Rel rel, const T &v, bool force)
 
template<typename T >
I_Constraint< T > i_constraint (I_Constraint_Rel rel, T &v)
 
template<typename T , typename Val_Or_Ref_Criteria >
I_Constraint< T, Val_Or_Ref_Criteria > i_constraint (I_Constraint_Rel rel, const T &v, const Val_Or_Ref_Criteria &)
 
template<typename T , typename Val_Or_Ref_Criteria >
I_Constraint< T, Val_Or_Ref_Criteria > i_constraint (I_Constraint_Rel rel, const T &v, bool force, const Val_Or_Ref_Criteria &)
 
template<typename T , typename Val_Or_Ref_Criteria >
I_Constraint< T, Val_Or_Ref_Criteria > i_constraint (I_Constraint_Rel rel, T &v, const Val_Or_Ref_Criteria &)
 
void add_mul_assign (Linear_Expression &e1, Coefficient_traits::const_reference factor, const Linear_Expression &e2)
 
void sub_mul_assign (Linear_Expression &e1, Coefficient_traits::const_reference factor, const Linear_Expression &e2)
 
int compare (const Linear_Expression &x, const Linear_Expression &y)
 
template<typename T >
Enable_If< Is_Native_Or_Checked< T >::value, void >::type numer_denom (const T &from, Coefficient &numer, Coefficient &denom)
 Extract the numerator and denominator components of from. More...
 
template<typename T >
Enable_If< Is_Native_Or_Checked< T >::value, void >::type div_round_up (T &to, Coefficient_traits::const_reference x, Coefficient_traits::const_reference y)
 Divides x by y into to, rounding the result towards plus infinity. More...
 
template<typename N >
void min_assign (N &x, const N &y)
 Assigns to x the minimum between x and y. More...
 
template<typename N >
void max_assign (N &x, const N &y)
 Assigns to x the maximum between x and y. More...
 
template<typename T >
Enable_If< Is_Native_Or_Checked< T >::value, bool >::type is_even (const T &x)
 Returns true if and only if x is an even number. More...
 
template<typename T >
Enable_If< Is_Native_Or_Checked< T >::value, bool >::type is_additive_inverse (const T &x, const T &y)
 Returns true if and only if $x = -y$. More...
 
void normalize2 (Coefficient_traits::const_reference x, Coefficient_traits::const_reference y, Coefficient &n_x, Coefficient &n_y)
 If $g$ is the GCD of x and y, the values of x and y divided by $g$ are assigned to n_x and n_y, respectively. More...
 
bool is_canonical (const mpq_class &x)
 Returns true if and only if x is in canonical form. More...
 
template<typename T >
low_bits_mask (unsigned n)
 Returns a mask for the lowest n bits,. More...
 
template<typename Row >
void swap (Matrix< Row > &x, Matrix< Row > &y)
 
dimension_type max_space_dimension ()
 Returns the maximum space dimension this library can handle. More...
 
dimension_type isqrt (dimension_type x)
 Returns the integer square root of x. More...
 
template<typename D1 , typename D2 >
bool shrink_to_congruence_no_check (D1 &d1, D2 &d2, const Congruence &cg)
 
int result_overflow (Result r)
 
bool result_representable (Result r)
 
void swap (Parma_Polyhedra_Library::Sparse_Row &x, Parma_Polyhedra_Library::Dense_Row &y)
 
void swap (Parma_Polyhedra_Library::Dense_Row &x, Parma_Polyhedra_Library::Sparse_Row &y)
 
bool operator== (const Dense_Row &x, const Sparse_Row &y)
 
bool operator!= (const Dense_Row &x, const Sparse_Row &y)
 
bool operator== (const Sparse_Row &x, const Dense_Row &y)
 
bool operator!= (const Sparse_Row &x, const Dense_Row &y)
 
template<typename T >
void swap (Swapping_Vector< T > &vec1, Swapping_Vector< T > &vec2)
 
void swap (Variable &x, Variable &y)
 
void PPL_handle_timeout (int signum)
 
Library Version Control Functions
unsigned version_major ()
 Returns the major number of the PPL version. More...
 
unsigned version_minor ()
 Returns the minor number of the PPL version. More...
 
unsigned version_revision ()
 Returns the revision number of the PPL version. More...
 
unsigned version_beta ()
 Returns the beta number of the PPL version. More...
 
const char * version ()
 Returns a character string containing the PPL version. More...
 
const char * banner ()
 Returns a character string containing the PPL banner. More...
 
Functions Controlling Floating Point Unit
void fpu_initialize_control_functions ()
 Initializes the FPU control functions. More...
 
fpu_rounding_direction_type fpu_get_rounding_direction ()
 Returns the current FPU rounding direction. More...
 
void fpu_set_rounding_direction (fpu_rounding_direction_type dir)
 Sets the FPU rounding direction to dir. More...
 
fpu_rounding_control_word_type fpu_save_rounding_direction (fpu_rounding_direction_type dir)
 Sets the FPU rounding direction to dir and returns the rounding control word previously in use. More...
 
void fpu_reset_inexact ()
 Clears the inexact computation status. More...
 
void fpu_restore_rounding_direction (fpu_rounding_control_word_type w)
 Restores the FPU rounding rounding control word to cw. More...
 
int fpu_check_inexact ()
 Queries the inexact computation status. More...
 
fpu_rounding_control_word_type fpu_save_rounding_direction_reset_inexact (fpu_rounding_direction_type dir)
 Sets the FPU rounding direction to dir, clears the inexact computation status, and returns the rounding control word previously in use. More...
 
Memory Size Inspection Functions
template<typename T >
Enable_If< Is_Native< T >::value, memory_size_type >::type total_memory_in_bytes (const T &)
 For native types, returns the total size in bytes of the memory occupied by the type of the (unused) parameter, i.e., 0. More...
 
template<typename T >
Enable_If< Is_Native< T >::value, memory_size_type >::type external_memory_in_bytes (const T &)
 For native types, returns the size in bytes of the memory managed by the type of the (unused) parameter, i.e., 0. More...
 
memory_size_type total_memory_in_bytes (const mpz_class &x)
 Returns the total size in bytes of the memory occupied by x. More...
 
memory_size_type external_memory_in_bytes (const mpz_class &x)
 Returns the size in bytes of the memory managed by x. More...
 
memory_size_type total_memory_in_bytes (const mpq_class &x)
 Returns the total size in bytes of the memory occupied by x. More...
 
memory_size_type external_memory_in_bytes (const mpq_class &x)
 Returns the size in bytes of the memory managed by x. More...
 
Functions Inspecting and/or Combining Result Values
Result operator& (Result x, Result y)
 
Result operator| (Result x, Result y)
 
Result operator- (Result x, Result y)
 
Result_Class result_class (Result r)
 
Result_Relation result_relation (Result r)
 
Result result_relation_class (Result r)
 
Functions Inspecting and/or Combining Rounding_Dir Values
Rounding_Dir operator& (Rounding_Dir x, Rounding_Dir y)
 
Rounding_Dir operator| (Rounding_Dir x, Rounding_Dir y)
 
Rounding_Dir inverse (Rounding_Dir dir)
 
Rounding_Dir round_dir (Rounding_Dir dir)
 
bool round_down (Rounding_Dir dir)
 
bool round_up (Rounding_Dir dir)
 
bool round_ignore (Rounding_Dir dir)
 
bool round_not_needed (Rounding_Dir dir)
 
bool round_not_requested (Rounding_Dir dir)
 
bool round_direct (Rounding_Dir dir)
 
bool round_inverse (Rounding_Dir dir)
 
bool round_strict_relation (Rounding_Dir dir)
 
fpu_rounding_direction_type round_fpu_dir (Rounding_Dir dir)
 
Functions for the Synthesis of Linear Rankings
template<typename PSET >
bool termination_test_MS (const PSET &pset)
 
template<typename PSET >
bool termination_test_MS_2 (const PSET &pset_before, const PSET &pset_after)
 
template<typename PSET >
bool one_affine_ranking_function_MS (const PSET &pset, Generator &mu)
 
template<typename PSET >
bool one_affine_ranking_function_MS_2 (const PSET &pset_before, const PSET &pset_after, Generator &mu)
 
template<typename PSET >
void all_affine_ranking_functions_MS (const PSET &pset, C_Polyhedron &mu_space)
 
template<typename PSET >
void all_affine_ranking_functions_MS_2 (const PSET &pset_before, const PSET &pset_after, C_Polyhedron &mu_space)
 
template<typename PSET >
void all_affine_quasi_ranking_functions_MS (const PSET &pset, C_Polyhedron &decreasing_mu_space, C_Polyhedron &bounded_mu_space)
 
template<typename PSET >
void all_affine_quasi_ranking_functions_MS_2 (const PSET &pset_before, const PSET &pset_after, C_Polyhedron &decreasing_mu_space, C_Polyhedron &bounded_mu_space)
 
template<typename PSET >
bool termination_test_PR (const PSET &pset)
 
template<typename PSET >
bool termination_test_PR_2 (const PSET &pset_before, const PSET &pset_after)
 
template<typename PSET >
bool one_affine_ranking_function_PR (const PSET &pset, Generator &mu)
 
template<typename PSET >
bool one_affine_ranking_function_PR_2 (const PSET &pset_before, const PSET &pset_after, Generator &mu)
 
template<typename PSET >
void all_affine_ranking_functions_PR (const PSET &pset, NNC_Polyhedron &mu_space)
 
template<typename PSET >
void all_affine_ranking_functions_PR_2 (const PSET &pset_before, const PSET &pset_after, NNC_Polyhedron &mu_space)
 

Variables

Minus_Infinity MINUS_INFINITY
 
Plus_Infinity PLUS_INFINITY
 
Not_A_Number NOT_A_NUMBER
 
const Throwable *volatile abandon_expensive_computations = 0
 A pointer to an exception object. More...
 
template<typename Unsigned >
 Enable_If<(static_cast< Unsigned >-1) >
 

Detailed Description

The entire library is confined to this namespace.

Typedef Documentation

Encodes a binary operator of concrete expressions.

The values should be uniquely defined by the particular instance and named: ADD, SUB, MUL, DIV, REM, BAND, BOR, BXOR, LSHIFT, RSHIFT.

Definition at line 86 of file Concrete_Expression_types.hh.

Encodes the kind of concrete expression.

The values should be defined by the particular instance and uniquely identify one of: Binary_Operator, Unary_Operator, Cast_Operator, Integer_Constant, Floating_Point_Constant, or Approximable_Reference. For example, the Binary_Operator kind integer constant should be defined by an instance as the member Binary_Operator<T>::KIND.

Definition at line 66 of file Concrete_Expression_types.hh.

Encodes a unary operator of concrete expressions.

The values should be uniquely defined by the particular instance and named: PLUS, MINUS, BNOT.

Definition at line 94 of file Concrete_Expression_types.hh.

Definition at line 31 of file GMP_Integer_types.hh.

An interval with integral, necessarily closed boundaries.

Definition at line 49 of file Integer_Interval.hh.

Definition at line 20 of file PIP_Tree_types.hh.

A box with rational, possibly open boundaries.

Definition at line 35 of file Rational_Box.hh.

An interval with rational, possibly open boundaries.

Definition at line 50 of file Rational_Interval.hh.

Enumeration Type Documentation

Definition at line 22 of file fpu_types.hh.

22 {};
Enumerator
VC_NORMAL 

Representable number result class.

VC_MINUS_INFINITY 

Negative infinity result class.

VC_PLUS_INFINITY 

Positive infinity result class.

VC_NAN 

Not a number result class.

VC_MASK 

Definition at line 29 of file Result_defs.hh.

29  {
31  VC_NORMAL = 0U << 4,
32 
34  VC_MINUS_INFINITY = 1U << 4,
35 
37  VC_PLUS_INFINITY = 2U << 4,
38 
40  VC_NAN = 3U << 4,
41 
42  VC_MASK = VC_NAN
43 };
Negative infinity result class.
Definition: Result_defs.hh:34
Not a number result class.
Definition: Result_defs.hh:40
Positive infinity result class.
Definition: Result_defs.hh:37
Representable number result class.
Definition: Result_defs.hh:31
Enumerator
VR_EMPTY 

No values satisfies the relation.

VR_EQ 

Equal. This need to be accompanied by a value.

VR_LT 

Less than. This need to be accompanied by a value.

VR_GT 

Greater than. This need to be accompanied by a value.

VR_NE 

Not equal. This need to be accompanied by a value.

VR_LE 

Less or equal. This need to be accompanied by a value.

VR_GE 

Greater or equal. This need to be accompanied by a value.

VR_LGE 

All values satisfy the relation.

VR_MASK 

Definition at line 46 of file Result_defs.hh.

46  {
48  VR_EMPTY = 0U,
49 
51  VR_EQ = 1U,
52 
54  VR_LT = 2U,
55 
57  VR_GT = 4U,
58 
60  VR_NE = VR_LT | VR_GT,
61 
63  VR_LE = VR_EQ | VR_LT,
64 
66  VR_GE = VR_EQ | VR_GT,
67 
69  VR_LGE = VR_LT | VR_EQ | VR_GT,
70 
71  VR_MASK = VR_LGE
72 };
All values satisfy the relation.
Definition: Result_defs.hh:69
Less or equal. This need to be accompanied by a value.
Definition: Result_defs.hh:63
Not equal. This need to be accompanied by a value.
Definition: Result_defs.hh:60
Equal. This need to be accompanied by a value.
Definition: Result_defs.hh:51
Less than. This need to be accompanied by a value.
Definition: Result_defs.hh:54
Greater or equal. This need to be accompanied by a value.
Definition: Result_defs.hh:66
Greater than. This need to be accompanied by a value.
Definition: Result_defs.hh:57
No values satisfies the relation.
Definition: Result_defs.hh:48

Function Documentation

void Parma_Polyhedra_Library::abs_assign ( GMP_Integer x)
related
void Parma_Polyhedra_Library::abs_assign ( GMP_Integer x,
const GMP_Integer y 
)
related

Definition at line 47 of file GMP_Integer_inlines.hh.

47  {
48  mpz_abs(x.get_mpz_t(), y.get_mpz_t());
49 }
void Parma_Polyhedra_Library::add_mul_assign ( GMP_Integer x,
const GMP_Integer y,
const GMP_Integer z 
)
related

Definition at line 75 of file GMP_Integer_inlines.hh.

Referenced by Parma_Polyhedra_Library::PIP_Tree_Node::add_constraint(), Parma_Polyhedra_Library::Linear_Expression_Impl< Row >::add_mul_assign(), Parma_Polyhedra_Library::MIP_Problem::compute_generator(), Parma_Polyhedra_Library::Grid::expand_space_dimension(), Parma_Polyhedra_Library::Polyhedron::expand_space_dimension(), Parma_Polyhedra_Library::Implementation::Termination::fill_constraint_system_PR(), Parma_Polyhedra_Library::Implementation::Termination::fill_constraint_system_PR_original(), Parma_Polyhedra_Library::Implementation::Termination::fill_constraint_systems_MS(), Parma_Polyhedra_Library::BD_Shape< T >::frequency(), Parma_Polyhedra_Library::PIP_Solution_Node::generate_cut(), Parma_Polyhedra_Library::Dense_Row::linear_combine(), Parma_Polyhedra_Library::Sparse_Row::linear_combine(), Parma_Polyhedra_Library::Grid::map_space_dimensions(), Parma_Polyhedra_Library::Polyhedron::map_space_dimensions(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), Parma_Polyhedra_Library::BD_Shape< T >::relation_with(), Parma_Polyhedra_Library::Linear_Expression_Impl< Row >::scalar_product_assign(), Parma_Polyhedra_Library::PIP_Solution_Node::solve(), Parma_Polyhedra_Library::MIP_Problem::steepest_edge_exact_entering_index(), Parma_Polyhedra_Library::PIP_Solution_Node::update_solution(), and Parma_Polyhedra_Library::PIP_Solution_Node::update_tableau().

75  {
76  mpz_addmul(x.get_mpz_t(), y.get_mpz_t(), z.get_mpz_t());
77 }
void Parma_Polyhedra_Library::add_mul_assign ( Linear_Expression e1,
Coefficient_traits::const_reference  factor,
const Linear_Expression e2 
)
related

Definition at line 401 of file Linear_Expression_inlines.hh.

References Parma_Polyhedra_Library::Linear_Expression_Interface::add_mul_assign(), and Parma_Polyhedra_Library::Linear_Expression::impl.

403  {
404  e1.impl->add_mul_assign(factor, *e2.impl);
405 }
template<typename FP_Interval_Type >
void Parma_Polyhedra_Library::affine_form_image ( std::map< dimension_type, Linear_Form< FP_Interval_Type > > &  lf_store,
const Variable  var,
const Linear_Form< FP_Interval_Type > &  lf 
)
related

Definition at line 524 of file Float_inlines.hh.

References discard_occurrences(), and Parma_Polyhedra_Library::Variable::id().

527  {
528  // Assign the new linear form for var.
529  lf_store[var.id()] = lf;
530  // Now invalidate all linear forms in which var occurs.
531  discard_occurrences(lf_store, var);
532 }
void discard_occurrences(std::map< dimension_type, Linear_Form< FP_Interval_Type > > &lf_store, Variable var)
template<typename T >
Enable_If<Is_Native_Or_Checked<T>::value, void>::type Parma_Polyhedra_Library::ascii_dump ( std::ostream &  s,
const T &  t 
)
related

Definition at line 35 of file Checked_Number_templates.hh.

Referenced by Parma_Polyhedra_Library::Congruence_System::ascii_dump(), Parma_Polyhedra_Library::Linear_System< Row >::ascii_dump(), Parma_Polyhedra_Library::Interval< Boundary, Info >::ascii_dump(), Parma_Polyhedra_Library::MIP_Problem::OK(), Parma_Polyhedra_Library::PIP_Problem::OK(), Parma_Polyhedra_Library::Polyhedron::OK(), and Parma_Polyhedra_Library::Grid::OK().

35  {
36  if (std::numeric_limits<T>::is_exact) {
37  // An exact data type: pretty printer is accurate.
38  s << t;
39  }
40  else {
41  // An inexact data type (probably floating point):
42  // first dump its hexadecimal representation ...
43  const std::ios::fmtflags old_flags = s.setf(std::ios::hex,
44  std::ios::basefield);
45  const unsigned char* p = reinterpret_cast<const unsigned char*>(&t);
46  for (unsigned i = 0; i < sizeof(T); ++i) {
47  s << std::setw(2) << std::setfill('0') << static_cast<unsigned>(p[i]);
48  }
49  s.flags(old_flags);
50  // ... and then pretty print it for readability.
51  s << " (" << t << ")";
52  }
53 }
void Parma_Polyhedra_Library::ascii_dump ( std::ostream &  s,
Representation  r 
)
inline

Definition at line 140 of file globals_inlines.hh.

References DENSE.

140  {
141  if (r == DENSE) {
142  s << "DENSE";
143  }
144  else {
145  s << "SPARSE";
146  }
147 }
Dense representation: the coefficient sequence is represented as a vector of coefficients, including the zero coefficients. If there are only a few nonzero coefficients, this representation is faster and also uses a bit less memory.
template<typename T >
Enable_If<Is_Native_Or_Checked<T>::value, bool>::type Parma_Polyhedra_Library::ascii_load ( std::istream &  s,
T &  t 
)

Definition at line 57 of file Checked_Number_templates.hh.

Referenced by Parma_Polyhedra_Library::Congruence_System::ascii_load(), Parma_Polyhedra_Library::Matrix< Row >::ascii_load(), Parma_Polyhedra_Library::Linear_System< Row >::ascii_load(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::ascii_load().

57  {
58  if (std::numeric_limits<T>::is_exact) {
59  // An exact data type: input from pretty printed version is accurate.
60  s >> t;
61  return !s.fail();
62  }
63  else {
64  // An inexact data type (probably floating point):
65  // first load its hexadecimal representation ...
66  std::string str;
67  if (!(s >> str) || str.size() != 2*sizeof(T)) {
68  return false;
69  }
70  unsigned char* p = reinterpret_cast<unsigned char*>(&t);
71  // CHECKME: any (portable) simpler way?
72  for (unsigned i = 0; i < sizeof(T); ++i) {
73  unsigned byte_value = 0;
74  for (unsigned j = 0; j < 2; ++j) {
75  byte_value <<= 4;
76  unsigned half_byte_value;
77  // Interpret single hex character.
78  switch (str[2*i + j]) {
79  case '0':
80  half_byte_value = 0;
81  break;
82  case '1':
83  half_byte_value = 1;
84  break;
85  case '2':
86  half_byte_value = 2;
87  break;
88  case '3':
89  half_byte_value = 3;
90  break;
91  case '4':
92  half_byte_value = 4;
93  break;
94  case '5':
95  half_byte_value = 5;
96  break;
97  case '6':
98  half_byte_value = 6;
99  break;
100  case '7':
101  half_byte_value = 7;
102  break;
103  case '8':
104  half_byte_value = 8;
105  break;
106  case '9':
107  half_byte_value = 9;
108  break;
109  case 'A':
110  case 'a':
111  half_byte_value = 10;
112  break;
113  case 'B':
114  case 'b':
115  half_byte_value = 11;
116  break;
117  case 'C':
118  case 'c':
119  half_byte_value = 12;
120  break;
121  case 'D':
122  case 'd':
123  half_byte_value = 13;
124  break;
125  case 'E':
126  case 'e':
127  half_byte_value = 14;
128  break;
129  case 'F':
130  case 'f':
131  half_byte_value = 15;
132  break;
133  default:
134  return false;
135  }
136  byte_value += half_byte_value;
137  }
138  PPL_ASSERT(byte_value <= 255);
139  p[i] = static_cast<unsigned char>(byte_value);
140  }
141  // ... then read and discard pretty printed value.
142  if (!(s >> str)) {
143  return false;
144  }
145  const std::string::size_type sz = str.size();
146  return sz > 2 && str[0] == '(' && str[sz-1] == ')';
147  }
148 }
bool Parma_Polyhedra_Library::ascii_load ( std::istream &  s,
Representation r 
)
inline

Definition at line 150 of file globals_inlines.hh.

References DENSE, and SPARSE.

150  {
151  std::string s;
152  if (!(is >> s)) {
153  return false;
154  }
155 
156  if (s == "DENSE") {
157  r = DENSE;
158  return true;
159  }
160  if (s == "SPARSE") {
161  r = SPARSE;
162  return true;
163  }
164  return false;
165 }
Dense representation: the coefficient sequence is represented as a vector of coefficients, including the zero coefficients. If there are only a few nonzero coefficients, this representation is faster and also uses a bit less memory.
Sparse representation: only the nonzero coefficient are stored. If there are many nonzero coefficient...
template<typename T >
Enable_If<!Has_Assign_Or_Swap<T>::value && !Slow_Copy<T>::value, void>::type Parma_Polyhedra_Library::assign_or_swap ( T &  to,
T &  from 
)
inline

If there is no assign_or_swap() method but copies are not slow, copy.

Definition at line 52 of file assign_or_swap.hh.

52  {
53  to = from;
54 }
template<typename T >
Enable_If<!Has_Assign_Or_Swap<T>::value && Slow_Copy<T>::value, void>::type Parma_Polyhedra_Library::assign_or_swap ( T &  to,
T &  from 
)
inline

If there is no assign_or_swap() and copies are slow, delegate to swap().

Definition at line 64 of file assign_or_swap.hh.

References swap().

64  {
65  using std::swap;
66  swap(to, from);
67 }
void swap(CO_Tree &x, CO_Tree &y)
void swap(Affine_Space &x, Affine_Space &y)
Swaps x with y.
template<typename To , typename From >
Enable_If<Is_Native_Or_Checked<To>::value && Is_Special<From>::value, Result>::type Parma_Polyhedra_Library::assign_r ( To &  to,
const From &  ,
Rounding_Dir  dir 
)
related

Definition at line 207 of file Checked_Number_inlines.hh.

References check_result(), and rounding_dir().

Referenced by Parma_Polyhedra_Library::Octagonal_Shape< T >::add_space_dimensions_and_project(), Parma_Polyhedra_Library::BD_Shape< T >::add_space_dimensions_and_project(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_form_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::affine_image(), Parma_Polyhedra_Library::Boundary_NS::assign(), Parma_Polyhedra_Library::BD_Shape< T >::BD_Shape(), Parma_Polyhedra_Library::Octagonal_Shape< T >::BHMZ05_widening_assign(), Parma_Polyhedra_Library::BD_Shape< T >::BHMZ05_widening_assign(), Parma_Polyhedra_Library::BD_Shape< T >::BHZ09_upper_bound_assign_if_exact(), Parma_Polyhedra_Library::Box< ITV >::bounded_affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::Box< ITV >::bounded_affine_preimage(), Parma_Polyhedra_Library::Box< ITV >::Box(), Parma_Polyhedra_Library::Octagonal_Shape< T >::CC76_extrapolation_assign(), Parma_Polyhedra_Library::BD_Shape< T >::CC76_extrapolation_assign(), Parma_Polyhedra_Library::Boundary_NS::complement(), Parma_Polyhedra_Library::DB_Row_Impl_Handler< T >::Impl::construct_upward_approximation(), Parma_Polyhedra_Library::Polyhedron::contains_integer_point(), Parma_Polyhedra_Library::Octagonal_Shape< T >::contains_integer_point(), Parma_Polyhedra_Library::BD_Shape< T >::contains_integer_point(), Parma_Polyhedra_Library::I_Constraint_Common< I_Constraint< T, Val_Or_Ref_Criteria, extended > >::convert_real(), Parma_Polyhedra_Library::Octagonal_Shape< T >::deduce_minus_v_pm_u_bounds(), Parma_Polyhedra_Library::BD_Shape< T >::deduce_u_minus_v_bounds(), Parma_Polyhedra_Library::BD_Shape< T >::deduce_v_minus_u_bounds(), Parma_Polyhedra_Library::Octagonal_Shape< T >::deduce_v_pm_u_bounds(), div_round_up(), Parma_Polyhedra_Library::Octagonal_Shape< T >::drop_some_non_integer_points(), Parma_Polyhedra_Library::BD_Shape< T >::euclidean_distance_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::euclidean_distance_assign(), Parma_Polyhedra_Library::DB_Row_Impl_Handler< T >::Impl::expand_within_capacity(), Parma_Polyhedra_Library::Octagonal_Shape< T >::export_interval_constraints(), Parma_Polyhedra_Library::BD_Shape< T >::forget_all_dbm_constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::forget_all_octagonal_constraints(), Parma_Polyhedra_Library::BD_Shape< T >::forget_binary_dbm_constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::forget_binary_octagonal_constraints(), Parma_Polyhedra_Library::Box< ITV >::frequency(), Parma_Polyhedra_Library::BD_Shape< T >::frequency(), Parma_Polyhedra_Library::Polyhedron::frequency(), Parma_Polyhedra_Library::maybe_assign_struct< To, From >::function(), Parma_Polyhedra_Library::BD_Shape< T >::general_refine(), Parma_Polyhedra_Library::Box< ITV >::generalized_affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::Box< ITV >::has_lower_bound(), Parma_Polyhedra_Library::Box< ITV >::has_upper_bound(), Parma_Polyhedra_Library::BD_Shape< T >::incremental_shortest_path_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::incremental_strong_closure_assign(), Parma_Polyhedra_Library::BD_Shape< T >::inhomogeneous_affine_form_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::integer_upper_bound_assign_if_exact(), Parma_Polyhedra_Library::Interval< Boundary, Info >::Interval(), Parma_Polyhedra_Library::Octagonal_Shape< T >::interval_coefficient_upper_bound(), interval_relation(), Parma_Polyhedra_Library::MIP_Problem::is_mip_satisfiable(), Parma_Polyhedra_Library::Octagonal_Shape< T >::is_strongly_reduced(), Parma_Polyhedra_Library::BD_Shape< T >::l_infinity_distance_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::l_infinity_distance_assign(), 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::Octagonal_Shape< T >::linear_form_upper_bound(), Parma_Polyhedra_Library::BD_Shape< T >::linear_form_upper_bound(), 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(), numer_denom(), Parma_Polyhedra_Library::Octagonal_Shape< T >::Octagonal_Shape(), Parma_Polyhedra_Library::BD_Shape< T >::one_variable_affine_form_image(), Parma_Polyhedra_Library::Checked_Number< T, Policy >::operator=(), Parma_Polyhedra_Library::Box< ITV >::propagate_constraint_no_check(), Parma_Polyhedra_Library::BD_Shape< T >::rectilinear_distance_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::rectilinear_distance_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine(), Parma_Polyhedra_Library::BD_Shape< T >::refine(), Parma_Polyhedra_Library::Box< ITV >::refine_interval_no_check(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine_with_linear_form_inequality(), 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::Boundary_NS::set_boundary_infinity(), Parma_Polyhedra_Library::Boundary_NS::set_minus_infinity(), Parma_Polyhedra_Library::Boundary_NS::set_plus_infinity(), Parma_Polyhedra_Library::Boundary_NS::set_unbounded(), Parma_Polyhedra_Library::Boundary_NS::set_zero(), Parma_Polyhedra_Library::BD_Shape< T >::shortest_path_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::simplify_using_context_assign(), Parma_Polyhedra_Library::BD_Shape< T >::simplify_using_context_assign(), Parma_Polyhedra_Library::MIP_Problem::solve_mip(), Parma_Polyhedra_Library::Octagonal_Shape< T >::strong_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::strong_reduction_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::tight_closure_assign(), Parma_Polyhedra_Library::BD_Shape< T >::two_variables_affine_form_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::upper_bound_assign_if_exact(), and Parma_Polyhedra_Library::Implementation::wrap_assign().

207  {
208  return check_result(Checked::assign_special<typename Native_Checked_To_Wrapper<To>
210  From::vclass,
211  rounding_dir(dir)),
212  dir);
213 }
const mpz_class & raw_value(const GMP_Integer &x)
Rounding_Dir rounding_dir(Rounding_Dir dir)
Result check_result(Result r, Rounding_Dir dir)
const char * Parma_Polyhedra_Library::banner ( )

Returns a character string containing the PPL banner.

The banner provides information about the PPL version, the licensing, the lack of any warranty whatsoever, the C++ compiler used to build the library, where to report bugs and where to look for further information.

Definition at line 106 of file version.cc.

106  {
107  return banner_string;
108 }
template<typename T >
Enable_If<Is_Singleton<T>::value || Is_Interval<T>::value, bool>::type Parma_Polyhedra_Library::check_empty_arg ( const T &  x)
inline

Definition at line 146 of file Interval_inlines.hh.

References Parma_Polyhedra_Library::Interval_NS::f_info(), and f_is_empty().

Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::add_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::contains(), Parma_Polyhedra_Library::Interval< Boundary, Info >::div_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::is_disjoint_from(), Parma_Polyhedra_Library::Interval< Boundary, Info >::join_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::mul_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::neg_assign(), operator<<(), operator==(), Parma_Polyhedra_Library::Interval< Boundary, Info >::refine_existential(), Parma_Polyhedra_Library::Interval< Boundary, Info >::refine_universal(), Parma_Polyhedra_Library::Interval< Boundary, Info >::strictly_contains(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::sub_assign().

146  {
147  if (f_info(x).may_be_empty) {
148  return f_is_empty(x);
149  }
150  else {
151  PPL_ASSERT(!f_is_empty(x));
152  return false;
153  }
154 }
Enable_If< Is_Singleton< T >::value, bool >::type f_is_empty(const T &x)
Enable_If< Is_Singleton< T >::value, Scalar_As_Interval_Info_Open >::type f_info(const T &, bool open)
Result Parma_Polyhedra_Library::check_result ( Result  r,
Rounding_Dir  dir 
)
inline
unsigned int Parma_Polyhedra_Library::clz ( unsigned int  u)
inline

Definition at line 143 of file compiler.hh.

References clz32(), and clz64().

Referenced by Parma_Polyhedra_Library::Implementation::last_one(), and msb_position().

143  {
144  assert(u != 0);
145 #if defined(__GNUC__)
146  return static_cast<unsigned int>(__builtin_clz(u));
147 #elif PPL_SIZEOF_INT == 4
148  return clz32(u);
149 #elif PPL_SIZEOF_INT == 8
150  return clz64(u);
151 #else
152  #error "Unsupported unsigned int size"
153 #endif
154 }
unsigned int clz64(uint64_t w)
Definition: compiler.hh:111
unsigned int clz32(uint32_t w)
Definition: compiler.hh:86
unsigned int Parma_Polyhedra_Library::clz ( unsigned long  ul)
inline

Definition at line 157 of file compiler.hh.

References clz32(), and clz64().

157  {
158  assert(ul != 0);
159 #if defined(__GNUC__)
160  return static_cast<unsigned int>(__builtin_clzl(ul));
161 #elif PPL_SIZEOF_LONG == 4
162  return clz32(ul);
163 #elif PPL_SIZEOF_LONG == 8
164  return clz64(ul);
165 #else
166  #error "Unsupported unsigned long size"
167 #endif
168 }
unsigned int clz64(uint64_t w)
Definition: compiler.hh:111
unsigned int clz32(uint32_t w)
Definition: compiler.hh:86
unsigned int Parma_Polyhedra_Library::clz ( unsigned long long  ull)
inline

Definition at line 171 of file compiler.hh.

References clz32(), and clz64().

171  {
172  assert(ull != 0);
173 #if defined(__GNUC__)
174  return static_cast<unsigned int>(__builtin_clzll(ull));
175 #elif PPL_SIZEOF_LONG_LONG == 4
176  return clz32(ull);
177 #elif PPL_SIZEOF_LONG_LONG == 8
178  return clz64(ull);
179 #else
180  #error "Unsupported unsigned long long size"
181 #endif
182 }
unsigned int clz64(uint64_t w)
Definition: compiler.hh:111
unsigned int clz32(uint32_t w)
Definition: compiler.hh:86
unsigned int Parma_Polyhedra_Library::clz32 ( uint32_t  w)
inline

Definition at line 86 of file compiler.hh.

Referenced by clz(), and clz64().

86  {
87  unsigned int r = 31;
88  if ((w & 0xffff0000U) != 0) {
89  w >>= 16;
90  r -= 16;
91  }
92  if ((w & 0xff00U) != 0) {
93  w >>= 8;
94  r -= 8;
95  }
96  if ((w & 0xf0U) != 0) {
97  w >>= 4;
98  r -= 4;
99  }
100  if ((w & 0xcU) != 0) {
101  w >>= 2;
102  r -= 2;
103  }
104  if ((w & 0x2U) != 0) {
105  r -= 1;
106  }
107  return r;
108 }
unsigned int Parma_Polyhedra_Library::clz64 ( uint64_t  w)
inline

Definition at line 111 of file compiler.hh.

References clz32().

Referenced by clz().

111  {
112  if ((w & 0xffffffff00000000ULL) == 0) {
113  return clz32(static_cast<uint32_t>(w)) + 32;
114  }
115  else {
116  return clz32(static_cast<uint32_t>(w >> 32));
117  }
118 }
unsigned int clz32(uint32_t w)
Definition: compiler.hh:86
int Parma_Polyhedra_Library::cmp ( const GMP_Integer x,
const GMP_Integer y 
)
related
void Parma_Polyhedra_Library::Coefficient_constants_finalize ( )

Finalizes the Coefficient constants.

Referenced by Parma_Polyhedra_Library::Init::~Init().

void Parma_Polyhedra_Library::Coefficient_constants_initialize ( )

Initializes the Coefficient constants.

Referenced by Parma_Polyhedra_Library::Init::Init().

Coefficient_traits::const_reference Parma_Polyhedra_Library::Coefficient_zero ( )

Returns a const reference to a Coefficient with value 0.

Referenced by Parma_Polyhedra_Library::Congruence_System::add_unit_rows_and_space_dimensions(), Parma_Polyhedra_Library::Congruence::affine_preimage(), Parma_Polyhedra_Library::Constraint_System::affine_preimage(), Parma_Polyhedra_Library::Linear_Expression_Impl< Row >::coefficient(), Parma_Polyhedra_Library::Grid::conversion(), Parma_Polyhedra_Library::Polyhedron::conversion(), Parma_Polyhedra_Library::CO_Tree::erase(), Parma_Polyhedra_Library::Grid::expand_space_dimension(), Parma_Polyhedra_Library::Polyhedron::expand_space_dimension(), Parma_Polyhedra_Library::Expression_Hide_Inhomo< T >::gcd(), Parma_Polyhedra_Library::Box< ITV >::generalized_affine_preimage(), Parma_Polyhedra_Library::Expression_Hide_Inhomo< T >::get(), Parma_Polyhedra_Library::Sparse_Row::get(), Parma_Polyhedra_Library::Grid_Generator::grid_line(), Parma_Polyhedra_Library::Expression_Hide_Inhomo< T >::inhomogeneous_term(), Parma_Polyhedra_Library::Linear_Expression::initialize(), Parma_Polyhedra_Library::CO_Tree::insert(), Parma_Polyhedra_Library::CO_Tree::insert_precise(), Parma_Polyhedra_Library::Grid_Generator::is_equivalent_to(), Parma_Polyhedra_Library::Polyhedron::modify_according_to_evolution(), Parma_Polyhedra_Library::Congruence::operator<<(), Parma_Polyhedra_Library::Constraint::operator<<(), Parma_Polyhedra_Library::Dense_Row::operator=(), Parma_Polyhedra_Library::Grid_Generator::parameter(), Parma_Polyhedra_Library::Linear_Expression_Impl< Row >::print(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), Parma_Polyhedra_Library::BD_Shape< T >::relation_with(), Parma_Polyhedra_Library::Grid_Generator::set_is_parameter(), and Parma_Polyhedra_Library::Grid::simplify().

int Parma_Polyhedra_Library::compare ( const Linear_Expression x,
const Linear_Expression y 
)
related

Definition at line 587 of file Linear_Expression_inlines.hh.

References Parma_Polyhedra_Library::Linear_Expression_Interface::compare(), and Parma_Polyhedra_Library::Linear_Expression::impl.

Referenced by Parma_Polyhedra_Library::Polyhedron::add_and_minimize(), Parma_Polyhedra_Library::Linear_System< Row >::add_universe_rows_and_space_dimensions(), Parma_Polyhedra_Library::Linear_System< Row >::back_substitute(), Parma_Polyhedra_Library::Polyhedron::BHRZ03_evolving_points(), Parma_Polyhedra_Library::Bit_Matrix::check_sorted(), Parma_Polyhedra_Library::Linear_System< Row >::check_sorted(), Parma_Polyhedra_Library::Grid_Generator::check_strong_normalized(), Parma_Polyhedra_Library::Generator::check_strong_normalized(), Parma_Polyhedra_Library::Constraint::check_strong_normalized(), Parma_Polyhedra_Library::Grid_Certificate::compare(), Parma_Polyhedra_Library::Constraint::compare(), Parma_Polyhedra_Library::Generator::compare(), Parma_Polyhedra_Library::Grid_Generator::compare(), Parma_Polyhedra_Library::Linear_Expression_Impl< Row >::compare(), Parma_Polyhedra_Library::Polyhedron::conversion(), Parma_Polyhedra_Library::Linear_System< Row >::insert(), Parma_Polyhedra_Library::Linear_System< Row >::insert_no_ok(), Parma_Polyhedra_Library::Linear_System< Row >::merge_rows_assign(), Parma_Polyhedra_Library::Bit_Matrix::Bit_Row_Less_Than::operator()(), Parma_Polyhedra_Library::Linear_System< Row >::Row_Less_Than::operator()(), and Parma_Polyhedra_Library::Linear_System< Row >::sort_pending_and_remove_duplicates().

587  {
588  return x.impl->compare(*y.impl);
589 }
template<typename FP_Interval_Type >
const FP_Interval_Type& Parma_Polyhedra_Library::compute_absolute_error ( const Floating_Point_Format  analyzed_format)
related

Definition at line 35 of file Float_templates.hh.

References Parma_Polyhedra_Library::float_ieee754_half::BASE, Parma_Polyhedra_Library::float_ieee754_single::BASE, Parma_Polyhedra_Library::float_ieee754_double::BASE, Parma_Polyhedra_Library::float_ibm_single::BASE, Parma_Polyhedra_Library::float_intel_double_extended::BASE, Parma_Polyhedra_Library::float_ieee754_quad::BASE, Parma_Polyhedra_Library::float_ieee754_half::EXPONENT_BIAS, Parma_Polyhedra_Library::float_ieee754_single::EXPONENT_BIAS, Parma_Polyhedra_Library::float_ieee754_double::EXPONENT_BIAS, Parma_Polyhedra_Library::float_ibm_single::EXPONENT_BIAS, Parma_Polyhedra_Library::float_intel_double_extended::EXPONENT_BIAS, Parma_Polyhedra_Library::float_ieee754_quad::EXPONENT_BIAS, GREATER_OR_EQUAL, i_constraint(), IBM_SINGLE, IEEE754_DOUBLE, IEEE754_HALF, IEEE754_QUAD, IEEE754_SINGLE, INTEL_DOUBLE_EXTENDED, LESS_OR_EQUAL, Parma_Polyhedra_Library::float_ieee754_half::MANTISSA_BITS, Parma_Polyhedra_Library::float_ieee754_single::MANTISSA_BITS, Parma_Polyhedra_Library::float_ieee754_double::MANTISSA_BITS, Parma_Polyhedra_Library::float_ibm_single::MANTISSA_BITS, Parma_Polyhedra_Library::float_intel_double_extended::MANTISSA_BITS, Parma_Polyhedra_Library::float_ieee754_quad::MANTISSA_BITS, and msb_position().

36  {
37  typedef typename FP_Interval_Type::boundary_type analyzer_format;
38 
39  // FIXME: check if initializing caches with EMPTY is better.
40  static const FP_Interval_Type ZERO_INTERVAL = FP_Interval_Type(0);
41  // Cached results for each different analyzed format.
42  static FP_Interval_Type ieee754_half_result = ZERO_INTERVAL;
43  static FP_Interval_Type ieee754_single_result = ZERO_INTERVAL;
44  static FP_Interval_Type ieee754_double_result = ZERO_INTERVAL;
45  static FP_Interval_Type ibm_single_result = ZERO_INTERVAL;
46  static FP_Interval_Type ieee754_quad_result = ZERO_INTERVAL;
47  static FP_Interval_Type intel_double_extended_result = ZERO_INTERVAL;
48 
49  FP_Interval_Type* to_compute = NULL;
50  // Get the necessary information on the analyzed's format.
51  unsigned int f_base;
52  int f_exponent_bias;
53  unsigned int f_mantissa_bits;
54  switch (analyzed_format) {
55  case IEEE754_HALF:
56  if (ieee754_half_result != ZERO_INTERVAL) {
57  return ieee754_half_result;
58  }
59  to_compute = &ieee754_half_result;
60  f_base = float_ieee754_half::BASE;
61  f_exponent_bias = float_ieee754_half::EXPONENT_BIAS;
62  f_mantissa_bits = float_ieee754_half::MANTISSA_BITS;
63  break;
64  case IEEE754_SINGLE:
65  if (ieee754_single_result != ZERO_INTERVAL) {
66  return ieee754_single_result;
67  }
68 
69  to_compute = &ieee754_single_result;
70  f_base = float_ieee754_single::BASE;
71  f_exponent_bias = float_ieee754_single::EXPONENT_BIAS;
72  f_mantissa_bits = float_ieee754_single::MANTISSA_BITS;
73  break;
74  case IEEE754_DOUBLE:
75  if (ieee754_double_result != ZERO_INTERVAL) {
76  return ieee754_double_result;
77  }
78 
79  to_compute = &ieee754_double_result;
80  f_base = float_ieee754_double::BASE;
81  f_exponent_bias = float_ieee754_double::EXPONENT_BIAS;
82  f_mantissa_bits = float_ieee754_double::MANTISSA_BITS;
83  break;
84  case IBM_SINGLE:
85  if (ibm_single_result != ZERO_INTERVAL) {
86  return ibm_single_result;
87  }
88 
89  to_compute = &ibm_single_result;
90  f_base = float_ibm_single::BASE;
91  f_exponent_bias = float_ibm_single::EXPONENT_BIAS;
92  f_mantissa_bits = float_ibm_single::MANTISSA_BITS;
93  break;
94  case IEEE754_QUAD:
95  if (ieee754_quad_result != ZERO_INTERVAL) {
96  return ieee754_quad_result;
97  }
98 
99  to_compute = &ieee754_quad_result;
100  f_base = float_ieee754_quad::BASE;
101  f_exponent_bias = float_ieee754_quad::EXPONENT_BIAS;
102  f_mantissa_bits = float_ieee754_quad::MANTISSA_BITS;
103  break;
105  if (intel_double_extended_result != ZERO_INTERVAL) {
106  return intel_double_extended_result;
107  }
108 
109  to_compute = &intel_double_extended_result;
110  f_base = float_intel_double_extended::BASE;
111  f_exponent_bias = float_intel_double_extended::EXPONENT_BIAS;
112  f_mantissa_bits = float_intel_double_extended::MANTISSA_BITS;
113  break;
114  default:
115  PPL_UNREACHABLE;
116  break;
117  }
118 
119  PPL_ASSERT(to_compute != NULL);
120 
121  // We assume that f_base is a power of 2.
122  analyzer_format omega;
123  int power = static_cast<int>(msb_position(f_base))
124  * ((1 - f_exponent_bias) - static_cast<int>(f_mantissa_bits));
125  omega = std::max(static_cast<analyzer_format>(ldexp(1.0, power)),
126  std::numeric_limits<analyzer_format>::denorm_min());
127 
128  to_compute->build(i_constraint(GREATER_OR_EQUAL, -omega),
129  i_constraint(LESS_OR_EQUAL, omega));
130  return *to_compute;
131 }
I_Constraint< T > i_constraint(I_Constraint_Rel rel, const T &v)
IEEE 754 half precision, 16 bits (5 exponent, 10 mantissa).
IEEE 754 quad precision, 128 bits (15 exponent, 112 mantissa).
IBM single precision, 32 bits (7 exponent, 24 mantissa).
unsigned int msb_position(unsigned long long v)
If v is nonzero, returns the position of the most significant bit in a.
Intel double extended precision, 80 bits (15 exponent, 64 mantissa)
IEEE 754 double precision, 64 bits (11 exponent, 52 mantissa).
IEEE 754 single precision, 32 bits (8 exponent, 23 mantissa).
dimension_type Parma_Polyhedra_Library::compute_capacity ( dimension_type  requested_size,
dimension_type  maximum_size 
)
inline

Speculative allocation function.

Returns
The actual capacity to be allocated.
Parameters
requested_sizeThe number of elements we need.
maximum_sizeThe maximum number of elements to be allocated. It is assumed to be no less than requested_size.

Computes a capacity given a requested size. Allows for speculative allocation aimed at reducing the number of reallocations enough to guarantee amortized constant insertion time for our vector-like data structures. In all cases, the speculative allocation will not exceed maximum_size.

Definition at line 90 of file globals_inlines.hh.

Referenced by Parma_Polyhedra_Library::MIP_Problem::add_constraint_helper(), Parma_Polyhedra_Library::Bit_Matrix::add_recycled_row(), Parma_Polyhedra_Library::Dense_Row::add_zeroes_and_shift(), Parma_Polyhedra_Library::DB_Row< T >::DB_Row(), Parma_Polyhedra_Library::Linear_Form< C >::extend(), Parma_Polyhedra_Library::DB_Matrix< T >::grow(), Parma_Polyhedra_Library::Linear_Form< C >::Linear_Form(), Parma_Polyhedra_Library::Linear_System< Row >::merge_rows_assign(), Parma_Polyhedra_Library::DB_Matrix< T >::operator=(), Parma_Polyhedra_Library::OR_Matrix< T >::operator=(), Parma_Polyhedra_Library::Swapping_Vector< T >::reserve(), Parma_Polyhedra_Library::Bit_Matrix::resize(), Parma_Polyhedra_Library::DB_Matrix< T >::resize_no_copy(), and Parma_Polyhedra_Library::Polyhedron::simplify().

91  {
92  assert(requested_size <= maximum_size);
93  // Speculation factor 2.
94  return (requested_size < maximum_size/2)
95  ? (2*(requested_size + 1))
96  : maximum_size;
97  // Speculation factor 1.5.
98  // return (maximum_size - requested_size > requested_size/2)
99  // ? requested_size + requested_size/2 + 1
100  // : maximum_size;
101 }
template<typename To , typename From >
Enable_If<Is_Native_Or_Checked<To>::value && Is_Special<From>::value, Result>::type Parma_Polyhedra_Library::construct ( To &  to,
const From &  ,
Rounding_Dir  dir 
)
related
unsigned int Parma_Polyhedra_Library::ctz ( unsigned int  u)
inline

Definition at line 186 of file compiler.hh.

References ctz32(), and ctz64().

Referenced by Parma_Polyhedra_Library::Implementation::first_one().

186  {
187  assert(u != 0);
188 #if defined(__GNUC__)
189  return static_cast<unsigned int>(__builtin_ctz(u));
190 #elif PPL_SIZEOF_INT == 4
191  return ctz32(u);
192 #elif PPL_SIZEOF_INT == 8
193  return ctz64(u);
194 #else
195  #error "Unsupported unsigned int size"
196 #endif
197 }
unsigned int ctz32(uint32_t w)
Definition: compiler.hh:121
unsigned int ctz64(uint64_t w)
Definition: compiler.hh:131
unsigned int Parma_Polyhedra_Library::ctz ( unsigned long  ul)
inline

Definition at line 200 of file compiler.hh.

References ctz32(), and ctz64().

200  {
201  assert(ul != 0);
202 #if defined(__GNUC__)
203  return static_cast<unsigned int>(__builtin_ctzl(ul));
204 #elif PPL_SIZEOF_LONG == 4
205  return ctz32(ul);
206 #elif PPL_SIZEOF_LONG == 8
207  return ctz64(ul);
208 #else
209  #error "Unsupported unsigned long size"
210 #endif
211 }
unsigned int ctz32(uint32_t w)
Definition: compiler.hh:121
unsigned int ctz64(uint64_t w)
Definition: compiler.hh:131
unsigned int Parma_Polyhedra_Library::ctz ( unsigned long long  ull)
inline

Definition at line 214 of file compiler.hh.

References ctz32(), and ctz64().

214  {
215  assert(ull != 0);
216 #if defined(__GNUC__)
217  return static_cast<unsigned int>(__builtin_ctzll(ull));
218 #elif PPL_SIZEOF_LONG_LONG == 4
219  return ctz32(ull);
220 #elif PPL_SIZEOF_LONG_LONG == 8
221  return ctz64(ull);
222 #else
223  #error "Unsupported unsigned long long size"
224 #endif
225 }
unsigned int ctz32(uint32_t w)
Definition: compiler.hh:121
unsigned int ctz64(uint64_t w)
Definition: compiler.hh:131
unsigned int Parma_Polyhedra_Library::ctz32 ( uint32_t  w)
inline

Definition at line 121 of file compiler.hh.

Referenced by ctz(), and ctz64().

121  {
122  static const unsigned int mod37_table[] = {
123  32, 0, 1, 26, 2, 23, 27, 0, 3, 16, 24, 30, 28, 11, 0, 13,
124  4, 7, 17, 0, 25, 22, 31, 15, 29, 10, 12, 6, 0, 21, 14, 9,
125  5, 20, 8, 19, 18
126  };
127  return mod37_table[(w & -w) % 37];
128 }
unsigned int Parma_Polyhedra_Library::ctz64 ( uint64_t  w)
inline

Definition at line 131 of file compiler.hh.

References ctz32().

Referenced by ctz().

131  {
132  if ((w & 0x00000000ffffffffULL) == 0) {
133  return ctz32(static_cast<uint32_t>(w >> 32)) + 32;
134  }
135  else {
136  return ctz32(static_cast<uint32_t>(w));
137  }
138 }
unsigned int ctz32(uint32_t w)
Definition: compiler.hh:121
template<typename FP_Interval_Type >
void Parma_Polyhedra_Library::discard_occurrences ( std::map< dimension_type, Linear_Form< FP_Interval_Type > > &  lf_store,
Variable  var 
)
related

Definition at line 135 of file Float_templates.hh.

Referenced by affine_form_image().

137  {
138  typedef Linear_Form<FP_Interval_Type> FP_Linear_Form;
139  typedef typename std::map<dimension_type, FP_Linear_Form>::iterator Iter;
140  for (Iter i = lf_store.begin(); i != lf_store.end(); ) {
141  if ((i->second).coefficient(var) != 0) {
142  i = lf_store.erase(i);
143  }
144  else {
145  ++i;
146  }
147  }
148 }
void Parma_Polyhedra_Library::div_2exp_assign ( GMP_Integer x,
const GMP_Integer y,
unsigned int  exp 
)
related

Definition at line 90 of file GMP_Integer_inlines.hh.

90  {
91  mpz_tdiv_q_2exp(x.get_mpz_t(), y.get_mpz_t(), exp);
92 }
template<typename T >
Enable_If< Is_Native_Or_Checked< T >::value, void >::type Parma_Polyhedra_Library::div_round_up ( T &  to,
Coefficient_traits::const_reference  x,
Coefficient_traits::const_reference  y 
)
inline

Divides x by y into to, rounding the result towards plus infinity.

Definition at line 65 of file math_utilities_inlines.hh.

References assign_r(), PPL_DIRTY_TEMP, ROUND_NOT_NEEDED, and ROUND_UP.

Referenced by Parma_Polyhedra_Library::BD_Shape< T >::add_constraint(), Parma_Polyhedra_Library::Octagonal_Shape< T >::add_constraint(), Parma_Polyhedra_Library::BD_Shape< T >::add_dbm_constraint(), Parma_Polyhedra_Library::Octagonal_Shape< T >::add_octagonal_constraint(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::BD_Shape(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::get_limiting_octagon(), Parma_Polyhedra_Library::BD_Shape< T >::get_limiting_shape(), Parma_Polyhedra_Library::Octagonal_Shape< T >::Octagonal_Shape(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine(), Parma_Polyhedra_Library::BD_Shape< T >::refine(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine_no_check(), and Parma_Polyhedra_Library::BD_Shape< T >::refine_no_check().

67  {
68  PPL_DIRTY_TEMP(mpq_class, q_x);
69  PPL_DIRTY_TEMP(mpq_class, q_y);
70  // Note: this code assumes that a Coefficient is always convertible
71  // to an mpq_class without loss of precision.
72  assign_r(q_x, x, ROUND_NOT_NEEDED);
73  assign_r(q_y, y, ROUND_NOT_NEEDED);
74  div_assign_r(q_x, q_x, q_y, ROUND_NOT_NEEDED);
75  assign_r(to, q_x, ROUND_UP);
76 }
Enable_If< Is_Native_Or_Checked< To >::value &&Is_Special< From >::value, Result >::type assign_r(To &to, const From &x, Rounding_Dir dir)
#define PPL_DIRTY_TEMP(T, id)
void Parma_Polyhedra_Library::exact_div_assign ( GMP_Integer x,
const GMP_Integer y,
const GMP_Integer z 
)
related

Definition at line 95 of file GMP_Integer_inlines.hh.

95  {
96  PPL_ASSERT(y % z == 0);
97  mpz_divexact(x.get_mpz_t(), y.get_mpz_t(), z.get_mpz_t());
98 }
template<typename T , typename Policy >
void Parma_Polyhedra_Library::exact_div_assign ( Checked_Number< T, Policy > &  x,
const Checked_Number< T, Policy > &  y,
const Checked_Number< T, Policy > &  z 
)
related

Definition at line 713 of file Checked_Number_inlines.hh.

References ROUND_NOT_NEEDED.

Referenced by Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::Artificial_Parameter(), Parma_Polyhedra_Library::PIP_Tree_Node::compatibility_check(), Parma_Polyhedra_Library::MIP_Problem::compute_generator(), Parma_Polyhedra_Library::Grid::conversion(), Parma_Polyhedra_Library::Polyhedron::convert_to_integer_expression(), Parma_Polyhedra_Library::Polyhedron::convert_to_integer_expressions(), Parma_Polyhedra_Library::Linear_Expression_Impl< Row >::exact_div_assign(), Parma_Polyhedra_Library::Grid::frequency_no_check(), Parma_Polyhedra_Library::MIP_Problem::get_exiting_base_index(), Parma_Polyhedra_Library::Grid::Grid(), Parma_Polyhedra_Library::Generator::is_matching_closure_point(), Parma_Polyhedra_Library::Box< ITV >::max_min(), Parma_Polyhedra_Library::Grid::max_min(), Parma_Polyhedra_Library::Dense_Row::normalize(), Parma_Polyhedra_Library::PIP_Solution_Node::Tableau::normalize(), Parma_Polyhedra_Library::Sparse_Row::normalize(), normalize2(), Parma_Polyhedra_Library::Congruence_System::normalize_moduli(), Parma_Polyhedra_Library::Grid::reduce_congruence_with_equality(), Parma_Polyhedra_Library::Grid::reduce_equality_with_equality(), Parma_Polyhedra_Library::Grid::reduce_line_with_line(), Parma_Polyhedra_Library::Grid::reduce_parameter_with_line(), Parma_Polyhedra_Library::Grid::reduce_pc_with_pc(), Parma_Polyhedra_Library::Grid_Generator::scale_to_divisor(), Parma_Polyhedra_Library::PIP_Solution_Node::solve(), and Parma_Polyhedra_Library::MIP_Problem::steepest_edge_exact_entering_index().

715  {
716  Policy::handle_result(div_assign_r(x, y, z, ROUND_NOT_NEEDED));
717 }
template<typename T >
Enable_If< Is_Native< T >::value, memory_size_type >::type Parma_Polyhedra_Library::external_memory_in_bytes ( const T &  )
inline

For native types, returns the size in bytes of the memory managed by the type of the (unused) parameter, i.e., 0.

Definition at line 106 of file globals_inlines.hh.

Referenced by Parma_Polyhedra_Library::Pointset_Ask_Tell< PSET >::external_memory_in_bytes(), Parma_Polyhedra_Library::Congruence::external_memory_in_bytes(), Parma_Polyhedra_Library::Checked_Number< T, Policy >::external_memory_in_bytes(), Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::external_memory_in_bytes(), Parma_Polyhedra_Library::Dense_Row::external_memory_in_bytes(), Parma_Polyhedra_Library::DB_Row_Impl_Handler< T >::Impl::external_memory_in_bytes(), external_memory_in_bytes(), Parma_Polyhedra_Library::PIP_Solution_Node::Tableau::external_memory_in_bytes(), Parma_Polyhedra_Library::Interval< Boundary, Info >::external_memory_in_bytes(), Parma_Polyhedra_Library::CO_Tree::external_memory_in_bytes(), Parma_Polyhedra_Library::Pointset_Powerset< PSET >::external_memory_in_bytes(), Parma_Polyhedra_Library::Pointset_Ask_Tell< PSET >::total_memory_in_bytes(), Parma_Polyhedra_Library::Determinate< PSET >::total_memory_in_bytes(), Parma_Polyhedra_Library::Powerset< D >::total_memory_in_bytes(), Parma_Polyhedra_Library::DB_Matrix< T >::total_memory_in_bytes(), Parma_Polyhedra_Library::DB_Row< T >::total_memory_in_bytes(), Parma_Polyhedra_Library::Linear_Expression_Impl< Row >::total_memory_in_bytes(), Parma_Polyhedra_Library::Linear_Form< C >::total_memory_in_bytes(), Parma_Polyhedra_Library::Matrix< Row >::total_memory_in_bytes(), Parma_Polyhedra_Library::DB_Row_Impl_Handler< T >::Impl::total_memory_in_bytes(), Parma_Polyhedra_Library::Linear_System< Row >::total_memory_in_bytes(), total_memory_in_bytes(), Parma_Polyhedra_Library::Interval< Boundary, Info >::total_memory_in_bytes(), Parma_Polyhedra_Library::Pointset_Powerset< PSET >::total_memory_in_bytes(), Parma_Polyhedra_Library::PIP_Problem::total_memory_in_bytes(), Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::total_memory_in_bytes(), Parma_Polyhedra_Library::Box< ITV >::total_memory_in_bytes(), Parma_Polyhedra_Library::Octagonal_Shape< T >::total_memory_in_bytes(), and Parma_Polyhedra_Library::BD_Shape< T >::total_memory_in_bytes().

106  {
107  return 0;
108 }
memory_size_type Parma_Polyhedra_Library::external_memory_in_bytes ( const mpz_class &  x)
inline

Returns the size in bytes of the memory managed by x.

Definition at line 118 of file globals_inlines.hh.

118  {
119  return static_cast<memory_size_type>(x.get_mpz_t()[0]._mp_alloc)
120  * PPL_SIZEOF_MP_LIMB_T;
121 }
size_t memory_size_type
An unsigned integral type for representing memory size in bytes.
memory_size_type Parma_Polyhedra_Library::external_memory_in_bytes ( const mpq_class &  x)
inline

Returns the size in bytes of the memory managed by x.

Definition at line 129 of file globals_inlines.hh.

References external_memory_in_bytes().

129  {
130  return external_memory_in_bytes(x.get_num())
131  + external_memory_in_bytes(x.get_den());
132 }
memory_size_type external_memory_in_bytes(const Checked_Number< T, Policy > &x)
Returns the size in bytes of the memory managed by x.
template<typename Boundary , typename Info >
bool Parma_Polyhedra_Library::f_is_empty ( const Interval< Boundary, Info > &  x)
inline

Definition at line 53 of file Interval_inlines.hh.

References Parma_Polyhedra_Library::Interval< Boundary, Info >::is_empty().

Referenced by check_empty_arg().

53  {
54  return x.is_empty();
55 }
template<typename Boundary , typename Info >
bool Parma_Polyhedra_Library::f_is_singleton ( const Interval< Boundary, Info > &  x)
inline
int Parma_Polyhedra_Library::fpu_check_inexact ( )
inline

Queries the inexact computation status.

Returns 0 if the computation was definitely exact, 1 if it was definitely inexact, -1 if definite exactness information is unavailable.

Definition at line 190 of file fpu-ia32_inlines.hh.

References fpu_get_status(), FPU_INEXACT, and SSE_INEXACT.

Referenced by maybe_check_fpu_inexact(), Parma_Polyhedra_Library::Checked::prepare_inexact(), and Parma_Polyhedra_Library::Checked::result_relation().

190  {
191 #ifdef PPL_FPMATH_MAY_USE_387
192  if (fpu_get_status() & FPU_INEXACT) {
193  return 1;
194  }
195 #endif
196 #ifdef PPL_FPMATH_MAY_USE_SSE
197  extern bool have_sse_unit;
198  if (have_sse_unit && (sse_get_control() & SSE_INEXACT)) {
199  return 1;
200  }
201 #endif
202  return 0;
203 }
#define SSE_INEXACT
#define FPU_INEXACT
void Parma_Polyhedra_Library::fpu_clear_exceptions ( )
inline

Definition at line 105 of file fpu-ia32_inlines.hh.

Referenced by fpu_reset_inexact().

105  {
106  __asm__ __volatile__ ("fnclex" : /* No outputs. */ : : "memory");
107 }
void Parma_Polyhedra_Library::fpu_clear_status ( unsigned short  bits)
inline

Definition at line 96 of file fpu-ia32_inlines.hh.

References Parma_Polyhedra_Library::ia32_fenv_t::status_word.

96  {
97  /* There is no fldsw instruction */
98  ia32_fenv_t env;
99  __asm__ __volatile__ ("fnstenv %0" : "=m" (env));
100  env.status_word = static_cast<unsigned short>(env.status_word & ~bits);
101  __asm__ __volatile__ ("fldenv %0" : : "m" (env) : "memory");
102 }
int Parma_Polyhedra_Library::fpu_get_control ( )
inline

Definition at line 76 of file fpu-ia32_inlines.hh.

Referenced by fpu_get_rounding_direction().

76  {
77  unsigned short cw;
78  __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw) : : "memory");
79  return cw;
80 }
fpu_rounding_direction_type Parma_Polyhedra_Library::fpu_get_rounding_direction ( )
inline

Returns the current FPU rounding direction.

Definition at line 132 of file fpu-ia32_inlines.hh.

References fpu_get_control(), and FPU_ROUNDING_MASK.

Referenced by Parma_Polyhedra_Library::Init::Init().

132  {
134 }
#define FPU_ROUNDING_MASK
int Parma_Polyhedra_Library::fpu_get_status ( )
inline

Definition at line 89 of file fpu-ia32_inlines.hh.

Referenced by fpu_check_inexact().

89  {
90  unsigned short sw;
91  __asm__ __volatile__ ("fnstsw %0" : "=a" (sw) : : "memory");
92  return sw;
93 }
void Parma_Polyhedra_Library::fpu_initialize_control_functions ( )
inline

Initializes the FPU control functions.

Definition at line 124 of file fpu-ia32_inlines.hh.

Referenced by Parma_Polyhedra_Library::Init::Init().

124  {
125 #ifdef PPL_FPMATH_MAY_USE_SSE
126  extern void detect_sse_unit();
127  detect_sse_unit();
128 #endif
129 }
void Parma_Polyhedra_Library::fpu_reset_inexact ( )
inline

Clears the inexact computation status.

Definition at line 162 of file fpu-ia32_inlines.hh.

References fpu_clear_exceptions(), and PPL_SSE_CONTROL_DEFAULT.

Referenced by maybe_reset_fpu_inexact(), and Parma_Polyhedra_Library::Checked::prepare_inexact().

162  {
163 #ifdef PPL_FPMATH_MAY_USE_387
165 #endif
166 #ifdef PPL_FPMATH_MAY_USE_SSE
167  // NOTE: on entry to this function the current rounding mode
168  // has to be the default one.
169  extern bool have_sse_unit;
170  if (have_sse_unit) {
171  sse_set_control(PPL_SSE_CONTROL_DEFAULT);
172  }
173 #endif
174 }
#define PPL_SSE_CONTROL_DEFAULT
void Parma_Polyhedra_Library::fpu_restore_rounding_direction ( int  )
inline

Definition at line 62 of file fpu-none_inlines.hh.

62  {
63  throw std::logic_error("PPL::fpu_restore_rounding_direction():"
64  " cannot control the FPU");
65 }
int Parma_Polyhedra_Library::fpu_save_rounding_direction ( int  )
inline

Definition at line 50 of file fpu-none_inlines.hh.

50  {
51  throw std::logic_error("PPL::fpu_save_rounding_direction():"
52  " cannot control the FPU");
53 }
fpu_rounding_control_word_type Parma_Polyhedra_Library::fpu_save_rounding_direction ( fpu_rounding_direction_type  dir)
inline

Sets the FPU rounding direction to dir and returns the rounding control word previously in use.

Definition at line 149 of file fpu-ia32_inlines.hh.

References fpu_set_control(), PPL_FPU_CONTROL_DEFAULT_BASE, and PPL_SSE_CONTROL_DEFAULT_BASE.

Referenced by Parma_Polyhedra_Library::Checked::add_float(), Parma_Polyhedra_Library::Checked::add_mul_float(), Parma_Polyhedra_Library::Checked::assign_float_float_inexact(), Parma_Polyhedra_Library::Checked::assign_float_int_inexact(), Parma_Polyhedra_Library::Checked::ceil_float(), Parma_Polyhedra_Library::Checked::div_float(), Parma_Polyhedra_Library::Checked::floor_float(), Parma_Polyhedra_Library::Checked::mul_float(), Parma_Polyhedra_Library::Checked::sqrt_float(), Parma_Polyhedra_Library::Checked::sub_float(), and Parma_Polyhedra_Library::Checked::sub_mul_float().

149  {
150 #ifdef PPL_FPMATH_MAY_USE_387
152 #endif
153 #ifdef PPL_FPMATH_MAY_USE_SSE
154  extern bool have_sse_unit;
155  if (have_sse_unit)
156  sse_set_control(PPL_SSE_CONTROL_DEFAULT_BASE | (dir << 3));
157 #endif
158  return static_cast<fpu_rounding_control_word_type>(0);
159 }
#define PPL_FPU_CONTROL_DEFAULT_BASE
#define PPL_SSE_CONTROL_DEFAULT_BASE
fpu_rounding_control_word_type Parma_Polyhedra_Library::fpu_save_rounding_direction_reset_inexact ( fpu_rounding_direction_type  dir)

Sets the FPU rounding direction to dir, clears the inexact computation status, and returns the rounding control word previously in use.

void Parma_Polyhedra_Library::fpu_set_control ( int  c)
inline

Definition at line 83 of file fpu-ia32_inlines.hh.

References c.

Referenced by fpu_restore_rounding_direction(), fpu_save_rounding_direction(), and fpu_set_rounding_direction().

83  {
84  unsigned short cw = static_cast<unsigned short>(c);
85  __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw) : "memory");
86 }
Coefficient c
Definition: PIP_Tree.cc:64
void Parma_Polyhedra_Library::fpu_set_rounding_direction ( int  )
inline

Definition at line 44 of file fpu-none_inlines.hh.

44  {
45  throw std::logic_error("PPL::fpu_set_rounding_direction():"
46  " cannot control the FPU");
47 }
void Parma_Polyhedra_Library::fpu_set_rounding_direction ( fpu_rounding_direction_type  dir)
inline

Sets the FPU rounding direction to dir.

Definition at line 137 of file fpu-ia32_inlines.hh.

References fpu_set_control(), PPL_FPU_CONTROL_DEFAULT_BASE, and PPL_SSE_CONTROL_DEFAULT_BASE.

Referenced by Parma_Polyhedra_Library::Init::Init(), restore_pre_PPL_rounding(), set_rounding_for_PPL(), and Parma_Polyhedra_Library::Init::~Init().

137  {
138 #ifdef PPL_FPMATH_MAY_USE_387
140 #endif
141 #ifdef PPL_FPMATH_MAY_USE_SSE
142  extern bool have_sse_unit;
143  if (have_sse_unit)
144  sse_set_control(PPL_SSE_CONTROL_DEFAULT_BASE | (dir << 3));
145 #endif
146 }
#define PPL_FPU_CONTROL_DEFAULT_BASE
#define PPL_SSE_CONTROL_DEFAULT_BASE
void Parma_Polyhedra_Library::gcd_assign ( GMP_Integer x,
const GMP_Integer y,
const GMP_Integer z 
)
related
void Parma_Polyhedra_Library::gcdext_assign ( GMP_Integer x,
GMP_Integer s,
GMP_Integer t,
const GMP_Integer y,
const GMP_Integer z 
)
related

Definition at line 62 of file GMP_Integer_inlines.hh.

Referenced by Parma_Polyhedra_Library::Grid::reduce_pc_with_pc().

63  {
64  mpz_gcdext(x.get_mpz_t(),
65  s.get_mpz_t(), t.get_mpz_t(),
66  y.get_mpz_t(), z.get_mpz_t());
67 }
int32_t Parma_Polyhedra_Library::hash_code_from_dimension ( dimension_type  dim)
inline
template<typename T >
I_Constraint<T> Parma_Polyhedra_Library::i_constraint ( I_Constraint_Rel  rel,
const T &  v,
bool  force 
)
inline

Definition at line 449 of file intervals_defs.hh.

449  {
450  return I_Constraint<T>(rel, v, force);
451 }
template<typename T >
I_Constraint<T> Parma_Polyhedra_Library::i_constraint ( I_Constraint_Rel  rel,
T &  v 
)
inline

Definition at line 455 of file intervals_defs.hh.

455  {
456  return I_Constraint<T>(rel, v);
457 }
template<typename T , typename Val_Or_Ref_Criteria >
I_Constraint<T, Val_Or_Ref_Criteria> Parma_Polyhedra_Library::i_constraint ( I_Constraint_Rel  rel,
const T &  v,
const Val_Or_Ref_Criteria &   
)
inline

Definition at line 461 of file intervals_defs.hh.

461  {
462  return I_Constraint<T, Val_Or_Ref_Criteria>(rel, v);
463 }
template<typename T , typename Val_Or_Ref_Criteria >
I_Constraint<T, Val_Or_Ref_Criteria> Parma_Polyhedra_Library::i_constraint ( I_Constraint_Rel  rel,
const T &  v,
bool  force,
const Val_Or_Ref_Criteria &   
)
inline

Definition at line 467 of file intervals_defs.hh.

468  {
469  return I_Constraint<T, Val_Or_Ref_Criteria>(rel, v, force);
470 }
template<typename T , typename Val_Or_Ref_Criteria >
I_Constraint<T, Val_Or_Ref_Criteria> Parma_Polyhedra_Library::i_constraint ( I_Constraint_Rel  rel,
T &  v,
const Val_Or_Ref_Criteria &   
)
inline

Definition at line 474 of file intervals_defs.hh.

474  {
475  return I_Constraint<T, Val_Or_Ref_Criteria>(rel, v);
476 }
template<typename Boundary , typename Info >
int Parma_Polyhedra_Library::infinity_sign ( const Interval< Boundary, Info > &  x)
inline

Definition at line 63 of file Interval_inlines.hh.

References Parma_Polyhedra_Library::Interval< Boundary, Info >::infinity_sign().

63  {
64  return x.infinity_sign();
65 }
template<typename T >
Enable_If<Is_Native_Or_Checked<T>::value, int>::type Parma_Polyhedra_Library::infinity_sign ( const T &  x)
related
void Parma_Polyhedra_Library::initialize ( )
inline

Initializes the library.

Definition at line 52 of file initializer.hh.

References Parma_Polyhedra_Library::Implementation::initialize_aux().

Referenced by Parma_Polyhedra_Library::Init::Init().

52  {
53 #ifdef PPL_NO_AUTOMATIC_INITIALIZATION
55 #endif
56 }
template<typename ITV >
Poly_Con_Relation Parma_Polyhedra_Library::interval_relation ( const ITV &  i,
const Constraint::Type  constraint_type,
Coefficient_traits::const_reference  numer,
Coefficient_traits::const_reference  denom = Coefficient_one() 
)

Returns the relations holding between an interval and an interval constraint.

Parameters
iThe interval;
constraint_typeThe constraint type;
numerThe numerator of the constraint bound;
denomThe denominator of the constraint bound

The interval constraint has the form denom * Variable(0) relsym numer where relsym is ==, > or >= depending on the constraint_type.

Definition at line 645 of file Box_templates.hh.

References assign_r(), Parma_Polyhedra_Library::Constraint::EQUALITY, Parma_Polyhedra_Library::Poly_Con_Relation::is_disjoint(), Parma_Polyhedra_Library::Poly_Con_Relation::is_included(), Parma_Polyhedra_Library::Constraint::NONSTRICT_INEQUALITY, Parma_Polyhedra_Library::Poly_Con_Relation::nothing(), PPL_DIRTY_TEMP, ROUND_NOT_NEEDED, Parma_Polyhedra_Library::Poly_Con_Relation::saturates(), Parma_Polyhedra_Library::Boundary_NS::sgn(), Parma_Polyhedra_Library::Constraint::STRICT_INEQUALITY, and Parma_Polyhedra_Library::Poly_Con_Relation::strictly_intersects().

Referenced by Parma_Polyhedra_Library::Box< ITV >::get_limiting_box(), and Parma_Polyhedra_Library::Box< ITV >::relation_with().

648  {
649 
650  if (i.is_universe()) {
651  return Poly_Con_Relation::strictly_intersects();
652  }
653 
654  PPL_DIRTY_TEMP(mpq_class, bound);
655  assign_r(bound.get_num(), numer, ROUND_NOT_NEEDED);
656  assign_r(bound.get_den(), denom, ROUND_NOT_NEEDED);
657  bound.canonicalize();
658  neg_assign_r(bound, bound, ROUND_NOT_NEEDED);
659  const bool is_lower_bound = (denom > 0);
660 
661  PPL_DIRTY_TEMP(mpq_class, bound_diff);
662  if (constraint_type == Constraint::EQUALITY) {
663  if (i.lower_is_boundary_infinity()) {
664  PPL_ASSERT(!i.upper_is_boundary_infinity());
665  assign_r(bound_diff, i.upper(), ROUND_NOT_NEEDED);
666  sub_assign_r(bound_diff, bound_diff, bound, ROUND_NOT_NEEDED);
667  switch (sgn(bound_diff)) {
668  case 1:
669  return Poly_Con_Relation::strictly_intersects();
670  case 0:
671  return i.upper_is_open()
672  ? Poly_Con_Relation::is_disjoint()
673  : Poly_Con_Relation::strictly_intersects();
674  case -1:
675  return Poly_Con_Relation::is_disjoint();
676  }
677  }
678  else {
679  assign_r(bound_diff, i.lower(), ROUND_NOT_NEEDED);
680  sub_assign_r(bound_diff, bound_diff, bound, ROUND_NOT_NEEDED);
681  switch (sgn(bound_diff)) {
682  case 1:
683  return Poly_Con_Relation::is_disjoint();
684  case 0:
685  if (i.lower_is_open()) {
686  return Poly_Con_Relation::is_disjoint();
687  }
688  if (i.is_singleton()) {
689  return Poly_Con_Relation::is_included()
690  && Poly_Con_Relation::saturates();
691  }
692  return Poly_Con_Relation::strictly_intersects();
693  case -1:
694  if (i.upper_is_boundary_infinity()) {
695  return Poly_Con_Relation::strictly_intersects();
696  }
697  else {
698  assign_r(bound_diff, i.upper(), ROUND_NOT_NEEDED);
699  sub_assign_r(bound_diff, bound_diff, bound, ROUND_NOT_NEEDED);
700  switch (sgn(bound_diff)) {
701  case 1:
702  return Poly_Con_Relation::strictly_intersects();
703  case 0:
704  if (i.upper_is_open()) {
705  return Poly_Con_Relation::is_disjoint();
706  }
707  else {
708  return Poly_Con_Relation::strictly_intersects();
709  }
710  case -1:
711  return Poly_Con_Relation::is_disjoint();
712  }
713  }
714  }
715  }
716  }
717 
718  PPL_ASSERT(constraint_type != Constraint::EQUALITY);
719  if (is_lower_bound) {
720  if (i.lower_is_boundary_infinity()) {
721  PPL_ASSERT(!i.upper_is_boundary_infinity());
722  assign_r(bound_diff, i.upper(), ROUND_NOT_NEEDED);
723  sub_assign_r(bound_diff, bound_diff, bound, ROUND_NOT_NEEDED);
724  switch (sgn(bound_diff)) {
725  case 1:
726  return Poly_Con_Relation::strictly_intersects();
727  case 0:
728  if (constraint_type == Constraint::STRICT_INEQUALITY
729  || i.upper_is_open()) {
730  return Poly_Con_Relation::is_disjoint();
731  }
732  else {
733  return Poly_Con_Relation::strictly_intersects();
734  }
735  case -1:
736  return Poly_Con_Relation::is_disjoint();
737  }
738  }
739  else {
740  assign_r(bound_diff, i.lower(), ROUND_NOT_NEEDED);
741  sub_assign_r(bound_diff, bound_diff, bound, ROUND_NOT_NEEDED);
742  switch (sgn(bound_diff)) {
743  case 1:
744  return Poly_Con_Relation::is_included();
745  case 0:
746  if (constraint_type == Constraint::NONSTRICT_INEQUALITY
747  || i.lower_is_open()) {
748  Poly_Con_Relation result = Poly_Con_Relation::is_included();
749  if (i.is_singleton()) {
750  result = result && Poly_Con_Relation::saturates();
751  }
752  return result;
753  }
754  else {
755  PPL_ASSERT(constraint_type == Constraint::STRICT_INEQUALITY
756  && !i.lower_is_open());
757  if (i.is_singleton()) {
758  return Poly_Con_Relation::is_disjoint()
759  && Poly_Con_Relation::saturates();
760  }
761  else {
762  return Poly_Con_Relation::strictly_intersects();
763  }
764  }
765  case -1:
766  if (i.upper_is_boundary_infinity()) {
767  return Poly_Con_Relation::strictly_intersects();
768  }
769  else {
770  assign_r(bound_diff, i.upper(), ROUND_NOT_NEEDED);
771  sub_assign_r(bound_diff, bound_diff, bound, ROUND_NOT_NEEDED);
772  switch (sgn(bound_diff)) {
773  case 1:
774  return Poly_Con_Relation::strictly_intersects();
775  case 0:
776  if (constraint_type == Constraint::STRICT_INEQUALITY
777  || i.upper_is_open()) {
778  return Poly_Con_Relation::is_disjoint();
779  }
780  else {
781  return Poly_Con_Relation::strictly_intersects();
782  }
783  case -1:
784  return Poly_Con_Relation::is_disjoint();
785  }
786  }
787  }
788  }
789  }
790  else {
791  // `c' is an upper bound.
792  if (i.upper_is_boundary_infinity()) {
793  return Poly_Con_Relation::strictly_intersects();
794  }
795  else {
796  assign_r(bound_diff, i.upper(), ROUND_NOT_NEEDED);
797  sub_assign_r(bound_diff, bound_diff, bound, ROUND_NOT_NEEDED);
798  switch (sgn(bound_diff)) {
799  case -1:
800  return Poly_Con_Relation::is_included();
801  case 0:
802  if (constraint_type == Constraint::NONSTRICT_INEQUALITY
803  || i.upper_is_open()) {
804  Poly_Con_Relation result = Poly_Con_Relation::is_included();
805  if (i.is_singleton()) {
806  result = result && Poly_Con_Relation::saturates();
807  }
808  return result;
809  }
810  else {
811  PPL_ASSERT(constraint_type == Constraint::STRICT_INEQUALITY
812  && !i.upper_is_open());
813  if (i.is_singleton()) {
814  return Poly_Con_Relation::is_disjoint()
815  && Poly_Con_Relation::saturates();
816  }
817  else {
818  return Poly_Con_Relation::strictly_intersects();
819  }
820  }
821  case 1:
822  if (i.lower_is_boundary_infinity()) {
823  return Poly_Con_Relation::strictly_intersects();
824  }
825  else {
826  assign_r(bound_diff, i.lower(), ROUND_NOT_NEEDED);
827  sub_assign_r(bound_diff, bound_diff, bound, ROUND_NOT_NEEDED);
828  switch (sgn(bound_diff)) {
829  case -1:
830  return Poly_Con_Relation::strictly_intersects();
831  case 0:
832  if (constraint_type == Constraint::STRICT_INEQUALITY
833  || i.lower_is_open()) {
834  return Poly_Con_Relation::is_disjoint();
835  }
836  else {
837  return Poly_Con_Relation::strictly_intersects();
838  }
839  case 1:
840  return Poly_Con_Relation::is_disjoint();
841  }
842  }
843  }
844  }
845  }
846 
847  // Quiet a compiler warning: this program point is unreachable.
848  PPL_UNREACHABLE;
849  return Poly_Con_Relation::nothing();
850 }
Enable_If< Is_Native_Or_Checked< To >::value &&Is_Special< From >::value, Result >::type assign_r(To &to, const From &x, Rounding_Dir dir)
Enable_If< Is_Native_Or_Checked< From >::value, int >::type sgn(const From &x)
Returns , or depending on whether the value of x is negative, zero or positive, respectively...
#define PPL_DIRTY_TEMP(T, id)
unsigned Parma_Polyhedra_Library::irrational_precision ( )
inline

Returns the precision parameter used for irrational calculations.

Definition at line 535 of file checked_mpq_inlines.hh.

References Parma_Polyhedra_Library::Checked::irrational_precision.

535  {
537 }
unsigned irrational_precision()
Returns the precision parameter used for irrational calculations.
template<typename T >
Enable_If< Is_Native_Or_Checked< T >::value, bool >::type Parma_Polyhedra_Library::is_additive_inverse ( const T &  x,
const T &  y 
)
inline

Returns true if and only if $x = -y$.

Definition at line 104 of file math_utilities_inlines.hh.

References ROUND_DIRECT, ROUND_STRICT_RELATION, and V_EQ.

Referenced by Parma_Polyhedra_Library::Octagonal_Shape< T >::compute_leaders(), Parma_Polyhedra_Library::BD_Shape< T >::compute_predecessors(), Parma_Polyhedra_Library::Octagonal_Shape< T >::compute_successors(), Parma_Polyhedra_Library::BD_Shape< T >::constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::constraints(), Parma_Polyhedra_Library::BD_Shape< T >::frequency(), Parma_Polyhedra_Library::Octagonal_Shape< T >::frequency(), Parma_Polyhedra_Library::BD_Shape< T >::is_shortest_path_reduced(), Parma_Polyhedra_Library::Octagonal_Shape< T >::minimized_congruences(), Parma_Polyhedra_Library::BD_Shape< T >::operator<<(), Parma_Polyhedra_Library::Octagonal_Shape< T >::operator<<(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), Parma_Polyhedra_Library::BD_Shape< T >::relation_with(), Parma_Polyhedra_Library::Octagonal_Shape< T >::simplify_using_context_assign(), and Parma_Polyhedra_Library::Octagonal_Shape< T >::tight_coherence_would_make_empty().

104  {
105  T negated_x;
106  return neg_assign_r(negated_x, x, ROUND_DIRECT | ROUND_STRICT_RELATION) == V_EQ
107  && negated_x == y;
108 }
The computed result is exact.
Definition: Result_defs.hh:81
bool Parma_Polyhedra_Library::is_canonical ( const mpq_class &  x)
inline

Returns true if and only if x is in canonical form.

Definition at line 111 of file math_utilities_inlines.hh.

References PPL_DIRTY_TEMP.

Referenced by Parma_Polyhedra_Library::Box< ITV >::Box(), Parma_Polyhedra_Library::Polyhedron::contains_integer_point(), Parma_Polyhedra_Library::Box< ITV >::max_min(), and Parma_Polyhedra_Library::MIP_Problem::solve_mip().

111  {
112  if (x.get_den() <= 0) {
113  return false;
114  }
115  PPL_DIRTY_TEMP(mpq_class, temp);
116  temp = x;
117  temp.canonicalize();
118  return temp.get_num() == x.get_num();
119 }
#define PPL_DIRTY_TEMP(T, id)
template<typename T >
Enable_If< Is_Native_Or_Checked< T >::value, bool >::type Parma_Polyhedra_Library::is_even ( const T &  x)
inline
template<typename T >
Enable_If<Is_Native_Or_Checked<T>::value, bool>::type Parma_Polyhedra_Library::is_integer ( const T &  x)
related
bool Parma_Polyhedra_Library::is_less_precise_than ( Floating_Point_Format  f1,
Floating_Point_Format  f2 
)
related

Definition at line 513 of file Float_inlines.hh.

Referenced by Parma_Polyhedra_Library::Concrete_Expression< Target >::cast_linearize().

513  {
514  return f1 < f2;
515 }
template<typename T , typename Policy >
bool Parma_Polyhedra_Library::is_minus_infinity ( const Checked_Number< T, Policy > &  x)
inline

Definition at line 313 of file Checked_Number_inlines.hh.

References Parma_Polyhedra_Library::Checked_Number< T, Policy >::raw_value().

313  {
314  return Checked::is_minf<Policy>(x.raw_value());
315 }
template<typename T >
Enable_If<Is_Native_Or_Checked<T>::value, bool>::type Parma_Polyhedra_Library::is_not_a_number ( const T &  x)
related

Definition at line 247 of file Checked_Number_inlines.hh.

References raw_value().

Referenced by Parma_Polyhedra_Library::Interval_NS::f_is_empty(), numer_denom(), Parma_Polyhedra_Library::DB_Row< T >::OK(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::OK().

247  {
248  return Checked::is_nan<typename Native_Checked_From_Wrapper<T>
250 }
const mpz_class & raw_value(const GMP_Integer &x)
template<typename T , typename Policy >
bool Parma_Polyhedra_Library::is_not_a_number ( const Checked_Number< T, Policy > &  x)
inline

Definition at line 307 of file Checked_Number_inlines.hh.

References Parma_Polyhedra_Library::Checked_Number< T, Policy >::raw_value().

307  {
308  return Checked::is_nan<Policy>(x.raw_value());
309 }
template<typename T >
Enable_If<Is_Native_Or_Checked<T>::value, bool>::type Parma_Polyhedra_Library::is_plus_infinity ( const T &  x)
related

Definition at line 234 of file Checked_Number_inlines.hh.

References raw_value().

Referenced by Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::BFT00_upper_bound_assign_if_exact(), Parma_Polyhedra_Library::Octagonal_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::bounds(), Parma_Polyhedra_Library::Octagonal_Shape< T >::bounds(), Parma_Polyhedra_Library::Box< ITV >::Box(), Parma_Polyhedra_Library::Octagonal_Shape< T >::CC76_narrowing_assign(), Parma_Polyhedra_Library::BD_Shape< T >::CC76_narrowing_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::constrains(), Parma_Polyhedra_Library::BD_Shape< T >::constrains(), Parma_Polyhedra_Library::BD_Shape< T >::constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::contains_integer_point(), Parma_Polyhedra_Library::BD_Shape< T >::contains_integer_point(), Parma_Polyhedra_Library::Octagonal_Shape< T >::deduce_minus_v_pm_u_bounds(), Parma_Polyhedra_Library::BD_Shape< T >::deduce_u_minus_v_bounds(), Parma_Polyhedra_Library::BD_Shape< T >::deduce_v_minus_u_bounds(), Parma_Polyhedra_Library::Octagonal_Shape< T >::deduce_v_pm_u_bounds(), Parma_Polyhedra_Library::Octagonal_Shape< T >::drop_some_non_integer_points(), Parma_Polyhedra_Library::BD_Shape< T >::export_interval_constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::export_interval_constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::frequency(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::incremental_shortest_path_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::incremental_strong_closure_assign(), infinity_sign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::is_bounded(), Parma_Polyhedra_Library::BD_Shape< T >::is_bounded(), Parma_Polyhedra_Library::Boundary_NS::is_domain_sup(), Parma_Polyhedra_Library::BD_Shape< T >::is_shortest_path_reduced(), Parma_Polyhedra_Library::Octagonal_Shape< T >::is_strong_coherent(), Parma_Polyhedra_Library::Octagonal_Shape< T >::is_strongly_reduced(), Parma_Polyhedra_Library::Octagonal_Shape< T >::is_universe(), Parma_Polyhedra_Library::BD_Shape< T >::is_universe(), Parma_Polyhedra_Library::DB_Matrix< T >::l_m_distance_assign(), Parma_Polyhedra_Library::OR_Matrix< T >::l_m_distance_assign(), Parma_Polyhedra_Library::BD_Shape< T >::left_one_var_refine(), Parma_Polyhedra_Library::BD_Shape< T >::max_min(), Parma_Polyhedra_Library::Octagonal_Shape< T >::max_min(), Parma_Polyhedra_Library::BD_Shape< T >::minimized_congruences(), Parma_Polyhedra_Library::BD_Shape< T >::minimized_constraints(), Parma_Polyhedra_Library::Boundary_NS::normal_is_boundary_infinity(), Parma_Polyhedra_Library::Boundary_NS::normal_is_reverse_infinity(), numer_denom(), Parma_Polyhedra_Library::BD_Shape< T >::OK(), Parma_Polyhedra_Library::Octagonal_Shape< T >::OK(), Parma_Polyhedra_Library::BD_Shape< T >::one_variable_affine_form_image(), Parma_Polyhedra_Library::BD_Shape< T >::operator<<(), Parma_Polyhedra_Library::Octagonal_Shape< T >::operator<<(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine(), Parma_Polyhedra_Library::BD_Shape< T >::refine(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), Parma_Polyhedra_Library::BD_Shape< T >::relation_with(), Parma_Polyhedra_Library::BD_Shape< T >::shortest_path_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::simplify_using_context_assign(), Parma_Polyhedra_Library::BD_Shape< T >::simplify_using_context_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::strong_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::strong_coherence_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::tight_closure_assign(), and Parma_Polyhedra_Library::Octagonal_Shape< T >::tight_coherence_would_make_empty().

234  {
235  return Checked::is_pinf<typename Native_Checked_From_Wrapper<T>
237 }
const mpz_class & raw_value(const GMP_Integer &x)
template<typename T , typename Policy >
bool Parma_Polyhedra_Library::is_plus_infinity ( const Checked_Number< T, Policy > &  x)
inline

Definition at line 319 of file Checked_Number_inlines.hh.

References Parma_Polyhedra_Library::Checked_Number< T, Policy >::raw_value().

319  {
320  return Checked::is_pinf<Policy>(x.raw_value());
321 }
template<typename T >
Enable_If<Is_Singleton<T>::value || Is_Interval<T>::value, bool>::type Parma_Polyhedra_Library::is_singleton_integer ( const T &  x)
inline

Definition at line 139 of file Interval_inlines.hh.

References Parma_Polyhedra_Library::Interval_NS::f_lower(), and is_integer().

139  {
140  return is_singleton(x) && is_integer(f_lower(x));
141 }
Enable_If< Is_Singleton< T >::value, const T & >::type f_lower(const T &x)
Enable_If< Is_Native_Or_Checked< T >::value, bool >::type is_integer(const T &x)
bool Parma_Polyhedra_Library::is_space ( char  c)
inline

Returns true if c is any kind of space character.

Definition at line 168 of file globals_inlines.hh.

Referenced by operator>>(), Parma_Polyhedra_Library::Checked::parse_number_part(), and Parma_Polyhedra_Library::IO_Operators::wrap_string().

168  {
169  return isspace(c) != 0;
170 }
Coefficient c
Definition: PIP_Tree.cc:64
dimension_type Parma_Polyhedra_Library::isqrt ( dimension_type  x)
inline

Returns the integer square root of x.

Definition at line 452 of file OR_Matrix_inlines.hh.

Referenced by Parma_Polyhedra_Library::OR_Matrix< T >::max_num_rows().

452  {
453  dimension_type r = 0;
454  const dimension_type FIRST_BIT_MASK = 0x40000000U;
455  for (dimension_type t = FIRST_BIT_MASK; t != 0; t >>= 2) {
456  const dimension_type s = r + t;
457  if (s <= x) {
458  x -= s;
459  r = s + t;
460  }
461  r >>= 1;
462  }
463  return r;
464 }
size_t dimension_type
An unsigned integral type for representing space dimensions.
void Parma_Polyhedra_Library::linear_combine ( Dense_Row x,
const Dense_Row y,
Coefficient_traits::const_reference  c1,
Coefficient_traits::const_reference  c2,
dimension_type  start,
dimension_type  end 
)
related

Definition at line 512 of file Dense_Row_inlines.hh.

References Parma_Polyhedra_Library::Dense_Row::linear_combine().

515  {
516  x.linear_combine(y, c1, c2, start, end);
517 }
template<typename T >
T Parma_Polyhedra_Library::low_bits_mask ( unsigned  n)
inline

Returns a mask for the lowest n bits,.

Definition at line 45 of file math_utilities_inlines.hh.

45  {
46  PPL_ASSERT(n < unsigned(std::numeric_limits<T>::digits));
47  return ~((~static_cast<T>(0)) << n);
48 }
dimension_type Parma_Polyhedra_Library::max_space_dimension ( )
inline

Returns the maximum space dimension this library can handle.

Definition at line 40 of file max_space_dimension.hh.

References Parma_Polyhedra_Library::Variable::max_space_dimension(), Parma_Polyhedra_Library::Box< ITV >::max_space_dimension(), Parma_Polyhedra_Library::Grid::max_space_dimension(), Parma_Polyhedra_Library::Polyhedron::max_space_dimension(), and not_a_dimension().

Referenced by Parma_Polyhedra_Library::MIP_Problem::add_space_dimensions_and_embed(), Parma_Polyhedra_Library::PIP_Problem::add_space_dimensions_and_embed(), Parma_Polyhedra_Library::Box< ITV >::add_space_dimensions_and_embed(), Parma_Polyhedra_Library::Grid::add_space_dimensions_and_embed(), Parma_Polyhedra_Library::Box< ITV >::add_space_dimensions_and_project(), Parma_Polyhedra_Library::Grid::add_space_dimensions_and_project(), Parma_Polyhedra_Library::Polyhedron::add_space_dimensions_and_project(), Parma_Polyhedra_Library::Box< ITV >::concatenate_assign(), Parma_Polyhedra_Library::Grid::concatenate_assign(), Parma_Polyhedra_Library::Polyhedron::concatenate_assign(), Parma_Polyhedra_Library::Grid::construct(), Parma_Polyhedra_Library::Box< ITV >::expand_space_dimension(), Parma_Polyhedra_Library::Octagonal_Shape< T >::expand_space_dimension(), Parma_Polyhedra_Library::BD_Shape< T >::expand_space_dimension(), Parma_Polyhedra_Library::Grid::expand_space_dimension(), Parma_Polyhedra_Library::Polyhedron::expand_space_dimension(), Parma_Polyhedra_Library::Linear_Expression_Impl< Row >::Linear_Expression_Impl(), Parma_Polyhedra_Library::Pointset_Ask_Tell< PSET >::max_space_dimension(), Parma_Polyhedra_Library::Pointset_Powerset< PSET >::max_space_dimension(), Parma_Polyhedra_Library::Linear_System< Row >::max_space_dimension(), and Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::max_space_dimension().

40  {
41  // Note: we assume that the powerset and the ask-and-tell construction
42  // do not limit the space dimension more than their parameters.
43  static bool computed = false;
44  static dimension_type d = not_a_dimension();
45  if (!computed) {
47  d = std::min(d, C_Polyhedron::max_space_dimension());
48  d = std::min(d, NNC_Polyhedron::max_space_dimension());
49  d = std::min(d, Grid::max_space_dimension());
50  // FIXME: what about all other boxes?
51  d = std::min(d, Rational_Box::max_space_dimension());
52  d = std::min(d, BD_Shape<int8_t>::max_space_dimension());
53  d = std::min(d, BD_Shape<int16_t>::max_space_dimension());
54  d = std::min(d, BD_Shape<int32_t>::max_space_dimension());
55  d = std::min(d, BD_Shape<int64_t>::max_space_dimension());
56  d = std::min(d, BD_Shape<float>::max_space_dimension());
57  d = std::min(d, BD_Shape<double>::max_space_dimension());
70  computed = true;
71  }
72  return d;
73 }
dimension_type max_space_dimension()
Returns the maximum space dimension this library can handle.
size_t dimension_type
An unsigned integral type for representing space dimensions.
dimension_type not_a_dimension()
Returns a value that does not designate a valid dimension.
void Parma_Polyhedra_Library::maybe_abandon ( )
related

Definition at line 75 of file globals_inlines.hh.

References abandon_expensive_computations, Parma_Polyhedra_Library::In_Assert::asserting(), and Parma_Polyhedra_Library::Weightwatch_Traits::check_function.

Referenced by Parma_Polyhedra_Library::PIP_Tree_Node::compatibility_check(), Parma_Polyhedra_Library::MIP_Problem::compute_simplex_using_exact_pricing(), Parma_Polyhedra_Library::MIP_Problem::compute_simplex_using_steepest_edge_float(), Parma_Polyhedra_Library::Polyhedron::conversion(), Parma_Polyhedra_Library::Box< ITV >::propagate_constraints_no_check(), and Parma_Polyhedra_Library::PIP_Solution_Node::solve().

75  {
76 #ifndef NDEBUG
77  if (In_Assert::asserting()) {
78  return;
79  }
80 #endif
81  if (Weightwatch_Traits::check_function != 0) {
82  Weightwatch_Traits::check_function();
83  }
84  if (const Throwable* const p = abandon_expensive_computations) {
85  p->throw_me();
86  }
87 }
const Throwable *volatile abandon_expensive_computations
A pointer to an exception object.
Definition: globals.cc:34
template<typename To , typename From >
Result Parma_Polyhedra_Library::maybe_assign ( const To *&  top,
To &  tmp,
const From &  from,
Rounding_Dir  dir 
)
inline

Assigns to top a pointer to a location that holds the conversion, according to dir, of from to type To. When necessary, and only when necessary, the variable tmp is used to hold the result of conversion.

Definition at line 64 of file distances_inlines.hh.

References Parma_Polyhedra_Library::maybe_assign_struct< To, From >::function().

Referenced by 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(), and Parma_Polyhedra_Library::Box< ITV >::l_m_distance_assign().

64  {
65  return maybe_assign_struct<To, From>::function(top, tmp, from, dir);
66 }
template<typename T >
int Parma_Polyhedra_Library::maybe_check_fpu_inexact ( )
inline

Definition at line 843 of file Checked_Number_inlines.hh.

References fpu_check_inexact().

843  {
844  if (FPU_Related<T>::value) {
845  return fpu_check_inexact();
846  }
847  else {
848  return 0;
849  }
850 }
int fpu_check_inexact()
Queries the inexact computation status.
Coefficient value
Definition: PIP_Tree.cc:618
template<typename T >
void Parma_Polyhedra_Library::maybe_reset_fpu_inexact ( )
inline

Definition at line 835 of file Checked_Number_inlines.hh.

References fpu_reset_inexact().

835  {
836  if (FPU_Related<T>::value) {
837  return fpu_reset_inexact();
838  }
839 }
void fpu_reset_inexact()
Clears the inexact computation status.
Coefficient value
Definition: PIP_Tree.cc:618
template<typename T >
T Parma_Polyhedra_Library::minus_infinity ( )
inline

Definition at line 815 of file Checked_Number_inlines.hh.

References MINUS_INFINITY.

815  {
816  return MINUS_INFINITY;
817 }
Minus_Infinity MINUS_INFINITY
Definition: checked.cc:30
unsigned int Parma_Polyhedra_Library::msb_position ( unsigned long long  v)
inline

If v is nonzero, returns the position of the most significant bit in a.

The behavior is undefined if v is zero.

Definition at line 518 of file Float_inlines.hh.

References clz(), and sizeof_to_bits.

Referenced by compute_absolute_error(), and Parma_Polyhedra_Library::Linear_Form< C >::relative_error().

518  {
519  return static_cast<unsigned int>(sizeof_to_bits(sizeof(v))) - 1U - clz(v);
520 }
#define sizeof_to_bits(size)
Definition: compiler.hh:80
unsigned int clz(unsigned int u)
Definition: compiler.hh:143
void Parma_Polyhedra_Library::mul_2exp_assign ( GMP_Integer x,
const GMP_Integer y,
unsigned int  exp 
)
related
void Parma_Polyhedra_Library::neg_assign ( GMP_Integer x)
related

Definition at line 32 of file GMP_Integer_inlines.hh.

Referenced by Parma_Polyhedra_Library::BD_Shape< T >::add_constraint(), Parma_Polyhedra_Library::Octagonal_Shape< T >::add_constraint(), Parma_Polyhedra_Library::BD_Shape< T >::affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_preimage(), Parma_Polyhedra_Library::Linear_System< Row >::back_substitute(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::Box< ITV >::bounded_affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::bounded_affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_preimage(), Parma_Polyhedra_Library::Generator::closure_point(), Parma_Polyhedra_Library::MIP_Problem::compute_generator(), Parma_Polyhedra_Library::MIP_Problem::compute_simplex_using_steepest_edge_float(), Parma_Polyhedra_Library::Polyhedron::conversion(), Parma_Polyhedra_Library::Octagonal_Shape< T >::deduce_minus_v_pm_u_bounds(), Parma_Polyhedra_Library::Octagonal_Shape< T >::deduce_v_pm_u_bounds(), Parma_Polyhedra_Library::Grid_Generator::fancy_print(), Parma_Polyhedra_Library::Generator::fancy_print(), Parma_Polyhedra_Library::Linear_Expression_Impl< Row >::gcd(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::Grid::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::Grid::generalized_affine_preimage(), Parma_Polyhedra_Library::Polyhedron::generalized_affine_preimage(), Parma_Polyhedra_Library::PIP_Solution_Node::generate_cut(), Parma_Polyhedra_Library::Octagonal_Shape< T >::get_limiting_octagon(), Parma_Polyhedra_Library::BD_Shape< T >::get_limiting_shape(), Parma_Polyhedra_Library::Grid::Grid(), Parma_Polyhedra_Library::Grid_Generator::grid_point(), Parma_Polyhedra_Library::Linear_Expression_Impl< Row >::linear_combine(), Parma_Polyhedra_Library::MIP_Problem::linear_combine(), Parma_Polyhedra_Library::Sparse_Row::linear_combine(), Parma_Polyhedra_Library::BD_Shape< T >::max_min(), Parma_Polyhedra_Library::Octagonal_Shape< T >::max_min(), Parma_Polyhedra_Library::Linear_Expression_Impl< Row >::negate(), Parma_Polyhedra_Library::Dense_Row::normalize(), Parma_Polyhedra_Library::Sparse_Row::normalize(), Parma_Polyhedra_Library::Linear_Expression::operator-(), Parma_Polyhedra_Library::Congruence::operator<<(), Parma_Polyhedra_Library::Constraint::operator<<(), Parma_Polyhedra_Library::Constraint::operator==(), Parma_Polyhedra_Library::Constraint::operator>(), Parma_Polyhedra_Library::Constraint::operator>=(), Parma_Polyhedra_Library::Grid_Generator::parameter(), Parma_Polyhedra_Library::Generator::point(), Parma_Polyhedra_Library::Linear_Expression_Impl< Row >::print(), Parma_Polyhedra_Library::MIP_Problem::process_pending_constraints(), Parma_Polyhedra_Library::Grid::reduce_congruence_with_equality(), Parma_Polyhedra_Library::Grid::reduce_equality_with_equality(), Parma_Polyhedra_Library::Grid::reduce_line_with_line(), Parma_Polyhedra_Library::Grid::reduce_parameter_with_line(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine(), Parma_Polyhedra_Library::BD_Shape< T >::refine(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine_no_check(), Parma_Polyhedra_Library::BD_Shape< T >::refine_no_check(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), Parma_Polyhedra_Library::BD_Shape< T >::relation_with(), Parma_Polyhedra_Library::MIP_Problem::second_phase(), Parma_Polyhedra_Library::Linear_Expression_Impl< Row >::sign_normalize(), Parma_Polyhedra_Library::PIP_Problem::solve(), Parma_Polyhedra_Library::PIP_Solution_Node::update_tableau(), Parma_Polyhedra_Library::Implementation::wrap_assign(), Parma_Polyhedra_Library::Box< ITV >::wrap_assign(), and Parma_Polyhedra_Library::Grid::wrap_assign().

32  {
33  mpz_neg(x.get_mpz_t(), x.get_mpz_t());
34 }
void Parma_Polyhedra_Library::neg_assign ( GMP_Integer x,
const GMP_Integer y 
)
related

Definition at line 37 of file GMP_Integer_inlines.hh.

37  {
38  mpz_neg(x.get_mpz_t(), y.get_mpz_t());
39 }
void Parma_Polyhedra_Library::normalize2 ( Coefficient_traits::const_reference  x,
Coefficient_traits::const_reference  y,
Coefficient n_x,
Coefficient n_y 
)
inline

If $g$ is the GCD of x and y, the values of x and y divided by $g$ are assigned to n_x and n_y, respectively.

Note
x and n_x may be the same object and likewise for y and n_y. Any other aliasing results in undefined behavior.

Definition at line 34 of file math_utilities_inlines.hh.

References exact_div_assign(), gcd_assign(), and PPL_DIRTY_TEMP_COEFFICIENT.

Referenced by Parma_Polyhedra_Library::Polyhedron::conversion(), Parma_Polyhedra_Library::MIP_Problem::evaluate_objective_function(), Parma_Polyhedra_Library::Box< ITV >::frequency(), Parma_Polyhedra_Library::BD_Shape< T >::frequency(), Parma_Polyhedra_Library::Octagonal_Shape< T >::frequency(), Parma_Polyhedra_Library::Linear_Expression_Impl< Row >::linear_combine(), and Parma_Polyhedra_Library::MIP_Problem::linear_combine().

36  {
38  gcd_assign(gcd, x, y);
39  exact_div_assign(n_x, x, gcd);
40  exact_div_assign(n_y, y, gcd);
41 }
void gcd_assign(Checked_Number< T, Policy > &x, const Checked_Number< T, Policy > &y, const Checked_Number< T, Policy > &z)
Assigns to x the greatest common divisor of y and z.
#define PPL_DIRTY_TEMP_COEFFICIENT(id)
Declare a local variable named id, of type Coefficient, and containing an unknown initial value...
void exact_div_assign(Checked_Number< T, Policy > &x, const Checked_Number< T, Policy > &y, const Checked_Number< T, Policy > &z)
If z divides y, assigns to x the quotient of the integer division of y and z.
template<typename T >
T Parma_Polyhedra_Library::not_a_number ( )
inline

Definition at line 821 of file Checked_Number_inlines.hh.

References NOT_A_NUMBER.

821  {
822  return NOT_A_NUMBER;
823 }
Not_A_Number NOT_A_NUMBER
Definition: checked.cc:32
template<typename RA_Container >
RA_Container::iterator Parma_Polyhedra_Library::nth_iter ( RA_Container &  cont,
dimension_type  n 
)
inline

Definition at line 174 of file globals_inlines.hh.

Referenced by Parma_Polyhedra_Library::MIP_Problem::external_memory_in_bytes(), Parma_Polyhedra_Library::PIP_Problem::solve(), Parma_Polyhedra_Library::PIP_Solution_Node::update_tableau(), and Parma_Polyhedra_Library::MIP_Problem::~MIP_Problem().

174  {
175  typedef typename RA_Container::difference_type diff_t;
176  return cont.begin() + static_cast<diff_t>(n);
177 }
template<typename RA_Container >
RA_Container::const_iterator Parma_Polyhedra_Library::nth_iter ( const RA_Container &  cont,
dimension_type  n 
)
inline

Definition at line 181 of file globals_inlines.hh.

181  {
182  typedef typename RA_Container::difference_type diff_t;
183  return cont.begin() + static_cast<diff_t>(n);
184 }
template<typename T >
Enable_If< Is_Native_Or_Checked< T >::value, void >::type Parma_Polyhedra_Library::numer_denom ( const T &  from,
Coefficient numer,
Coefficient denom 
)
inline

Extract the numerator and denominator components of from.

Definition at line 52 of file math_utilities_inlines.hh.

References assign_r(), is_minus_infinity(), is_not_a_number(), is_plus_infinity(), PPL_DIRTY_TEMP, and ROUND_NOT_NEEDED.

Referenced by Parma_Polyhedra_Library::BD_Shape< T >::BFT00_upper_bound_assign_if_exact(), Parma_Polyhedra_Library::BD_Shape< T >::constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::constraints(), Parma_Polyhedra_Library::Polyhedron::convert_to_integer_expression(), Parma_Polyhedra_Library::Polyhedron::convert_to_integer_expressions(), Parma_Polyhedra_Library::BD_Shape< T >::frequency(), Parma_Polyhedra_Library::Octagonal_Shape< T >::frequency(), Parma_Polyhedra_Library::BD_Shape< T >::max_min(), Parma_Polyhedra_Library::Octagonal_Shape< T >::max_min(), Parma_Polyhedra_Library::BD_Shape< T >::minimized_congruences(), Parma_Polyhedra_Library::Octagonal_Shape< T >::minimized_congruences(), Parma_Polyhedra_Library::BD_Shape< T >::minimized_constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), and Parma_Polyhedra_Library::BD_Shape< T >::relation_with().

53  {
54  PPL_ASSERT(!is_not_a_number(from)
55  && !is_minus_infinity(from)
56  && !is_plus_infinity(from));
57  PPL_DIRTY_TEMP(mpq_class, q);
58  assign_r(q, from, ROUND_NOT_NEEDED);
59  numer = q.get_num();
60  denom = q.get_den();
61 }
Enable_If< Is_Native_Or_Checked< T >::value, bool >::type is_plus_infinity(const T &x)
Enable_If< Is_Native_Or_Checked< T >::value, bool >::type is_not_a_number(const T &x)
Enable_If< Is_Native_Or_Checked< T >::value, bool >::type is_minus_infinity(const T &x)
Enable_If< Is_Native_Or_Checked< To >::value &&Is_Special< From >::value, Result >::type assign_r(To &to, const From &x, Rounding_Dir dir)
#define PPL_DIRTY_TEMP(T, id)
template<typename T1 , typename T2 >
Enable_If<((Is_Singleton<T1>::value || Is_Interval<T1>::value) && (Is_Singleton<T2>::value || Is_Interval<T2>::value) && (Is_Interval<T1>::value || Is_Interval<T2>::value)), bool>::type Parma_Polyhedra_Library::operator!= ( const T1 &  x,
const T2 &  y 
)
related

Definition at line 185 of file Interval_inlines.hh.

185  {
186  return !(x == y);
187 }
template<typename ITV >
bool Parma_Polyhedra_Library::operator!= ( const Box< ITV > &  x,
const Box< ITV > &  y 
)
related

Definition at line 264 of file Box_inlines.hh.

264  {
265  return !(x == y);
266 }
bool Parma_Polyhedra_Library::operator!= ( const Generator_System x,
const Generator_System y 
)
related

Definition at line 286 of file Generator_System_inlines.hh.

286  {
287  return !(x == y);
288 }
bool Parma_Polyhedra_Library::operator!= ( const Constraint_System x,
const Constraint_System y 
)
related

Definition at line 416 of file Constraint_System_inlines.hh.

416  {
417  return !(x == y);
418 }
bool Parma_Polyhedra_Library::operator!= ( const Dense_Row x,
const Sparse_Row y 
)

Definition at line 832 of file Sparse_Row.cc.

832  {
833  return !(x == y);
834 }
bool Parma_Polyhedra_Library::operator!= ( const Sparse_Row x,
const Dense_Row y 
)

Definition at line 842 of file Sparse_Row.cc.

842  {
843  return !(x == y);
844 }
I_Result Parma_Polyhedra_Library::operator& ( I_Result  a,
I_Result  b 
)
inline

Definition at line 101 of file intervals_defs.hh.

101  {
102  return static_cast<I_Result>(static_cast<unsigned>(a)
103  & static_cast<unsigned>(b));
104 }
I_Result
The result of an operation on intervals.
template<typename B , typename Info , typename T >
Enable_If<Is_Singleton<T>::value, Interval<B, Info> >::type Parma_Polyhedra_Library::operator* ( const Interval< B, Info > &  x,
const T &  y 
)
inline

Definition at line 1037 of file Interval_inlines.hh.

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

1037  {
1038  Interval<B, Info> z;
1039  z.mul_assign(x, y);
1040  return z;
1041 }
template<typename B , typename Info , typename T >
Enable_If<Is_Singleton<T>::value, Interval<B, Info> >::type Parma_Polyhedra_Library::operator* ( const T &  x,
const Interval< B, Info > &  y 
)
inline

Definition at line 1045 of file Interval_inlines.hh.

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

1045  {
1046  Interval<B, Info> z;
1047  z.mul_assign(x, y);
1048  return z;
1049 }
template<typename B , typename Info >
Interval<B, Info> Parma_Polyhedra_Library::operator* ( const Interval< B, Info > &  x,
const Interval< B, Info > &  y 
)
inline

Definition at line 1053 of file Interval_inlines.hh.

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

1053  {
1054  Interval<B, Info> z;
1055  z.mul_assign(x, y);
1056  return z;
1057 }
template<typename B , typename Info , typename T >
Enable_If<Is_Singleton<T>::value, Interval<B, Info> >::type Parma_Polyhedra_Library::operator+ ( const Interval< B, Info > &  x,
const T &  y 
)
inline

Definition at line 989 of file Interval_inlines.hh.

References Parma_Polyhedra_Library::Interval< Boundary, Info >::add_assign().

989  {
990  Interval<B, Info> z;
991  z.add_assign(x, y);
992  return z;
993 }
template<typename B , typename Info , typename T >
Enable_If<Is_Singleton<T>::value, Interval<B, Info> >::type Parma_Polyhedra_Library::operator+ ( const T &  x,
const Interval< B, Info > &  y 
)
inline

Definition at line 997 of file Interval_inlines.hh.

References Parma_Polyhedra_Library::Interval< Boundary, Info >::add_assign().

997  {
998  Interval<B, Info> z;
999  z.add_assign(x, y);
1000  return z;
1001 }
template<typename B , typename Info >
Interval<B, Info> Parma_Polyhedra_Library::operator+ ( const Interval< B, Info > &  x,
const Interval< B, Info > &  y 
)
inline

Definition at line 1005 of file Interval_inlines.hh.

References Parma_Polyhedra_Library::Interval< Boundary, Info >::add_assign().

1005  {
1006  Interval<B, Info> z;
1007  z.add_assign(x, y);
1008  return z;
1009 }
I_Result Parma_Polyhedra_Library::operator- ( I_Result  a,
I_Result  b 
)
inline

Definition at line 107 of file intervals_defs.hh.

107  {
108  return static_cast<I_Result>(static_cast<unsigned>(a)
109  & ~static_cast<unsigned>(b));
110 }
I_Result
The result of an operation on intervals.
template<typename B , typename Info , typename T >
Enable_If<Is_Singleton<T>::value, Interval<B, Info> >::type Parma_Polyhedra_Library::operator- ( const Interval< B, Info > &  x,
const T &  y 
)
inline

Definition at line 1013 of file Interval_inlines.hh.

References Parma_Polyhedra_Library::Interval< Boundary, Info >::sub_assign().

1013  {
1014  Interval<B, Info> z;
1015  z.sub_assign(x, y);
1016  return z;
1017 }
template<typename B , typename Info , typename T >
Enable_If<Is_Singleton<T>::value, Interval<B, Info> >::type Parma_Polyhedra_Library::operator- ( const T &  x,
const Interval< B, Info > &  y 
)
inline

Definition at line 1021 of file Interval_inlines.hh.

References Parma_Polyhedra_Library::Interval< Boundary, Info >::sub_assign().

1021  {
1022  Interval<B, Info> z;
1023  z.sub_assign(x, y);
1024  return z;
1025 }
template<typename B , typename Info >
Interval<B, Info> Parma_Polyhedra_Library::operator- ( const Interval< B, Info > &  x,
const Interval< B, Info > &  y 
)
inline

Definition at line 1029 of file Interval_inlines.hh.

References Parma_Polyhedra_Library::Interval< Boundary, Info >::sub_assign().

1029  {
1030  Interval<B, Info> z;
1031  z.sub_assign(x, y);
1032  return z;
1033 }
template<typename B , typename Info , typename T >
Enable_If<Is_Singleton<T>::value, Interval<B, Info> >::type Parma_Polyhedra_Library::operator/ ( const Interval< B, Info > &  x,
const T &  y 
)
inline

Definition at line 1061 of file Interval_inlines.hh.

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

1061  {
1062  Interval<B, Info> z;
1063  z.div_assign(x, y);
1064  return z;
1065 }
template<typename B , typename Info , typename T >
Enable_If<Is_Singleton<T>::value, Interval<B, Info> >::type Parma_Polyhedra_Library::operator/ ( const T &  x,
const Interval< B, Info > &  y 
)
inline

Definition at line 1069 of file Interval_inlines.hh.

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

1069  {
1070  Interval<B, Info> z;
1071  z.div_assign(x, y);
1072  return z;
1073 }
template<typename B , typename Info >
Interval<B, Info> Parma_Polyhedra_Library::operator/ ( const Interval< B, Info > &  x,
const Interval< B, Info > &  y 
)
inline

Definition at line 1077 of file Interval_inlines.hh.

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

1077  {
1078  Interval<B, Info> z;
1079  z.div_assign(x, y);
1080  return z;
1081 }
template<typename Boundary , typename Info >
std::ostream& Parma_Polyhedra_Library::operator<< ( std::ostream &  os,
const Interval< Boundary, Info > &  x 
)
inline

Definition at line 1085 of file Interval_inlines.hh.

References check_empty_arg(), Parma_Polyhedra_Library::Boundary_NS::LOWER, ROUND_NOT_NEEDED, Parma_Polyhedra_Library::Boundary_NS::SPECIAL, and Parma_Polyhedra_Library::Boundary_NS::UPPER.

1085  {
1086  if (check_empty_arg(x)) {
1087  return os << "[]";
1088  }
1089  if (x.is_singleton()) {
1090  output(os, x.lower(), Numeric_Format(), ROUND_NOT_NEEDED);
1091  return os;
1092  }
1093  os << (x.lower_is_open() ? "(" : "[");
1094  if (x.info().get_boundary_property(LOWER, SPECIAL)) {
1095  os << "-inf";
1096  }
1097  else {
1098  output(os, x.lower(), Numeric_Format(), ROUND_NOT_NEEDED);
1099  }
1100  os << ", ";
1101  if (x.info().get_boundary_property(UPPER, SPECIAL)) {
1102  os << "+inf";
1103  }
1104  else {
1105  output(os, x.upper(), Numeric_Format(), ROUND_NOT_NEEDED);
1106  }
1107  os << (x.upper_is_open() ? ")" : "]");
1108  return os;
1109 }
Enable_If< Is_Singleton< T >::value||Is_Interval< T >::value, bool >::type check_empty_arg(const T &x)
static const Property SPECIAL(Property::SPECIAL_)
Enable_If< Is_Native_Or_Checked< T >::value, Result >::type output(std::ostream &os, const T &x, const Numeric_Format &format, Rounding_Dir dir)
template<typename T1 , typename T2 >
Enable_If<((Is_Singleton<T1>::value || Is_Interval<T1>::value) && (Is_Singleton<T2>::value || Is_Interval<T2>::value) && (Is_Interval<T1>::value || Is_Interval<T2>::value)), bool>::type Parma_Polyhedra_Library::operator== ( const T1 &  x,
const T2 &  y 
)
related

Definition at line 164 of file Interval_inlines.hh.

References check_empty_arg(), Parma_Polyhedra_Library::Boundary_NS::eq(), Parma_Polyhedra_Library::Interval_NS::f_info(), Parma_Polyhedra_Library::Interval_NS::f_lower(), f_OK(), Parma_Polyhedra_Library::Interval_NS::f_upper(), Parma_Polyhedra_Library::Boundary_NS::LOWER, and Parma_Polyhedra_Library::Boundary_NS::UPPER.

164  {
165  PPL_ASSERT(f_OK(x));
166  PPL_ASSERT(f_OK(y));
167  if (check_empty_arg(x)) {
168  return check_empty_arg(y);
169  }
170  else if (check_empty_arg(y)) {
171  return false;
172  }
173  return eq(LOWER, f_lower(x), f_info(x), LOWER, f_lower(y), f_info(y))
174  && eq(UPPER, f_upper(x), f_info(x), UPPER, f_upper(y), f_info(y));
175 }
Enable_If< Is_Singleton< T >::value||Is_Interval< T >::value, bool >::type check_empty_arg(const T &x)
Enable_If< Is_Singleton< T >::value, const T & >::type f_lower(const T &x)
bool eq(Boundary_Type type1, const T1 &x1, const Info1 &info1, Boundary_Type type2, const T2 &x2, const Info2 &info2)
Enable_If< Is_Singleton< T >::value, Scalar_As_Interval_Info_Open >::type f_info(const T &, bool open)
Enable_If< Has_OK< T >::value, bool >::type f_OK(const T &to)
Enable_If< Is_Singleton< T >::value, const T & >::type f_upper(const T &x)
bool Parma_Polyhedra_Library::operator== ( const Generator_System x,
const Generator_System y 
)
related

Definition at line 281 of file Generator_System_inlines.hh.

References Parma_Polyhedra_Library::Generator_System::sys.

281  {
282  return x.sys == y.sys;
283 }
bool Parma_Polyhedra_Library::operator== ( const Constraint_System x,
const Constraint_System y 
)
related

Definition at line 411 of file Constraint_System_inlines.hh.

References Parma_Polyhedra_Library::Constraint_System::sys.

411  {
412  return x.sys == y.sys;
413 }
template<typename ITV >
bool Parma_Polyhedra_Library::operator== ( const Box< ITV > &  x,
const Box< ITV > &  y 
)
related

Definition at line 581 of file Box_templates.hh.

References Parma_Polyhedra_Library::Box< ITV >::is_empty(), Parma_Polyhedra_Library::Box< ITV >::seq, and Parma_Polyhedra_Library::Box< ITV >::space_dimension().

Referenced by Parma_Polyhedra_Library::iterator_to_const< Container >::operator!=(), Parma_Polyhedra_Library::const_iterator_to_const< Container >::operator!=(), and Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::operator!=().

581  {
582  const dimension_type x_space_dim = x.space_dimension();
583  if (x_space_dim != y.space_dimension()) {
584  return false;
585  }
586 
587  if (x.is_empty()) {
588  return y.is_empty();
589  }
590 
591  if (y.is_empty()) {
592  return x.is_empty();
593  }
594 
595  for (dimension_type k = x_space_dim; k-- > 0; ) {
596  if (x.seq[k] != y.seq[k]) {
597  return false;
598  }
599  }
600  return true;
601 }
size_t dimension_type
An unsigned integral type for representing space dimensions.
bool Parma_Polyhedra_Library::operator== ( const Dense_Row x,
const Sparse_Row y 
)

Definition at line 810 of file Sparse_Row.cc.

References Parma_Polyhedra_Library::Sparse_Row::end(), Parma_Polyhedra_Library::CO_Tree::const_iterator::index(), Parma_Polyhedra_Library::Sparse_Row::lower_bound(), Parma_Polyhedra_Library::Sparse_Row::size(), and Parma_Polyhedra_Library::Dense_Row::size().

810  {
811  if (x.size() != y.size()) {
812  return false;
813  }
814  Sparse_Row::const_iterator itr = y.end();
815  for (dimension_type i = 0; i < x.size(); ++i) {
816  itr = y.lower_bound(itr, i);
817  if (itr != y.end() && itr.index() == i) {
818  if (x[i] != *itr) {
819  return false;
820  }
821  }
822  else {
823  if (x[i] != 0) {
824  return false;
825  }
826  }
827  }
828  return true;
829 }
size_t dimension_type
An unsigned integral type for representing space dimensions.
bool Parma_Polyhedra_Library::operator== ( const Sparse_Row x,
const Dense_Row y 
)

Definition at line 837 of file Sparse_Row.cc.

837  {
838  return y == x;
839 }
template<typename Boundary , typename Info >
std::istream& Parma_Polyhedra_Library::operator>> ( std::istream &  is,
Interval< Boundary, Info > &  x 
)
inline

Definition at line 244 of file Interval_templates.hh.

References Parma_Polyhedra_Library::Interval< Boundary, Info >::assign(), Parma_Polyhedra_Library::Boundary_NS::assign(), c, EMPTY, Parma_Polyhedra_Library::Interval< Boundary, Info >::info(), is_space(), Parma_Polyhedra_Library::Boundary_NS::LOWER, Parma_Polyhedra_Library::Interval< Boundary, Info >::lower(), result_relation_class(), ROUND_DOWN, ROUND_UP, Parma_Polyhedra_Library::Interval_NS::SCALAR_INFO, Parma_Polyhedra_Library::Boundary_NS::set_minus_infinity(), Parma_Polyhedra_Library::Boundary_NS::set_plus_infinity(), UNIVERSE, Parma_Polyhedra_Library::Boundary_NS::UPPER, Parma_Polyhedra_Library::Interval< Boundary, Info >::upper(), V_CVT_STR_UNK, V_EQ, V_EQ_MINUS_INFINITY, V_EQ_PLUS_INFINITY, V_GE, V_GT, V_GT_MINUS_INFINITY, V_LE, V_LT, V_LT_PLUS_INFINITY, and V_NAN.

244  {
245  Boundary lower_bound;
246  Boundary upper_bound;
247  bool lower_boundary_infinity = false;
248  bool upper_boundary_infinity = false;
249  bool lower_open = false;
250  bool upper_open = false;
251  Result lower_r;
252  Result upper_r;
253 
254  // Eat leading white space.
255  char c;
256  do {
257  if (!is.get(c)) {
258  goto fail;
259  }
260  } while (is_space(c));
261 
262  // Get the opening parenthesis and handle the empty interval case.
263  if (c == '(') {
264  lower_open = true;
265  }
266  else if (c == '[') {
267  if (!is.get(c)) {
268  goto fail;
269  }
270  if (c == ']') {
271  // Empty interval.
272  x.assign(EMPTY);
273  return is;
274  }
275  else {
276  is.unget();
277  }
278  }
279  else {
280  goto unexpected_char;
281  }
282 
283  // Get the lower bound.
284  lower_r = input(lower_bound, is, ROUND_DOWN);
285  if (lower_r == V_CVT_STR_UNK || lower_r == V_NAN) {
286  goto fail;
287  }
288  lower_r = result_relation_class(lower_r);
289 
290  // Match the comma separating the lower and upper bounds.
291  do {
292  if (!is.get(c)) {
293  goto fail;
294  }
295  } while (is_space(c));
296  if (c != ',') {
297  goto unexpected_char;
298  }
299 
300  // Get the upper bound.
301  upper_r = input(upper_bound, is, ROUND_UP);
302  if (upper_r == V_CVT_STR_UNK || upper_r == V_NAN) {
303  goto fail;
304  }
305  upper_r = result_relation_class(upper_r);
306 
307  // Get the closing parenthesis.
308  do {
309  if (!is.get(c)) {
310  goto fail;
311  }
312  } while (is_space(c));
313  if (c == ')') {
314  upper_open = true;
315  }
316  else if (c != ']') {
317  unexpected_char:
318  is.unget();
319  fail:
320  is.setstate(std::ios::failbit);
321  return is;
322  }
323 
324  // Build interval.
325  switch (lower_r) {
326  case V_EQ: // Fall through.
327  case V_GE:
328  break;
329  case V_GT:
330  lower_open = true;
331  break;
332  case V_GT_MINUS_INFINITY:
333  lower_open = true;
334  // Fall through.
335  case V_EQ_MINUS_INFINITY:
336  lower_boundary_infinity = true;
337  break;
338  case V_EQ_PLUS_INFINITY: // Fall through.
339  case V_LT_PLUS_INFINITY:
340  if (upper_r == V_EQ_PLUS_INFINITY || upper_r == V_LT_PLUS_INFINITY) {
341  x.assign(UNIVERSE);
342  }
343  else {
344  x.assign(EMPTY);
345  }
346  return is;
347  default:
348  PPL_UNREACHABLE;
349  break;
350  }
351  switch (upper_r) {
352  case V_EQ: // Fall through.
353  case V_LE:
354  break;
355  case V_LT:
356  upper_open = true;
357  break;
358  case V_GT_MINUS_INFINITY:
359  upper_open = true;
360  // Fall through.
361  case V_EQ_MINUS_INFINITY:
362  if (lower_r == V_EQ_MINUS_INFINITY || lower_r == V_GT_MINUS_INFINITY) {
363  x.assign(UNIVERSE);
364  }
365  else {
366  x.assign(EMPTY);
367  }
368  return is;
369  case V_EQ_PLUS_INFINITY: // Fall through.
370  case V_LT_PLUS_INFINITY:
371  upper_boundary_infinity = true;
372  break;
373  default:
374  PPL_UNREACHABLE;
375  break;
376  }
377 
378  if (!lower_boundary_infinity
379  && !upper_boundary_infinity
380  && (lower_bound > upper_bound
381  || (lower_open && lower_bound == upper_bound))) {
382  x.assign(EMPTY);
383  }
384  else {
385  if (lower_boundary_infinity) {
386  set_minus_infinity(LOWER, x.lower(), x.info(), lower_open);
387  }
388  else {
389  assign(LOWER, x.lower(), x.info(),
390  LOWER, lower_bound, SCALAR_INFO, lower_open);
391  }
392  if (upper_boundary_infinity) {
393  set_plus_infinity(UPPER, x.upper(), x.info(), upper_open);
394  }
395  else {
396  assign(UPPER, x.upper(), x.info(),
397  UPPER, upper_bound, SCALAR_INFO, upper_open);
398  }
399  }
400  return is;
401 }
The empty element, i.e., the empty set.
The computed result is exact.
Definition: Result_defs.hh:81
Result set_minus_infinity(Boundary_Type type, T &x, Info &info, bool open=false)
Enable_If< Is_Native_Or_Checked< T >::value, Result >::type input(T &x, std::istream &is, Rounding_Dir dir)
Input function.
Result set_plus_infinity(Boundary_Type type, T &x, Info &info, bool open=false)
A positive integer overflow occurred (rounding up).
Definition: Result_defs.hh:111
Result
Possible outcomes of a checked arithmetic computation.
Definition: Result_defs.hh:76
bool is_space(char c)
Returns true if c is any kind of space character.
Not a number result.
Definition: Result_defs.hh:123
The computed result is inexact and rounded down.
Definition: Result_defs.hh:87
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)
Result result_relation_class(Result r)
Converting from unknown string.
Definition: Result_defs.hh:126
const Scalar_As_Interval_Info SCALAR_INFO
The computed result may be inexact and rounded up.
Definition: Result_defs.hh:93
The universe element, i.e., the whole vector space.
The computed result may be inexact and rounded down.
Definition: Result_defs.hh:96
A negative integer overflow occurred (rounding down).
Definition: Result_defs.hh:114
Coefficient c
Definition: PIP_Tree.cc:64
The computed result is inexact and rounded up.
Definition: Result_defs.hh:84
I_Result Parma_Polyhedra_Library::operator| ( I_Result  a,
I_Result  b 
)
inline

Definition at line 95 of file intervals_defs.hh.

95  {
96  return static_cast<I_Result>(static_cast<unsigned>(a)
97  | static_cast<unsigned>(b));
98 }
I_Result
The result of an operation on intervals.
template<typename T >
T Parma_Polyhedra_Library::plus_infinity ( )
inline

Definition at line 809 of file Checked_Number_inlines.hh.

References PLUS_INFINITY.

809  {
810  return PLUS_INFINITY;
811 }
Plus_Infinity PLUS_INFINITY
Definition: checked.cc:31
template<typename T >
void Parma_Polyhedra_Library::PPL_CC_FLUSH ( const T &  x)
inline

No-op function that force the compiler to store the argument and to reread it from memory if needed (thus preventing CSE).

Definition at line 49 of file compiler.hh.

References PPL_USED.

Referenced by Parma_Polyhedra_Library::Checked::limit_precision().

49  {
50 #if defined(__GNUC__) || defined(__INTEL_COMPILER)
51  __asm__ __volatile__ ("" : "+m" (const_cast<T&>(x)));
52 #else
53  // FIXME: is it possible to achieve the same effect in a portable way?
54  PPL_USED(x);
55 #endif
56 }
#define PPL_USED(v)
No-op macro that allows to avoid unused variable warnings from the compiler.
Definition: compiler.hh:39
void Parma_Polyhedra_Library::PPL_handle_timeout ( int  signum)
const mpz_class& Parma_Polyhedra_Library::raw_value ( const GMP_Integer x)
related
mpz_class& Parma_Polyhedra_Library::raw_value ( GMP_Integer x)
related

Definition at line 116 of file GMP_Integer_inlines.hh.

116  {
117  return x;
118 }
void Parma_Polyhedra_Library::rem_assign ( GMP_Integer x,
const GMP_Integer y,
const GMP_Integer z 
)
related

Definition at line 57 of file GMP_Integer_inlines.hh.

Referenced by Parma_Polyhedra_Library::Pointset_Powerset< PSET >::approximate_partition_aux().

57  {
58  mpz_tdiv_r(x.get_mpz_t(), y.get_mpz_t(), z.get_mpz_t());
59 }
void Parma_Polyhedra_Library::restore_pre_PPL_rounding ( )
inline

Sets the FPU rounding mode as it was before initialization of the PPL.

This is important if the application uses floating-point computations outside the PPL. It is crucial when the application uses functions from a mathematical library that are not guaranteed to work correctly under all rounding modes.

After calling this function it is absolutely necessary to call set_rounding_for_PPL() before using any PPL abstractions based on floating point numbers. This is performed automatically at finalization-time.

Definition at line 40 of file Init_inlines.hh.

References fpu_set_rounding_direction(), and Parma_Polyhedra_Library::Init::old_rounding_direction.

40  {
41 #if PPL_CAN_CONTROL_FPU
42  fpu_set_rounding_direction(Init::old_rounding_direction);
43 #endif
44 }
void fpu_set_rounding_direction(fpu_rounding_direction_type dir)
Sets the FPU rounding direction to dir.
int Parma_Polyhedra_Library::result_overflow ( Result  r)
inline

Definition at line 73 of file Result_inlines.hh.

References result_class(), V_GT_SUP, V_LT_INF, VC_MINUS_INFINITY, VC_NORMAL, and VC_PLUS_INFINITY.

Referenced by Parma_Polyhedra_Library::Checked::add_mul_int(), Parma_Polyhedra_Library::Checked::sub_mul_int(), Parma_Polyhedra_Library::Implementation::wrap_assign(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::wrap_assign().

73  {
74  switch (result_class(r)) {
75  case VC_NORMAL:
76  switch (r) {
77  case V_LT_INF:
78  return -1;
79  case V_GT_SUP:
80  return 1;
81  default:
82  break;
83  }
84  break;
85  case VC_MINUS_INFINITY:
86  return -1;
87  case VC_PLUS_INFINITY:
88  return 1;
89  default:
90  break;
91  }
92  return 0;
93 }
A positive integer overflow occurred (rounding down).
Definition: Result_defs.hh:108
Negative infinity result class.
Definition: Result_defs.hh:34
Positive infinity result class.
Definition: Result_defs.hh:37
Result_Class result_class(Result r)
Representable number result class.
Definition: Result_defs.hh:31
A negative integer overflow occurred (rounding up).
Definition: Result_defs.hh:105
bool Parma_Polyhedra_Library::result_representable ( Result  r)
inline
void Parma_Polyhedra_Library::set_irrational_precision ( const unsigned  p)
inline

Sets the precision parameter used for irrational calculations.

The lesser between numerator and denominator is limited to 2**p.

If p is less than or equal to INT_MAX, sets the precision parameter used for irrational calculations to p.

Exceptions
std::invalid_argumentThrown if p is greater than INT_MAX.

Definition at line 549 of file checked_mpq_inlines.hh.

References Parma_Polyhedra_Library::Checked::irrational_precision.

Referenced by Parma_Polyhedra_Library::Init::Init().

549  {
550  if (p <= INT_MAX) {
552  }
553  else {
554  throw std::invalid_argument("PPL::set_irrational_precision(p)"
555  " with p > INT_MAX");
556  }
557 }
unsigned irrational_precision()
Returns the precision parameter used for irrational calculations.
void Parma_Polyhedra_Library::set_rounding_for_PPL ( )
inline

Sets the FPU rounding mode so that the PPL abstractions based on floating point numbers work correctly.

This is performed automatically at initialization-time. Calling this function is needed only if restore_pre_PPL_rounding() has been previously called.

Definition at line 33 of file Init_inlines.hh.

References fpu_set_rounding_direction(), ROUND_DIRECT, and round_fpu_dir().

33  {
34 #if PPL_CAN_CONTROL_FPU
36 #endif
37 }
fpu_rounding_direction_type round_fpu_dir(Rounding_Dir dir)
void fpu_set_rounding_direction(fpu_rounding_direction_type dir)
Sets the FPU rounding direction to dir.
template<typename D1 , typename D2 >
bool Parma_Polyhedra_Library::shrink_to_congruence_no_check ( D1 &  d1,
D2 &  d2,
const Congruence cg 
)

Definition at line 551 of file Partially_Reduced_Product_templates.hh.

References EMPTY, Parma_Polyhedra_Library::Congruence::expression(), Parma_Polyhedra_Library::Poly_Con_Relation::is_included(), Parma_Polyhedra_Library::Congruence::modulus(), PPL_DIRTY_TEMP_COEFFICIENT, and swap().

Referenced by Parma_Polyhedra_Library::Congruences_Reduction< D1, D2 >::product_reduce().

551  {
552  // It is assumed that cg is a proper congruence.
553  PPL_ASSERT(cg.modulus() != 0);
554  // It is assumed that cg is satisfied by all points in d1.
555  PPL_ASSERT(d1.relation_with(cg) == Poly_Con_Relation::is_included());
556 
557  Linear_Expression e(cg.expression());
558 
559  // Find the maximum and minimum bounds for the domain element d with the
560  // linear expression e.
561  PPL_DIRTY_TEMP_COEFFICIENT(max_numer);
562  PPL_DIRTY_TEMP_COEFFICIENT(max_denom);
563  bool max_included;
564  PPL_DIRTY_TEMP_COEFFICIENT(min_numer);
565  PPL_DIRTY_TEMP_COEFFICIENT(min_denom);
566  if (d2.maximize(e, max_numer, max_denom, max_included)) {
567  bool min_included;
568  if (d2.minimize(e, min_numer, min_denom, min_included)) {
569  // Adjust values to allow for the denominators max_denom and min_denom.
570  max_numer *= min_denom;
571  min_numer *= max_denom;
574  denom = max_denom * min_denom;
575  mod = cg.modulus() * denom;
576  // If the difference between the maximum and minimum bounds is more than
577  // twice the modulus, then there will be two neighboring hyperplanes
578  // defined by cg that are intersected by the domain element d;
579  // there is no possible reduction in this case.
581  mod2 = 2 * mod;
582  if (max_numer - min_numer < mod2
583  || (max_numer - min_numer == mod2 && (!max_included || !min_included)))
584  {
585  PPL_DIRTY_TEMP_COEFFICIENT(shrink_amount);
586  PPL_DIRTY_TEMP_COEFFICIENT(max_decreased);
587  PPL_DIRTY_TEMP_COEFFICIENT(min_increased);
588  // Find the amount by which the maximum value may be decreased.
589  shrink_amount = max_numer % mod;
590  if (!max_included && shrink_amount == 0) {
591  shrink_amount = mod;
592  }
593  if (shrink_amount < 0) {
594  shrink_amount += mod;
595  }
596  max_decreased = max_numer - shrink_amount;
597  // Find the amount by which the minimum value may be increased.
598  shrink_amount = min_numer % mod;
599  if (!min_included && shrink_amount == 0) {
600  shrink_amount = - mod;
601  }
602  if (shrink_amount > 0) {
603  shrink_amount -= mod;
604  }
605  min_increased = min_numer - shrink_amount;
606  if (max_decreased == min_increased) {
607  // The domain element d2 intersects exactly one hyperplane
608  // defined by cg, so add the equality to d1 and d2.
609  Constraint new_c(denom * e == min_increased);
610  d1.refine_with_constraint(new_c);
611  d2.refine_with_constraint(new_c);
612  return true;
613  }
614  else {
615  if (max_decreased < min_increased) {
616  using std::swap;
617  // In this case, d intersects no hyperplanes defined by cg,
618  // so set d to empty and return false.
619  D1 new_d1(d1.space_dimension(), EMPTY);
620  swap(d1, new_d1);
621  D2 new_d2(d2.space_dimension(), EMPTY);
622  swap(d2, new_d2);
623  return false;
624  }
625  }
626  }
627  }
628  }
629  return true;
630 }
The empty element, i.e., the empty set.
void swap(CO_Tree &x, CO_Tree &y)
#define PPL_DIRTY_TEMP_COEFFICIENT(id)
Declare a local variable named id, of type Coefficient, and containing an unknown initial value...
void swap(Affine_Space &x, Affine_Space &y)
Swaps x with y.
void Parma_Polyhedra_Library::sqrt_assign ( GMP_Integer x,
const GMP_Integer y 
)
related

Definition at line 101 of file GMP_Integer_inlines.hh.

101  {
102  mpz_sqrt(x.get_mpz_t(), y.get_mpz_t());
103 }
void Parma_Polyhedra_Library::sub_mul_assign ( Linear_Expression e1,
Coefficient_traits::const_reference  factor,
const Linear_Expression e2 
)
related

Definition at line 408 of file Linear_Expression_inlines.hh.

References Parma_Polyhedra_Library::Linear_Expression::impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::sub_mul_assign().

410  {
411  e1.impl->sub_mul_assign(factor, *e2.impl);
412 }
void Parma_Polyhedra_Library::swap ( Variable x,
Variable y 
)
related

Definition at line 94 of file Variable_inlines.hh.

References Parma_Polyhedra_Library::Variable::m_swap().

Referenced by Parma_Polyhedra_Library::Variable::m_swap().

94  {
95  x.m_swap(y);
96 }
template<typename T >
Enable_If<Slow_Copy<T>::value, void>::type Parma_Polyhedra_Library::swap ( T &  ,
T &   
)
inline

Make sure swap() is specialized when needed.

This will cause a compile-time error whenever a specialization for T is beneficial but missing.

Definition at line 122 of file globals_defs.hh.

References PPL_COMPILE_TIME_CHECK.

122  {
123  PPL_COMPILE_TIME_CHECK(!Slow_Copy<T>::value, "missing swap specialization");
124 }
#define PPL_COMPILE_TIME_CHECK(e, msg)
Produces a compilation error if the compile-time constant e does not evaluate to true ...
Coefficient value
Definition: PIP_Tree.cc:618
template<typename Row >
void Parma_Polyhedra_Library::swap ( Matrix< Row > &  x,
Matrix< Row > &  y 
)
related

Definition at line 194 of file Matrix_inlines.hh.

References Parma_Polyhedra_Library::Matrix< Row >::m_swap().

Referenced by Parma_Polyhedra_Library::Matrix< Row >::m_swap().

194  {
195  x.m_swap(y);
196 }
template<typename T >
void Parma_Polyhedra_Library::swap ( Swapping_Vector< T > &  vec1,
Swapping_Vector< T > &  vec2 
)
related
void Parma_Polyhedra_Library::swap ( Parma_Polyhedra_Library::Sparse_Row x,
Parma_Polyhedra_Library::Dense_Row y 
)

Definition at line 1171 of file Sparse_Row.cc.

References Parma_Polyhedra_Library::Sparse_Row::begin(), Parma_Polyhedra_Library::Sparse_Row::end(), Parma_Polyhedra_Library::Sparse_Row::size(), and swap().

1171  {
1172  Dense_Row new_dense(x.size(), x.size());
1173 
1174  for (Sparse_Row::iterator i = x.begin(), i_end = x.end();
1175  i != i_end; ++i) {
1176  swap(new_dense[i.index()], *i);
1177  }
1178 
1179  // NOTE: This copies the coefficients, but it could steal them.
1180  // Implementing a stealing-based algorithm takes a lot of time and it's
1181  // probably not worth it.
1182  Sparse_Row new_sparse(y);
1183 
1184  swap(new_dense, y);
1185  swap(new_sparse, x);
1186 }
dimension_type size() const
Returns the size of the row.
const iterator & end()
Returns an iterator that points after the last stored element.
void swap(Affine_Space &x, Affine_Space &y)
Swaps x with y.
iterator begin()
Returns an iterator that points at the first stored element.
void Parma_Polyhedra_Library::swap ( Parma_Polyhedra_Library::Dense_Row x,
Parma_Polyhedra_Library::Sparse_Row y 
)

Definition at line 1189 of file Sparse_Row.cc.

References swap().

1189  {
1190  swap(y, x);
1191 }
void swap(Affine_Space &x, Affine_Space &y)
Swaps x with y.
void Parma_Polyhedra_Library::swap ( CO_Tree x,
CO_Tree y 
)
related

Definition at line 873 of file CO_Tree_inlines.hh.

References Parma_Polyhedra_Library::CO_Tree::m_swap().

Referenced by Parma_Polyhedra_Library::Polyhedron::add_recycled_generators(), Parma_Polyhedra_Library::Bit_Matrix::add_recycled_row(), Parma_Polyhedra_Library::Matrix< Row >::add_recycled_row(), Parma_Polyhedra_Library::Matrix< Row >::add_row(), Parma_Polyhedra_Library::Congruence_System::add_unit_rows_and_space_dimensions(), Parma_Polyhedra_Library::Linear_System< Row >::add_universe_rows_and_space_dimensions(), Parma_Polyhedra_Library::Dense_Row::add_zeroes_and_shift(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_form_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::affine_image(), Parma_Polyhedra_Library::Pointset_Ask_Tell< PSET >::ascii_load(), Parma_Polyhedra_Library::Pointset_Powerset< PSET >::ascii_load(), assign_or_swap(), Parma_Polyhedra_Library::Linear_System< Row >::assign_with_pending(), Parma_Polyhedra_Library::Pointset_Powerset< PSET >::BGP99_heuristics_assign(), Parma_Polyhedra_Library::Pointset_Powerset< PSET >::BHZ03_widening_assign(), Parma_Polyhedra_Library::CO_Tree::bisect_near(), Parma_Polyhedra_Library::Bit_Matrix::clear(), Parma_Polyhedra_Library::PIP_Tree_Node::compatibility_check(), Parma_Polyhedra_Library::Congruence_System::concatenate(), Parma_Polyhedra_Library::Pointset_Powerset< PSET >::concatenate_assign(), Parma_Polyhedra_Library::Polyhedron::concatenate_assign(), Parma_Polyhedra_Library::Polyhedron::constraints(), Parma_Polyhedra_Library::Linear_Expression_Impl< Row >::construct(), Parma_Polyhedra_Library::Polyhedron::conversion(), Parma_Polyhedra_Library::Pointset_Powerset< PSET >::difference_assign(), Parma_Polyhedra_Library::Swapping_Vector< T >::erase(), Parma_Polyhedra_Library::CO_Tree::erase(), Parma_Polyhedra_Library::Octagonal_Shape< T >::extract_octagonal_difference(), Parma_Polyhedra_Library::Linear_System< Row >::gauss(), Parma_Polyhedra_Library::Polyhedron::generators(), Parma_Polyhedra_Library::DB_Matrix< T >::grow(), Parma_Polyhedra_Library::Linear_Expression_Impl< Row >::has_a_free_dimension_helper(), Parma_Polyhedra_Library::Congruence_System::insert(), Parma_Polyhedra_Library::Linear_System< Row >::insert_pending_no_ok(), Parma_Polyhedra_Library::CO_Tree::insert_precise(), Parma_Polyhedra_Library::Congruence_System::insert_verbatim(), Parma_Polyhedra_Library::Pointset_Powerset< PSET >::intersection_preserving_enlarge_element(), Parma_Polyhedra_Library::Pointset_Powerset< PSET >::is_universe(), Parma_Polyhedra_Library::Bit_Row::iter_swap(), Parma_Polyhedra_Library::DB_Row< T >::iter_swap(), Parma_Polyhedra_Library::Linear_Expression::Linear_Expression(), Parma_Polyhedra_Library::Swapping_Vector< T >::m_swap(), Parma_Polyhedra_Library::Bit_Matrix::m_swap(), Parma_Polyhedra_Library::Matrix< Row >::m_swap(), Parma_Polyhedra_Library::Dense_Row::m_swap(), Parma_Polyhedra_Library::Linear_System< Row >::m_swap(), Parma_Polyhedra_Library::Interval< Boundary, Info >::m_swap(), Parma_Polyhedra_Library::Sparse_Row::m_swap(), Parma_Polyhedra_Library::Constant_Floating_Point_Expression< FP_Interval_Type, FP_Format >::m_swap(), Parma_Polyhedra_Library::Cast_Floating_Point_Expression< FP_Interval_Type, FP_Format >::m_swap(), Parma_Polyhedra_Library::Variable_Floating_Point_Expression< FP_Interval_Type, FP_Format >::m_swap(), Parma_Polyhedra_Library::Opposite_Floating_Point_Expression< FP_Interval_Type, FP_Format >::m_swap(), Parma_Polyhedra_Library::DB_Matrix< T >::m_swap(), Parma_Polyhedra_Library::Sum_Floating_Point_Expression< FP_Interval_Type, FP_Format >::m_swap(), Parma_Polyhedra_Library::Difference_Floating_Point_Expression< FP_Interval_Type, FP_Format >::m_swap(), Parma_Polyhedra_Library::DB_Row< T >::m_swap(), Parma_Polyhedra_Library::Determinate< PSET >::m_swap(), Parma_Polyhedra_Library::Division_Floating_Point_Expression< FP_Interval_Type, FP_Format >::m_swap(), Parma_Polyhedra_Library::Multiplication_Floating_Point_Expression< FP_Interval_Type, FP_Format >::m_swap(), Parma_Polyhedra_Library::Interval_Info_Bitset< T, Policy >::m_swap(), Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::m_swap(), Parma_Polyhedra_Library::Ask_Tell< D >::m_swap(), Parma_Polyhedra_Library::Linear_Form< C >::m_swap(), Parma_Polyhedra_Library::Congruence::m_swap(), Parma_Polyhedra_Library::Pointset_Ask_Tell< PSET >::m_swap(), Parma_Polyhedra_Library::Powerset< D >::m_swap(), Parma_Polyhedra_Library::Congruence_System::m_swap(), Parma_Polyhedra_Library::OR_Matrix< T >::m_swap(), Parma_Polyhedra_Library::Linear_Expression::const_iterator::m_swap(), Parma_Polyhedra_Library::MIP_Problem::m_swap(), Parma_Polyhedra_Library::Box< ITV >::m_swap(), Parma_Polyhedra_Library::Constraint::m_swap(), Parma_Polyhedra_Library::Grid_Generator::m_swap(), Parma_Polyhedra_Library::Generator::m_swap(), Parma_Polyhedra_Library::BD_Shape< T >::m_swap(), Parma_Polyhedra_Library::Octagonal_Shape< T >::m_swap(), Parma_Polyhedra_Library::Linear_Expression::m_swap(), Parma_Polyhedra_Library::PIP_Problem::m_swap(), Parma_Polyhedra_Library::Pointset_Powerset< PSET >::m_swap(), Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::m_swap(), Parma_Polyhedra_Library::Grid::m_swap(), Parma_Polyhedra_Library::Polyhedron::m_swap(), Parma_Polyhedra_Library::Box< ITV >::map_space_dimensions(), Parma_Polyhedra_Library::Octagonal_Shape< T >::map_space_dimensions(), Parma_Polyhedra_Library::BD_Shape< T >::map_space_dimensions(), Parma_Polyhedra_Library::Linear_System< Row >::merge_rows_assign(), Parma_Polyhedra_Library::BD_Shape< T >::one_variable_affine_form_image(), Parma_Polyhedra_Library::Implementation::Indirect_Swapper< RA_Container >::operator()(), Parma_Polyhedra_Library::Implementation::Indirect_Swapper2< RA_Container1, RA_Container2 >::operator()(), Parma_Polyhedra_Library::Pointset_Ask_Tell< PSET >::operator=(), Parma_Polyhedra_Library::Linear_System< Row >::operator=(), Parma_Polyhedra_Library::Sparse_Row::operator=(), Parma_Polyhedra_Library::Pointset_Powerset< PSET >::operator=(), Parma_Polyhedra_Library::Linear_Expression::const_iterator::operator=(), Parma_Polyhedra_Library::Constraint::operator==(), Parma_Polyhedra_Library::Powerset< D >::pairwise_apply_assign(), Parma_Polyhedra_Library::Pointset_Powerset< PSET >::pairwise_reduce(), Parma_Polyhedra_Library::Matrix< Row >::permute_columns(), Parma_Polyhedra_Library::Linear_Expression_Impl< Row >::permute_space_dimensions(), Parma_Polyhedra_Library::Polyhedron::Polyhedron(), Parma_Polyhedra_Library::Polyhedron::positive_time_elapse_assign_impl(), Parma_Polyhedra_Library::Smash_Reduction< D1, D2 >::product_reduce(), Parma_Polyhedra_Library::Constraints_Reduction< D1, D2 >::product_reduce(), Parma_Polyhedra_Library::MIP_Problem::RAII_Temporary_Real_Relaxation::RAII_Temporary_Real_Relaxation(), Parma_Polyhedra_Library::Grid::remove_higher_space_dimensions(), Parma_Polyhedra_Library::Linear_System< Row >::remove_row_no_ok(), Parma_Polyhedra_Library::Linear_System< Row >::remove_rows(), Parma_Polyhedra_Library::Congruence_System::remove_rows(), Parma_Polyhedra_Library::Box< ITV >::remove_space_dimensions(), Parma_Polyhedra_Library::BD_Shape< T >::remove_space_dimensions(), Parma_Polyhedra_Library::Swapping_Vector< T >::reserve(), Parma_Polyhedra_Library::Bit_Matrix::resize(), Parma_Polyhedra_Library::DB_Matrix< T >::resize_no_copy(), Parma_Polyhedra_Library::MIP_Problem::second_phase(), Parma_Polyhedra_Library::Polyhedron::select_H79_constraints(), Parma_Polyhedra_Library::Grid::set_empty(), Parma_Polyhedra_Library::Linear_Expression::set_representation(), Parma_Polyhedra_Library::BD_Shape< T >::shortest_path_reduction_assign(), shrink_to_congruence_no_check(), Parma_Polyhedra_Library::Linear_System< Row >::simplify(), Parma_Polyhedra_Library::Grid::simplify(), Parma_Polyhedra_Library::Polyhedron::simplify(), Parma_Polyhedra_Library::Polyhedron::simplify_using_context_assign(), Parma_Polyhedra_Library::PIP_Solution_Node::solve(), Parma_Polyhedra_Library::PIP_Decision_Node::solve(), Parma_Polyhedra_Library::Linear_System< Row >::sort_and_remove_with_sat(), Parma_Polyhedra_Library::Linear_System< Row >::sort_pending_and_remove_duplicates(), Parma_Polyhedra_Library::MIP_Problem::steepest_edge_exact_entering_index(), Parma_Polyhedra_Library::Polyhedron::strongly_minimize_constraints(), Parma_Polyhedra_Library::Polyhedron::strongly_minimize_generators(), Parma_Polyhedra_Library::Checked_Number< T, Policy >::swap(), swap(), Parma_Polyhedra_Library::Dense_Row::swap_coefficients(), Parma_Polyhedra_Library::Sparse_Row::swap_coefficients(), Parma_Polyhedra_Library::Linear_System< Row >::swap_row_intervals(), Parma_Polyhedra_Library::Polyhedron::time_elapse_assign(), Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::upper_bound_assign_if_exact(), and Parma_Polyhedra_Library::MIP_Problem::RAII_Temporary_Real_Relaxation::~RAII_Temporary_Real_Relaxation().

873  {
874  x.m_swap(y);
875 }
void Parma_Polyhedra_Library::swap ( CO_Tree::const_iterator x,
CO_Tree::const_iterator y 
)
related

Definition at line 878 of file CO_Tree_inlines.hh.

References Parma_Polyhedra_Library::CO_Tree::const_iterator::m_swap().

878  {
879  x.m_swap(y);
880 }
void Parma_Polyhedra_Library::throw_result_exception ( Result  r)

Definition at line 30 of file Checked_Number.cc.

References V_CVT_STR_UNK, V_DIV_ZERO, V_EMPTY, V_EQ, V_EQ_MINUS_INFINITY, V_EQ_PLUS_INFINITY, V_GE, V_GT, V_GT_MINUS_INFINITY, V_GT_SUP, V_INF_ADD_INF, V_INF_DIV_INF, V_INF_MOD, V_INF_MUL_ZERO, V_INF_SUB_INF, V_LE, V_LGE, V_LT, V_LT_INF, V_LT_PLUS_INFINITY, V_MOD_ZERO, V_NAN, V_NE, V_SQRT_NEG, V_UNKNOWN_NEG_OVERFLOW, V_UNKNOWN_POS_OVERFLOW, and V_UNREPRESENTABLE.

Referenced by Parma_Polyhedra_Library::Extended_Number_Policy::handle_result(), Parma_Polyhedra_Library::WRD_Extended_Number_Policy::handle_result(), and Parma_Polyhedra_Library::Debug_WRD_Extended_Number_Policy::handle_result().

30  {
31  switch (r - V_UNREPRESENTABLE) {
32  case V_EMPTY:
33  throw std::domain_error("Exact result is not comparable to computable one.");
34  case V_EQ:
35  throw std::logic_error("Exact result is equal to computed one.");
36  case V_LT:
37  throw std::logic_error("Exact result is less than computed one.");
38  case V_LE:
39  throw std::logic_error("Exact result is less than or equal to "
40  "computed one.");
41  case V_GT:
42  throw std::logic_error("Exact result is greater than computed one.");
43  case V_GE:
44  throw std::logic_error("Exact result is greater than or equal to "
45  "computed one.");
46  case V_NE:
47  throw std::logic_error("Exact result is less than or greater than "
48  "computed one.");
49  case V_LGE:
50  throw std::logic_error("Exact result is less than, greater than or "
51  "equal to computed one.");
53  throw std::overflow_error("Minus infinity.");
55  case V_LT_INF:
56  throw std::overflow_error("Negative overflow.");
58  throw std::overflow_error("Unknown result due to intermediate negative overflow.");
59  case V_EQ_PLUS_INFINITY:
60  throw std::overflow_error("Plus infinity.");
61  case V_LT_PLUS_INFINITY:
62  case V_GT_SUP:
63  throw std::overflow_error("Positive overflow.");
65  throw std::overflow_error("Unknown result due to intermediate positive overflow.");
66  case V_NAN:
67  throw std::domain_error("Not-a-Number.");
68  case V_CVT_STR_UNK:
69  throw std::domain_error("Invalid numeric string.");
70  case V_DIV_ZERO:
71  throw std::domain_error("Division by zero.");
72  case V_INF_ADD_INF:
73  throw std::domain_error("Infinities addition.");
74  case V_INF_DIV_INF:
75  throw std::domain_error("Infinities division.");
76  case V_INF_MOD:
77  throw std::domain_error("Remainder of division of infinity.");
78  case V_INF_MUL_ZERO:
79  throw std::domain_error("Multiplication of infinity and zero.");
80  case V_INF_SUB_INF:
81  throw std::domain_error("Subtraction of infinities.");
82  case V_MOD_ZERO:
83  throw std::domain_error("Remainder of division by zero.");
84  case V_SQRT_NEG:
85  throw std::domain_error("Square root of negative number.");
86  default:
87  throw std::logic_error("Unexpected result.");
88  }
89 }
A positive integer overflow occurred (rounding down).
Definition: Result_defs.hh:108
The computed result is exact.
Definition: Result_defs.hh:81
Taking the square root of a negative number.
Definition: Result_defs.hh:150
Unknown result due to intermediate positive overflow.
Definition: Result_defs.hh:156
A positive integer overflow occurred (rounding up).
Definition: Result_defs.hh:111
Computing a remainder modulo zero.
Definition: Result_defs.hh:147
Not a number result.
Definition: Result_defs.hh:123
Taking the modulus of an infinity.
Definition: Result_defs.hh:138
The computed result is inexact and rounded down.
Definition: Result_defs.hh:87
The exact result is not comparable.
Definition: Result_defs.hh:78
Unknown result due to intermediate negative overflow.
Definition: Result_defs.hh:153
The computed result is not representable.
Definition: Result_defs.hh:159
The computed result is inexact.
Definition: Result_defs.hh:90
Converting from unknown string.
Definition: Result_defs.hh:126
The computed result may be inexact and rounded up.
Definition: Result_defs.hh:93
Adding two infinities having opposite signs.
Definition: Result_defs.hh:132
The computed result may be inexact and rounded down.
Definition: Result_defs.hh:96
Subtracting two infinities having the same sign.
Definition: Result_defs.hh:144
A negative integer overflow occurred (rounding down).
Definition: Result_defs.hh:114
The computed result is inexact and rounded up.
Definition: Result_defs.hh:84
The computed result may be inexact.
Definition: Result_defs.hh:99
Multiplying an infinity by zero.
Definition: Result_defs.hh:141
A negative integer overflow occurred (rounding up).
Definition: Result_defs.hh:105
template<typename T >
Enable_If< Is_Native< T >::value, memory_size_type >::type Parma_Polyhedra_Library::total_memory_in_bytes ( const T &  )
inline

For native types, returns the total size in bytes of the memory occupied by the type of the (unused) parameter, i.e., 0.

Definition at line 113 of file globals_inlines.hh.

Referenced by Parma_Polyhedra_Library::Checked_Number< T, Policy >::total_memory_in_bytes().

113  {
114  return sizeof(T);
115 }
memory_size_type Parma_Polyhedra_Library::total_memory_in_bytes ( const mpz_class &  x)
inline

Returns the total size in bytes of the memory occupied by x.

Definition at line 124 of file globals_inlines.hh.

References external_memory_in_bytes().

124  {
125  return sizeof(x) + external_memory_in_bytes(x);
126 }
memory_size_type external_memory_in_bytes(const Checked_Number< T, Policy > &x)
Returns the size in bytes of the memory managed by x.
memory_size_type Parma_Polyhedra_Library::total_memory_in_bytes ( const mpq_class &  x)
inline

Returns the total size in bytes of the memory occupied by x.

Definition at line 135 of file globals_inlines.hh.

References external_memory_in_bytes().

135  {
136  return sizeof(x) + external_memory_in_bytes(x);
137 }
memory_size_type external_memory_in_bytes(const Checked_Number< T, Policy > &x)
Returns the size in bytes of the memory managed by x.
template<typename FP_Interval_Type >
void Parma_Polyhedra_Library::upper_bound_assign ( std::map< dimension_type, Linear_Form< FP_Interval_Type > > &  ls1,
const std::map< dimension_type, Linear_Form< FP_Interval_Type > > &  ls2 
)
related

Definition at line 153 of file Float_templates.hh.

Referenced by Parma_Polyhedra_Library::Polyhedron::BFT00_poly_hull_assign_if_exact(), Parma_Polyhedra_Library::BD_Shape< T >::BFT00_upper_bound_assign_if_exact(), Parma_Polyhedra_Library::BD_Shape< T >::BHZ09_upper_bound_assign_if_exact(), Parma_Polyhedra_Library::Grid::fold_space_dimensions(), Parma_Polyhedra_Library::Octagonal_Shape< T >::integer_upper_bound_assign_if_exact(), Parma_Polyhedra_Library::Octagonal_Shape< T >::upper_bound_assign_if_exact(), and Parma_Polyhedra_Library::Grid::upper_bound_assign_if_exact().

156  {
157  typedef Linear_Form<FP_Interval_Type> FP_Linear_Form;
158  typedef typename std::map<dimension_type, FP_Linear_Form>::iterator Iter;
159  typedef typename std::map<dimension_type,
160  FP_Linear_Form>::const_iterator Const_Iter;
161 
162  Const_Iter i2_end = ls2.end();
163  for (Iter i1 = ls1.begin(), i1_end = ls1.end(); i1 != i1_end; ) {
164  Const_Iter i2 = ls2.find(i1->first);
165  if ((i2 == i2_end) || (i1->second != i2->second)) {
166  i1 = ls1.erase(i1);
167  }
168  else {
169  ++i1;
170  }
171  }
172 }
size_t dimension_type
An unsigned integral type for representing space dimensions.
const char * Parma_Polyhedra_Library::version ( )

Returns a character string containing the PPL version.

Definition at line 101 of file version.cc.

101  {
102  return version_string;
103 }
unsigned Parma_Polyhedra_Library::version_beta ( )

Returns the beta number of the PPL version.

Definition at line 96 of file version.cc.

References PPL_VERSION_BETA.

96  {
97  return PPL_VERSION_BETA;
98 }
#define PPL_VERSION_BETA
The beta number of the PPL version. This is zero for official releases and nonzero for development sn...
Definition: version.hh:45
unsigned Parma_Polyhedra_Library::version_major ( )

Returns the major number of the PPL version.

Definition at line 81 of file version.cc.

References PPL_VERSION_MAJOR.

81  {
82  return PPL_VERSION_MAJOR;
83 }
#define PPL_VERSION_MAJOR
The major number of the PPL version.
Definition: version.hh:30
unsigned Parma_Polyhedra_Library::version_minor ( )

Returns the minor number of the PPL version.

Definition at line 86 of file version.cc.

References PPL_VERSION_MINOR.

86  {
87  return PPL_VERSION_MINOR;
88 }
#define PPL_VERSION_MINOR
The minor number of the PPL version.
Definition: version.hh:34
unsigned Parma_Polyhedra_Library::version_revision ( )

Returns the revision number of the PPL version.

Definition at line 91 of file version.cc.

References PPL_VERSION_REVISION.

91  {
92  return PPL_VERSION_REVISION;
93 }
#define PPL_VERSION_REVISION
The revision number of the PPL version.
Definition: version.hh:38

Variable Documentation

template<typename Unsigned >
Parma_Polyhedra_Library::Enable_If<(static_cast< Unsigned >-1) >
inline

Definition at line 270 of file OR_Matrix_inlines.hh.

Not_A_Number Parma_Polyhedra_Library::NOT_A_NUMBER

Definition at line 32 of file checked.cc.

Referenced by not_a_number().

Plus_Infinity Parma_Polyhedra_Library::PLUS_INFINITY

Definition at line 31 of file checked.cc.

Referenced by Parma_Polyhedra_Library::Interval< Boundary, Info >::add_assign(), Parma_Polyhedra_Library::BD_Shape< T >::BD_Shape(), Parma_Polyhedra_Library::Octagonal_Shape< T >::BHMZ05_widening_assign(), Parma_Polyhedra_Library::BD_Shape< T >::BHMZ05_widening_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::CC76_extrapolation_assign(), Parma_Polyhedra_Library::BD_Shape< T >::CC76_extrapolation_assign(), Parma_Polyhedra_Library::Interval< Boundary, Info >::div_assign(), Parma_Polyhedra_Library::BD_Shape< T >::euclidean_distance_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::euclidean_distance_assign(), Parma_Polyhedra_Library::DB_Row_Impl_Handler< T >::Impl::expand_within_capacity(), Parma_Polyhedra_Library::BD_Shape< T >::forget_all_dbm_constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::forget_all_octagonal_constraints(), Parma_Polyhedra_Library::BD_Shape< T >::forget_binary_dbm_constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::forget_binary_octagonal_constraints(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::incremental_shortest_path_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::incremental_strong_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::is_strongly_reduced(), Parma_Polyhedra_Library::BD_Shape< T >::l_infinity_distance_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::l_infinity_distance_assign(), Parma_Polyhedra_Library::DB_Matrix< T >::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::Interval< Boundary, Info >::mul_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::Octagonal_Shape(), plus_infinity(), Parma_Polyhedra_Library::BD_Shape< T >::rectilinear_distance_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::rectilinear_distance_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine_with_linear_form_inequality(), Parma_Polyhedra_Library::Boundary_NS::set_boundary_infinity(), Parma_Polyhedra_Library::Boundary_NS::set_plus_infinity(), Parma_Polyhedra_Library::Boundary_NS::set_unbounded(), Parma_Polyhedra_Library::BD_Shape< T >::shortest_path_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::strong_closure_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::strong_reduction_assign(), and Parma_Polyhedra_Library::Interval< Boundary, Info >::sub_assign().