Parma_Polyhedra_Library Namespace Reference
[C++ Language Interface]

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


Classes

struct  float_ieee754_single
struct  float_ieee754_double
struct  float_intel_double_extended
struct  float_ieee754_quad
class  Float
struct  Checked_Number_Transparent_Policy
struct  Checked_Number_Default_Policy
struct  Extended_Number_Policy
struct  Native_Checked_From_Wrapper
struct  Native_Checked_From_Wrapper< Checked_Number< T, P > >
struct  Native_Checked_To_Wrapper
struct  Native_Checked_To_Wrapper< Checked_Number< T, P > >
class  Checked_Number
 A wrapper for numeric types implementing a given policy. More...
struct  Coefficient_traits_template< GMP_Integer >
 Coefficient traits specialization for unbounded integers. More...
struct  Coefficient_traits_template
 Coefficient traits. More...
struct  Minus_Infinity
struct  Plus_Infinity
struct  Not_A_Number
class  Init
 Class for initialization and finalization. More...
class  Coefficient_free_list_element
 A node of the list of available coefficients. More...
class  Temp_Coefficient_Holder
class  Throwable
 User objects the PPL can throw. More...
struct  From_Bounding_Box
 A tag class. More...
struct  From_Covering_Box
 A tag class. More...
class  Row_Impl_Handler
 The handler of the actual Row implementation. More...
class  Row
 A finite sequence of coefficients. More...
class  Matrix
 A 2-dimensional matrix of coefficients. More...
class  Linear_Row
 The base class for linear expressions, constraints and generators. More...
class  Linear_System
 The base class for systems of constraints and generators. More...
class  Saturation_Row
 A row of a saturation matrix. More...
class  Saturation_Matrix
 A saturation matrix. More...
class  Variable
 A dimension of the vector space. More...
class  Linear_Expression
 A linear expression. More...
class  Constraint
 A linear equality or inequality. More...
class  Congruence
 A linear congruence. More...
class  Generator
 A line, ray, point or closure point. More...
class  Grid_Generator
 A line, parameter or point. More...
class  Constraint_System
 A system of constraints. More...
class  Congruence_System
 A system of congruences. More...
class  Generator_System
 A system of generators. More...
class  Grid_Generator_System
 A system of grid generators. More...
class  Scalar_Products
 A class implementing various scalar product functions. More...
class  Topology_Adjusted_Scalar_Product_Sign
 Scalar product sign function object depending on topology. More...
class  Polyhedron
 The base class for convex polyhedra. More...
class  Grid
 A grid. 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  Boundary
 An extended rational bound of an interval. More...
class  LBoundary
 The lower bound of an extended rational interval. More...
class  UBoundary
 The upper bound of an extended rational interval. More...
class  Interval
 A interval over the set of rational numbers. More...
class  Bounding_Box
 A not necessarily closed bounding-box. More...
class  C_Polyhedron
 A closed convex polyhedron. More...
class  NNC_Polyhedron
 A not necessarily closed convex polyhedron. More...
class  Widening_Function
 Wraps a widening method into a function object. More...
class  Limited_Widening_Function
 Wraps a limited widening method into a function object. More...
class  BHRZ03_Certificate
 The convergence certificate for the BHRZ03 widening operator. More...
class  H79_Certificate
 A convergence certificate for the H79 widening operator. More...
class  Grid_Certificate
 The convergence certificate for the Grid widening operator. More...
class  Determinate
 Wraps a PPL class into a determinate constraint system interface. More...
class  Powerset
 The powerset construction on a base-level domain. More...
class  Polyhedra_Powerset
 The powerset construction instantiated on PPL polyhedra. More...
class  LP_Problem
 A Linear Programming problem. More...
class  DB_Row_Impl_Handler
 The handler of the actual DB_Row implementation. More...
class  DB_Row
 The base class for the single rows of matrices. More...
class  DB_Matrix
 The base class for the square matrices. More...
struct  maybe_assign_struct
struct  maybe_assign_struct< Type, Type >
struct  Rectilinear_Distance_Specialization
struct  Euclidean_Distance_Specialization
struct  L_Infinity_Distance_Specialization
class  BD_Shape
 A bounded difference shape. More...
class  GMP_Integer
 Unbounded integers as provided by the GMP library. More...

Namespaces

namespace  Checked
 Types and functions implementing checked numbers.
namespace  Implementation
 Implementation related data and functions.
namespace  IO_Operators
 All input/output operators are confined to this namespace.

Typedefs

typedef
Checked::Check_Overflow_Policy 
Default_To_Policy
typedef
Checked_Number_Transparent_Policy 
Default_From_Policy
typedef mpz_class GMP_Integer
typedef COEFFICIENT_TYPE Coefficient
 An alias for easily naming the type of PPL coefficients.
typedef
Coefficient_traits_template
< Coefficient
Coefficient_traits
 An alias for easily naming the coefficient traits.
typedef size_t dimension_type
 An unsigned integral type for representing space dimensions.
typedef size_t memory_size_type
 An unsigned integral type for representing memory size in bytes.
typedef std::set< Variable,
Variable::Compare
Variables_Set
 An std::set containing variables in increasing order of dimension index.
typedef Checked_Number
< mpq_class,
Extended_Number_Policy
ERational

Enumerations

enum  Degenerate_Element { UNIVERSE, EMPTY }
 Kinds of degenerate abstract elements. More...
enum  Relation_Symbol {
  LESS_THAN, LESS_THAN_OR_EQUAL, EQUAL, GREATER_THAN_OR_EQUAL,
  GREATER_THAN
}
 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  Topology { NECESSARILY_CLOSED = 0, NOT_NECESSARILY_CLOSED = 1 }
 Kinds of polyhedra domains. More...
enum  LP_Problem_Status { UNFEASIBLE_LP_PROBLEM, UNBOUNDED_LP_PROBLEM, OPTIMIZED_LP_PROBLEM }
 Possible outcomes of the LP_Problem solver. More...

Functions

unsigned version_major ()
 Returns the major number of the PPL version.
unsigned version_minor ()
 Returns the minor number of the PPL version.
unsigned version_revision ()
 Returns the revision number of the PPL version.
unsigned version_beta ()
 Returns the beta number of the PPL version.
const char * version ()
 Returns a character string containing the PPL version.
const char * banner ()
 Returns a character string containing the PPL banner.
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 To>
Result assign_r (To &to, const Minus_Infinity &x, Rounding_Dir dir)
template<typename To>
Result assign_r (To &to, const Plus_Infinity &x, Rounding_Dir dir)
template<typename To>
Result assign_r (To &to, const Not_A_Number &x, Rounding_Dir dir)
template<typename To>
Result assign_r (To &to, const char *x, Rounding_Dir dir)
template<typename To, typename To_Policy>
Result assign_r (To &to, char *x, Rounding_Dir dir)
void throw_result_exception (Result r)
template<typename T>
plus_infinity ()
template<typename T>
minus_infinity ()
template<typename T>
not_a_number ()
Rounding_Dir rounding_dir (Rounding_Dir dir)
Result check_result (Result r, Rounding_Dir dir)
 COND (PPL_SUPPORTED_FLOAT, DEF_CTOR(float)) COND(PPL_SUPPORTED_DOUBLE
 DEF_CTOR (double)) COND(PPL_SUPPORTED_LONG_DOUBLE
 DEF_CTOR (long double)) template< typename T
template<typename T>
bool is_minus_infinity (const T &x)
template<typename T>
bool is_plus_infinity (const T &x)
template<typename T>
bool is_not_a_number (const T &x)
template<typename T>
bool is_integer (const T &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)
void neg_assign (GMP_Integer &x)
void neg_assign (GMP_Integer &x, const GMP_Integer &y)
void gcd_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z)
void gcdext_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z, GMP_Integer &s, GMP_Integer &t)
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 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)
memory_size_type external_memory_in_bytes (const GMP_Integer &x)
memory_size_type total_memory_in_bytes (const GMP_Integer &x)
Coefficient_traits::const_reference Coefficient_zero ()
Coefficient_traits::const_reference Coefficient_one ()
 signed_limits (signed char, SCHAR)
 signed_limits (short, SHRT)
 signed_limits (int, INT)
 signed_limits (long, LONG)
 signed_limits (long long, LLONG)
 unsigned_limits (unsigned char, UCHAR)
 unsigned_limits (unsigned short, USHRT)
 unsigned_limits (unsigned int, UINT)
 unsigned_limits (unsigned long, ULONG)
 unsigned_limits (unsigned long long, ULLONG)
unsigned rational_sqrt_precision_parameter ()
 Returns the precision parameter used for rational square root calculations.
void set_rational_sqrt_precision_parameter (const unsigned p)
 Sets the precision parameter used for rational square root calculations.
dimension_type not_a_dimension ()
 Returns a value that does not designate a valid dimension.
Coefficientget_tmp_Coefficient ()
void release_tmp_Coefficient (Coefficient &i)
dimension_type compute_capacity (dimension_type requested_size, dimension_type maximum_size)
 Speculative allocation function.
void normalize2 (Coefficient_traits::const_reference x, Coefficient_traits::const_reference y, Coefficient &nx, Coefficient &ny)
 If $g$ is the GCD of x and y, the values of x and y divided by $g$ are assigned to nx and ny, respectively.
template<typename T>
low_bits_mask (unsigned n)
 Returns a mask for the lowest n bits,.
void maybe_abandon ()
 TRACE (using std::endl)
 TRACE (using std::cerr)
 PPL_OUTPUT_TEMPLATE_DEFINITIONS (PH, Polyhedra_Powerset< PH >)
 PPL_OUTPUT_TEMPLATE_DEFINITIONS (T, DB_Matrix< T >)
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.
bool extract_bounded_difference (const Constraint &c, const dimension_type c_space_dim, dimension_type &c_num_vars, dimension_type &c_first_var, dimension_type &c_second_var, Coefficient &c_coeff)
 Decodes the constraint c as a bounded difference.
void compute_leader_indices (const std::vector< dimension_type > &predecessor, std::vector< dimension_type > &indices)
 Extracts leader indices from the predecessor relation.
template<typename T>
bool operator== (const BD_Shape< T > &x, const BD_Shape< T > &y)
template<typename T>
bool operator!= (const BD_Shape< T > &x, const BD_Shape< T > &y)
 PPL_OUTPUT_TEMPLATE_DEFINITIONS (T, BD_Shape< T >)

Variables

Minus_Infinity MINUS_INFINITY
Plus_Infinity PLUS_INFINITY
Not_A_Number NOT_A_NUMBER
Coefficient_free_list_elementCoefficient_free_list_first = 0
const Throwable *volatile abandon_expensive_computations = 0
 A pointer to an exception object.


Detailed Description

The entire library is confined to this namespace.


Typedef Documentation

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

Definition at line 141 of file Checked_Number.defs.hh.

Definition at line 34 of file Interval.defs.hh.

Definition at line 29 of file GMP_Integer.types.hh.


Function Documentation

void Parma_Polyhedra_Library::add_mul_assign ( GMP_Integer &  x,
const GMP_Integer &  y,
const GMP_Integer &  z 
) [related]

template<typename To, typename To_Policy>
Result Parma_Polyhedra_Library::assign_r ( To &  to,
char *  x,
Rounding_Dir  dir 
) [inline]

template<typename To>
Result Parma_Polyhedra_Library::assign_r ( To &  to,
const char *  x,
Rounding_Dir  dir 
) [inline]

Definition at line 357 of file Checked_Number.inlines.hh.

References check_result(), and rounding_dir().

00357                                                   {
00358   std::istringstream s(x);
00359   return check_result(Checked::input<typename Native_Checked_To_Wrapper<To>::Policy>(Native_Checked_To_Wrapper<To>::raw_value(to), s, rounding_dir(dir)), dir);
00360 }

template<typename To>
Result Parma_Polyhedra_Library::assign_r ( To &  to,
const Not_A_Number &  x,
Rounding_Dir  dir 
) [inline]

Definition at line 351 of file Checked_Number.inlines.hh.

References check_result(), and rounding_dir().

00351                                                           {
00352   return check_result(Checked::assign<typename Native_Checked_To_Wrapper<To>::Policy>(Native_Checked_To_Wrapper<To>::raw_value(to), x, rounding_dir(dir)), dir);
00353 }

template<typename To>
Result Parma_Polyhedra_Library::assign_r ( To &  to,
const Plus_Infinity &  x,
Rounding_Dir  dir 
) [inline]

Definition at line 346 of file Checked_Number.inlines.hh.

References check_result(), and rounding_dir().

00346                                                            {
00347   return check_result(Checked::assign<typename Native_Checked_To_Wrapper<To>::Policy>(Native_Checked_To_Wrapper<To>::raw_value(to), x, rounding_dir(dir)), dir);
00348 }

template<typename To>
Result Parma_Polyhedra_Library::assign_r ( To &  to,
const Minus_Infinity &  x,
Rounding_Dir  dir 
) [inline]

Definition at line 341 of file Checked_Number.inlines.hh.

References check_result(), and rounding_dir().

Referenced by Parma_Polyhedra_Library::BD_Shape< T >::add_space_dimensions_and_project(), Parma_Polyhedra_Library::BD_Shape< T >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::CC76_extrapolation_assign(), 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::BD_Shape< T >::div_round_up(), Parma_Polyhedra_Library::BD_Shape< T >::euclidean_distance_assign(), Parma_Polyhedra_Library::maybe_assign_struct< To, From >::function(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::l_infinity_distance_assign(), Parma_Polyhedra_Library::DB_Matrix< T >::l_m_distance_assign(), Parma_Polyhedra_Library::Bounding_Box::lower_upper_bound(), Parma_Polyhedra_Library::Polyhedron::max_min(), Parma_Polyhedra_Library::BD_Shape< T >::numer_denom(), Parma_Polyhedra_Library::Checked_Number< T, Policy >::operator=(), Parma_Polyhedra_Library::Bounding_Box::raise_lower_bound(), Parma_Polyhedra_Library::BD_Shape< T >::rectilinear_distance_assign(), Parma_Polyhedra_Library::BD_Shape< T >::shortest_path_closure_assign(), and Parma_Polyhedra_Library::Polyhedron::shrink_bounding_box().

00341                                                             {
00342   return check_result(Checked::assign<typename Native_Checked_To_Wrapper<To>::Policy>(Native_Checked_To_Wrapper<To>::raw_value(to), x, rounding_dir(dir)), dir);
00343 }

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 81 of file version.cc.

References banner_string.

Referenced by ppl_banner().

00081             {
00082   return banner_string;
00083 }

Result Parma_Polyhedra_Library::check_result ( Result  r,
Rounding_Dir  dir 
) [inline]

Definition at line 44 of file Checked_Number.inlines.hh.

Referenced by assign_r(), Parma_Polyhedra_Library::Checked_Number< T, Policy >::Checked_Number(), Parma_Polyhedra_Library::Checked_Number< T, Policy >::input(), and Parma_Polyhedra_Library::Checked_Number< T, Policy >::output().

00044                                          {
00045   if (dir == ROUND_NOT_NEEDED && !is_special(r)) {
00046 #ifdef DEBUG_ROUND_NOT_NEEDED
00047     // FIXME: this is wrong. If an overflow happens the Result may be
00048     // V_LT or V_GT. What's the better way to cope with that?
00049     assert(r == V_EQ);
00050 #else
00051     return V_EQ;
00052 #endif
00053   }
00054   return r;
00055 }

int Parma_Polyhedra_Library::cmp ( const GMP_Integer &  x,
const GMP_Integer &  y 
) [related]

Coefficient_traits::const_reference Parma_Polyhedra_Library::Coefficient_one (  )  [inline]

Coefficient_traits::const_reference Parma_Polyhedra_Library::Coefficient_zero (  )  [inline]

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_size The number of elements we need.
maximum_size The 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 48 of file globals.inlines.hh.

Referenced by Parma_Polyhedra_Library::Linear_System::add_pending_row(), Parma_Polyhedra_Library::Matrix::add_recycled_row(), Parma_Polyhedra_Library::Saturation_Matrix::add_row(), Parma_Polyhedra_Library::Matrix::add_zero_columns(), Parma_Polyhedra_Library::Matrix::add_zero_rows(), Parma_Polyhedra_Library::Matrix::add_zero_rows_and_columns(), Parma_Polyhedra_Library::DB_Row< T >::DB_Row(), Parma_Polyhedra_Library::DB_Matrix< T >::grow(), Parma_Polyhedra_Library::Linear_System::merge_rows_assign(), Parma_Polyhedra_Library::Matrix::operator=(), Parma_Polyhedra_Library::DB_Matrix< T >::operator=(), Parma_Polyhedra_Library::Saturation_Matrix::resize(), Parma_Polyhedra_Library::Matrix::resize_no_copy(), Parma_Polyhedra_Library::DB_Matrix< T >::resize_no_copy(), and Parma_Polyhedra_Library::Row::Row().

00049                                                     {
00050   assert(requested_size <= maximum_size);
00051   // Speculation factor 2.
00052   return (requested_size < maximum_size / 2)
00053     ? 2*(requested_size + 1)
00054     : maximum_size;
00055   // Speculation factor 1.5.
00056   // return (maximum_size - requested_size > requested_size/2)
00057   //   ? requested_size + requested_size/2 + 1
00058   //   : maximum_size;
00059 }

void Parma_Polyhedra_Library::compute_leader_indices ( const std::vector< dimension_type > &  predecessor,
std::vector< dimension_type > &  indices 
) [related]

Extracts leader indices from the predecessor relation.

Parma_Polyhedra_Library::COND ( PPL_SUPPORTED_FLOAT  ,
DEF_CTOR(float)   
)

Parma_Polyhedra_Library::DEF_CTOR ( long  double  ) 

Parma_Polyhedra_Library::DEF_CTOR ( double   ) 

void Parma_Polyhedra_Library::exact_div_assign ( GMP_Integer &  x,
const GMP_Integer &  y,
const GMP_Integer &  z 
) [related]

Definition at line 68 of file GMP_Integer.inlines.hh.

00068                                                                              {
00069   assert(y % z == 0);
00070   mpz_divexact(x.get_mpz_t(), y.get_mpz_t(), z.get_mpz_t());
00071 }

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]

memory_size_type Parma_Polyhedra_Library::external_memory_in_bytes ( const GMP_Integer &  x  )  [related]

Definition at line 94 of file GMP_Integer.inlines.hh.

Referenced by total_memory_in_bytes().

00094                                                {
00095   return x.get_mpz_t()[0]._mp_alloc * SIZEOF_MP_LIMB_T;
00096 }

bool Parma_Polyhedra_Library::extract_bounded_difference ( const Constraint &  c,
const dimension_type  c_space_dim,
dimension_type &  c_num_vars,
dimension_type &  c_first_var,
dimension_type &  c_second_var,
Coefficient &  c_coeff 
) [related]

Decodes the constraint c as a bounded difference.

Returns:
true if the constraint c is a bounded difference; false otherwise.
Parameters:
c The constraint to be decoded.
c_space_dim The space dimension of the constraint c (it is assumed to match the actual space dimension of c).
c_num_vars If true is returned, then it will be set to the number of variables having a non-zero coefficient. The only legal values will therefore be 0, 1 and 2.
c_first_var If true is returned and if c_num_vars is not set to 0, then it will be set to the index of the first variable having a non-zero coefficient in c.
c_second_var If true is returned and if c_num_vars is set to 2, then it will be set to the index of the second variable having a non-zero coefficient in c.
c_coeff If true is returned and if c_num_vars is not set to 0, then it will be set to the value of the first non-zero coefficient in c.

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,
const GMP_Integer &  y,
const GMP_Integer &  z,
GMP_Integer &  s,
GMP_Integer &  t 
) [related]

Definition at line 44 of file GMP_Integer.inlines.hh.

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

00046                                               {
00047   mpz_gcdext(x.get_mpz_t(),
00048              s.get_mpz_t(), t.get_mpz_t(),
00049              y.get_mpz_t(), z.get_mpz_t());
00050 }

Coefficient& Parma_Polyhedra_Library::get_tmp_Coefficient (  )  [inline]

Definition at line 63 of file globals.defs.hh.

References Coefficient_free_list_first, Parma_Polyhedra_Library::Coefficient_free_list_element::integer(), and Parma_Polyhedra_Library::Coefficient_free_list_element::next().

00063                       {
00064   Coefficient* p;
00065   if (Coefficient_free_list_first != 0) {
00066     p = &Coefficient_free_list_first->integer();
00067     Coefficient_free_list_first = Coefficient_free_list_first->next();
00068   }
00069   else
00070     p = reinterpret_cast<Coefficient*>(new Coefficient_free_list_element());
00071   return *p;
00072 }

template<typename T>
bool Parma_Polyhedra_Library::is_integer ( const T &  x  )  [inline]

Definition at line 258 of file Checked_Number.inlines.hh.

References raw_value().

00258                        {
00259   return Checked::is_int<typename Native_Checked_From_Wrapper<T>::Policy>(Native_Checked_From_Wrapper<T>::raw_value(x));
00260 }

template<typename T>
bool Parma_Polyhedra_Library::is_minus_infinity ( const T &  x  )  [inline]

Definition at line 240 of file Checked_Number.inlines.hh.

References raw_value().

Referenced by extended_rational_term().

00240                               {
00241   return Checked::is_minf<typename Native_Checked_From_Wrapper<T>::Policy>(Native_Checked_From_Wrapper<T>::raw_value(x));
00242 }

template<typename T, typename Policy>
bool Parma_Polyhedra_Library::is_minus_infinity ( const Checked_Number< T, Policy > &  x  )  [inline]

template<typename T>
bool Parma_Polyhedra_Library::is_not_a_number ( const T &  x  )  [inline]

Definition at line 252 of file Checked_Number.inlines.hh.

References raw_value().

00252                             {
00253   return Checked::is_nan<typename Native_Checked_From_Wrapper<T>::Policy>(Native_Checked_From_Wrapper<T>::raw_value(x));
00254 }

template<typename T, typename Policy>
bool Parma_Polyhedra_Library::is_not_a_number ( const Checked_Number< T, Policy > &  x  )  [inline]

Definition at line 309 of file Checked_Number.inlines.hh.

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

Referenced by Parma_Polyhedra_Library::BD_Shape< T >::numer_denom(), and Parma_Polyhedra_Library::DB_Row< T >::OK().

00309                                                     {
00310   return Checked::is_nan<Policy>(x.raw_value());
00311 }

template<typename T>
bool Parma_Polyhedra_Library::is_plus_infinity ( const T &  x  )  [inline]

Definition at line 246 of file Checked_Number.inlines.hh.

References raw_value().

Referenced by extended_rational_term().

00246                              {
00247   return Checked::is_pinf<typename Native_Checked_From_Wrapper<T>::Policy>(Native_Checked_From_Wrapper<T>::raw_value(x));
00248 }

template<typename T, typename Policy>
bool Parma_Polyhedra_Library::is_plus_infinity ( const Checked_Number< T, Policy > &  x  )  [inline]

void Parma_Polyhedra_Library::lcm_assign ( GMP_Integer &  x,
const GMP_Integer &  y,
const GMP_Integer &  z 
) [related]

template<typename T>
T Parma_Polyhedra_Library::low_bits_mask ( unsigned  n  )  [inline]

Returns a mask for the lowest n bits,.

Definition at line 73 of file globals.inlines.hh.

00073                                 {
00074   assert(n < unsigned(std::numeric_limits<T>::digits));
00075   return n == 0 ? 0 : ~(~(T(0u)) << n);
00076 }

void Parma_Polyhedra_Library::maybe_abandon (  )  [related]

Definition at line 42 of file globals.inlines.hh.

References abandon_expensive_computations.

Referenced by Parma_Polyhedra_Library::Polyhedron::conversion().

00042                 {
00043   if (const Throwable* p = abandon_expensive_computations)
00044     p->throw_me();
00045 }

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 459 of file DB_Matrix.inlines.hh.

Referenced by Parma_Polyhedra_Library::DB_Matrix< T >::l_m_distance_assign().

00459                                                                           {
00460   return maybe_assign_struct<To, From>::function(top, tmp, from, dir);
00461 }

template<typename T>
T Parma_Polyhedra_Library::minus_infinity (  )  [inline]

Definition at line 808 of file Checked_Number.inlines.hh.

References MINUS_INFINITY.

00808                  {
00809   return MINUS_INFINITY;
00810 }

void Parma_Polyhedra_Library::neg_assign ( GMP_Integer &  x,
const GMP_Integer &  y 
) [related]

Definition at line 34 of file GMP_Integer.inlines.hh.

Referenced by Parma_Polyhedra_Library::Linear_System::back_substitute().

00034                                                  {
00035   mpz_neg(x.get_mpz_t(), y.get_mpz_t());
00036 }

void Parma_Polyhedra_Library::neg_assign ( GMP_Integer &  x  )  [related]

void Parma_Polyhedra_Library::normalize2 ( Coefficient_traits::const_reference  x,
Coefficient_traits::const_reference  y,
Coefficient &  nx,
Coefficient &  ny 
) [inline]

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

Note:
x and nx may be the same object and likewise for y and ny. Any other aliasing results in undefined behavior.

Definition at line 62 of file globals.inlines.hh.

References Parma_Polyhedra_Library::Checked_Number< T, Policy >::exact_div_assign(), Parma_Polyhedra_Library::Checked_Number< T, Policy >::gcd_assign(), and TEMP_INTEGER.

Referenced by Parma_Polyhedra_Library::Polyhedron::conversion(), Parma_Polyhedra_Library::LP_Problem::evaluate_objective_function(), Parma_Polyhedra_Library::LP_Problem::linear_combine(), and Parma_Polyhedra_Library::Linear_Row::linear_combine().

00064                                              {
00065   TEMP_INTEGER(gcd);
00066   gcd_assign(gcd, x, y);
00067   exact_div_assign(nx, x, gcd);
00068   exact_div_assign(ny, y, gcd);
00069 }

dimension_type Parma_Polyhedra_Library::not_a_dimension (  )  [inline]

Returns a value that does not designate a valid dimension.

Definition at line 33 of file globals.inlines.hh.

Referenced by Parma_Polyhedra_Library::Polyhedron::map_space_dimensions(), Parma_Polyhedra_Library::Grid::map_space_dimensions(), Parma_Polyhedra_Library::Variable::max_space_dimension(), and ppl_not_a_dimension().

00033                   {
00034   return std::numeric_limits<dimension_type>::max();
00035 }

template<typename T>
T Parma_Polyhedra_Library::not_a_number (  )  [inline]

Definition at line 814 of file Checked_Number.inlines.hh.

References NOT_A_NUMBER.

00814                {
00815   return NOT_A_NUMBER;
00816 }

template<typename T>
bool Parma_Polyhedra_Library::operator!= ( const BD_Shape< T > &  x,
const BD_Shape< T > &  y 
) [related]

Definition at line 309 of file BD_Shape.inlines.hh.

Referenced by Parma_Polyhedra_Library::Grid_Generator_System::const_iterator::operator!=().

00309                                                        {
00310   return !(x == y);
00311 }

template<typename T>
bool Parma_Polyhedra_Library::operator== ( const BD_Shape< T > &  x,
const BD_Shape< T > &  y 
) [related]

Definition at line 279 of file BD_Shape.inlines.hh.

References Parma_Polyhedra_Library::BD_Shape< T >::dbm, Parma_Polyhedra_Library::BD_Shape< T >::marked_empty(), Parma_Polyhedra_Library::BD_Shape< T >::shortest_path_closure_assign(), and Parma_Polyhedra_Library::BD_Shape< T >::space_dimension().

Referenced by Parma_Polyhedra_Library::Grid_Generator_System::const_iterator::operator==().

00279                                                        {
00280   const dimension_type x_space_dim = x.space_dimension();
00281   // Dimension-compatibility check.
00282   if (x_space_dim != y.space_dimension())
00283     return false;
00284 
00285   // Zero-dim BDSs are equal if and only if they are both empty or universe.
00286   if (x_space_dim == 0)
00287     if (x.marked_empty())
00288       return y.marked_empty();
00289     else
00290       return !y.marked_empty();
00291 
00292   // The exact equivalence test requires shortest-path closure.
00293   x.shortest_path_closure_assign();
00294   y.shortest_path_closure_assign();
00295 
00296   // If one of two BDSs is empty, then they are equal
00297   // if and only if the other BDS is empty too.
00298   if (x.marked_empty())
00299     return y.marked_empty();
00300   if (y.marked_empty())
00301     return false;
00302   // Check for syntactic equivalence of the two (shortest-path closed)
00303   // systems of bounded differences.
00304   return x.dbm == y.dbm;
00305 }

template<typename T>
T Parma_Polyhedra_Library::plus_infinity (  )  [inline]

Definition at line 802 of file Checked_Number.inlines.hh.

References PLUS_INFINITY.

00802                 {
00803   return PLUS_INFINITY;
00804 }

Parma_Polyhedra_Library::PPL_OUTPUT_TEMPLATE_DEFINITIONS ( ,
BD_Shape< T >   
)

Parma_Polyhedra_Library::PPL_OUTPUT_TEMPLATE_DEFINITIONS ( ,
DB_Matrix< T >   
)

Parma_Polyhedra_Library::PPL_OUTPUT_TEMPLATE_DEFINITIONS ( PH  ,
Polyhedra_Powerset< PH >   
)

unsigned Parma_Polyhedra_Library::rational_sqrt_precision_parameter (  )  [inline]

Returns the precision parameter used for rational square root calculations.

Definition at line 390 of file checked_mpq.inlines.hh.

References Parma_Polyhedra_Library::Checked::rational_sqrt_precision_parameter.

00390                                     {
00391   return Checked::rational_sqrt_precision_parameter;
00392 }

mpz_class& Parma_Polyhedra_Library::raw_value ( GMP_Integer &  x  )  [related]

Definition at line 89 of file GMP_Integer.inlines.hh.

Referenced by is_integer(), is_minus_infinity(), is_not_a_number(), and is_plus_infinity().

00089                           {
00090   return x;
00091 }

const mpz_class& Parma_Polyhedra_Library::raw_value ( const GMP_Integer &  x  )  [related]

void Parma_Polyhedra_Library::release_tmp_Coefficient ( Coefficient &  i  )  [inline]

Definition at line 75 of file globals.defs.hh.

References Coefficient_free_list_first, and Parma_Polyhedra_Library::Coefficient_free_list_element::next().

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

00075                                         {
00076   Coefficient_free_list_element& e
00077     = reinterpret_cast<Coefficient_free_list_element&>(i);
00078   e.next() = Coefficient_free_list_first;
00079   Coefficient_free_list_first = &e;
00080 }

Rounding_Dir Parma_Polyhedra_Library::rounding_dir ( Rounding_Dir  dir  )  [inline]

Definition at line 32 of file Checked_Number.inlines.hh.

Referenced by assign_r(), Parma_Polyhedra_Library::Checked_Number< T, Policy >::Checked_Number(), Parma_Polyhedra_Library::Checked_Number< T, Policy >::input(), and Parma_Polyhedra_Library::Checked_Number< T, Policy >::output().

00032                                {
00033   if (dir == ROUND_NOT_NEEDED) {
00034 #ifdef DEBUG_ROUND_NOT_NEEDED
00035     return ROUND_DIRECT;
00036 #else
00037     return ROUND_IGNORE;
00038 #endif
00039   }
00040   return dir;
00041 }

void Parma_Polyhedra_Library::set_rational_sqrt_precision_parameter ( const unsigned  p  )  [inline]

Sets the precision parameter used for rational square root calculations.

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

Exceptions:
std::invalid_argument Thrown if p is greater than INT_MAX.

Definition at line 403 of file checked_mpq.inlines.hh.

References Parma_Polyhedra_Library::Checked::rational_sqrt_precision_parameter.

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

00403                                                         {
00404   if (p <= INT_MAX)
00405     Checked::rational_sqrt_precision_parameter = p;
00406   else
00407     throw std::invalid_argument("PPL::set_rational_sqrt_precision_parameter(p)"
00408                                 " with p > INT_MAX");
00409 }

Parma_Polyhedra_Library::signed_limits ( long  long,
LLONG   
)

Parma_Polyhedra_Library::signed_limits ( long  ,
LONG   
)

Parma_Polyhedra_Library::signed_limits ( int  ,
INT   
)

Parma_Polyhedra_Library::signed_limits ( short  ,
SHRT   
)

Parma_Polyhedra_Library::signed_limits ( signed  char,
SCHAR   
)

void Parma_Polyhedra_Library::sqrt_assign ( GMP_Integer &  x,
const GMP_Integer &  y 
) [related]

Definition at line 74 of file GMP_Integer.inlines.hh.

00074                                                   {
00075   mpz_sqrt(x.get_mpz_t(), y.get_mpz_t());
00076 }

void Parma_Polyhedra_Library::sub_mul_assign ( GMP_Integer &  x,
const GMP_Integer &  y,
const GMP_Integer &  z 
) [related]

void Parma_Polyhedra_Library::throw_result_exception ( Result  r  ) 

Definition at line 33 of file Checked_Number.cc.

Referenced by Parma_Polyhedra_Library::Extended_Number_Policy::handle_result(), and Parma_Polyhedra_Library::Checked_Number_Default_Policy::handle_result().

00033                                  {
00034   switch (r) {
00035   case V_LT:
00036     throw std::logic_error("Exact result is less than computed one.");
00037   case V_LE:
00038     throw std::logic_error("Exact result is less than or equal to "
00039                            "computed one.");
00040   case V_GT:
00041     throw std::logic_error("Exact result is greater than computed one.");
00042   case V_GE:
00043     throw std::logic_error("Exact result is greater than or equal to "
00044                            "computed one.");
00045   case V_NE:
00046     throw std::logic_error("Exact result is less than or greater than "
00047                            "computed one.");
00048   case V_LGE:
00049     throw std::logic_error("Exact result is less than, greater than or "
00050                            "equal to computed one.");
00051   case VC_MINUS_INFINITY:
00052     throw std::overflow_error("Minus infinity.");
00053   case V_NEG_OVERFLOW:
00054     throw std::overflow_error("Negative overflow.");
00055   case V_UNKNOWN_NEG_OVERFLOW:
00056     throw std::overflow_error("Unknown result due to negative overflow.");
00057   case VC_PLUS_INFINITY:
00058     throw std::overflow_error("Plus infinity.");
00059   case V_POS_OVERFLOW:
00060     throw std::overflow_error("Positive overflow.");
00061   case V_UNKNOWN_POS_OVERFLOW:
00062     throw std::overflow_error("Unknown result due to positive overflow.");
00063   case V_CVT_STR_UNK:
00064     throw std::domain_error("Invalid numeric string.");
00065   case V_DIV_ZERO:
00066     throw std::domain_error("Division by zero.");
00067   case V_INF_ADD_INF:
00068     throw std::domain_error("Infinities addition.");
00069   case V_INF_DIV_INF:
00070     throw std::domain_error("Infinities division.");
00071   case V_INF_MOD:
00072     throw std::domain_error("Remainder of division of infinity.");
00073   case V_INF_MUL_ZERO:
00074     throw std::domain_error("Multiplication of infinity and zero.");
00075   case V_INF_SUB_INF:
00076     throw std::domain_error("Subtraction of infinities.");
00077   case V_MOD_ZERO:
00078     throw std::domain_error("Remainder of division by zero.");
00079   case V_SQRT_NEG:
00080     throw std::domain_error("Square root of negative number.");
00081   case V_UNORD_COMP:
00082     throw std::domain_error("Unordered comparison.");
00083   default:
00084     throw std::logic_error("Unexpected result.");
00085   }
00086 }

memory_size_type Parma_Polyhedra_Library::total_memory_in_bytes ( const GMP_Integer &  x  )  [related]

Definition at line 99 of file GMP_Integer.inlines.hh.

References external_memory_in_bytes().

00099                                             {
00100   return sizeof(x) + external_memory_in_bytes(x);
00101 }

Parma_Polyhedra_Library::TRACE ( using std::cerr   ) 

Parma_Polyhedra_Library::TRACE ( using std::endl   ) 

Parma_Polyhedra_Library::unsigned_limits ( unsigned long  long,
ULLONG   
)

Parma_Polyhedra_Library::unsigned_limits ( unsigned  long,
ULONG   
)

Parma_Polyhedra_Library::unsigned_limits ( unsigned  int,
UINT   
)

Parma_Polyhedra_Library::unsigned_limits ( unsigned  short,
USHRT   
)

Parma_Polyhedra_Library::unsigned_limits ( unsigned  char,
UCHAR   
)

const char * Parma_Polyhedra_Library::version (  ) 

Returns a character string containing the PPL version.

Definition at line 76 of file version.cc.

References version_string.

Referenced by ppl_version().

00076              {
00077   return version_string;
00078 }

unsigned Parma_Polyhedra_Library::version_beta (  ) 

Returns the beta number of the PPL version.

Definition at line 71 of file version.cc.

References PPL_VERSION_BETA.

Referenced by ppl_version_beta().

00071                   {
00072   return PPL_VERSION_BETA;
00073 }

unsigned Parma_Polyhedra_Library::version_major (  ) 

Returns the major number of the PPL version.

Definition at line 56 of file version.cc.

References PPL_VERSION_MAJOR.

Referenced by ppl_version_major().

00056                    {
00057   return PPL_VERSION_MAJOR;
00058 }

unsigned Parma_Polyhedra_Library::version_minor (  ) 

Returns the minor number of the PPL version.

Definition at line 61 of file version.cc.

References PPL_VERSION_MINOR.

Referenced by ppl_version_minor().

00061                    {
00062   return PPL_VERSION_MINOR;
00063 }

unsigned Parma_Polyhedra_Library::version_revision (  ) 

Returns the revision number of the PPL version.

Definition at line 66 of file version.cc.

References PPL_VERSION_REVISION.

Referenced by ppl_version_revision().

00066                       {
00067   return PPL_VERSION_REVISION;
00068 }


Variable Documentation

Definition at line 31 of file globals.cc.

Referenced by get_tmp_Coefficient(), and release_tmp_Coefficient().

Definition at line 30 of file Checked_Number.cc.

Referenced by not_a_number().


Generated on Wed Jul 16 22:55:44 2008 for PPL by  doxygen 1.5.6