Main Page | Class List | File List | Class Members | File Members

arithmetique.h File Reference

#include <stdio.h>
#include <limits.h>
#include "arithmetic_errors.h"

Go to the source code of this file.

Classes

struct  col
struct  frac

Defines

#define __LONG_LONG_MAX__   9223372036854775807LL
#define LONG_LONG_MAX   __LONG_LONG_MAX__
#define LONG_LONG_MIN   (-LONG_LONG_MAX-1)
#define ULONG_LONG_MAX   (LONG_LONG_MAX * 2ULL + 1)
#define LINEAR_VALUE_STRING   "gmp"
#define VALUE_FMT   "%s"
#define VALUE_TO_LONG(val)   (mpz_get_si(val))
#define VALUE_TO_INT(val)   ((int)mpz_get_si(val))
#define VALUE_TO_FLOAT(val)   ((float)((int)mpz_get_si(val)))
#define VALUE_TO_DOUBLE(val)   (mpz_get_d(val))
#define value_init(val)   ((val) = 0)
#define value_assign(v1, v2)   ((v1) = (v2))
#define value_set_si(val, i)   ((val) = (Value)(i))
#define value_set_double(val, d)   ((val) = (Value)(d))
#define value_clear(val)   ((val) = 0)
#define value_read(val, str)   (sscanf((str),VALUE_FMT,&(val)))
#define value_print(Dst, fmt, val)   (fprintf((Dst),(fmt),(val)))
#define value_swap(v1, v2)
#define int_to_value(i)   ((Value)(i))
#define long_to_value(l)   ((Value)(l))
#define float_to_value(f)   ((Value)(f))
#define double_to_value(d)   ((Value)(d))
#define value_eq(v1, v2)   ((v1)==(v2))
#define value_ne(v1, v2)   ((v1)!=(v2))
#define value_gt(v1, v2)   ((v1)>(v2))
#define value_ge(v1, v2)   ((v1)>=(v2))
#define value_lt(v1, v2)   ((v1)<(v2))
#define value_le(v1, v2)   ((v1)<=(v2))
#define value_sign(v)   (value_eq(v,VALUE_ZERO)?0:value_lt(v,VALUE_ZERO)?-1:1)
#define value_compare(v1, v2)   (value_eq(v1,v2)?0:value_lt(v1,v2)?-1:1)
#define value_plus(v1, v2)   ((v1)+(v2))
#define value_div(v1, v2)   ((v1)/(v2))
#define value_mod(v1, v2)   ((v1)%(v2))
#define value_direct_multiply(v1, v2)   ((v1)*(v2))
#define value_minus(v1, v2)   ((v1)-(v2))
#define value_pdiv(v1, v2)   (divide((v1),(v2)))
#define value_pmod(v1, v2)   (modulo((v1),(v2)))
#define value_min(v1, v2)   (value_le((v1),(v2))? (v1): (v2))
#define value_max(v1, v2)   (value_ge((v1),(v2))? (v1): (v2))
#define value_or(v1, v2)   ((v1)|(v2))
#define value_and(v1, v2)   ((v1)&(v2))
#define value_lshift(v1, v2)   ((v1)<<(v2))
#define value_rshift(v1, v2)   ((v1)>>(v2))
#define value_addto(ref, val1, val2)   ((ref) = (val1)+(val2))
#define value_add_int(ref, val, vint)   ((ref) = (val)+(Value)(vint))
#define value_addmul(ref, val1, val2)   ((ref) += (val1)*(val2))
#define value_increment(ref, val)   ((ref) = (val)+VALUE_ONE)
#define value_direct_product(ref, val1, val2)   ((ref) = (val1)*(val2))
#define value_multiply(ref, val1, val2)   ((ref) = value_mult((val1),(val2)))
#define value_subtract(ref, val1, val2)   ((ref) = (val1)-(val2))
#define value_sub_int(ref, val, vint)   ((ref) = (val)-(Value)(vint))
#define value_decrement(ref, val)   ((ref) = (val)-VALUE_ONE)
#define value_division(ref, val1, val2)   ((ref) = (val1)/(val2))
#define value_modulus(ref, val1, val2)   ((ref) = (val1)%(val2))
#define value_pdivision(ref, val1, val2)   ((ref) = value_pdiv((val1),(val2)))
#define value_pmodulus(ref, val1, val2)   ((ref) = value_pmod((val1),(val2)))
#define value_oppose(ref, val)   ((ref) = value_uminus((val)))
#define value_absolute(ref, val)   ((ref) = value_abs((val)))
#define value_minimum(ref, val1, val2)   ((ref) = value_min((val1),(val2)))
#define value_maximum(ref, val1, val2)   ((ref) = value_max((val1),(val2)))
#define value_orto(ref, val1, val2)   ((ref) = (val1)|(val2))
#define value_andto(ref, val1, val2)   ((ref) = (val1)&(val2))
#define value_uminus(val)   (-(val))
#define value_not(val)   (~(val))
#define value_abs(val)
#define value_pos_p(val)   value_gt(val,VALUE_ZERO)
#define value_neg_p(val)   value_lt(val,VALUE_ZERO)
#define value_posz_p(val)   value_ge(val,VALUE_ZERO)
#define value_negz_p(val)   value_le(val,VALUE_ZERO)
#define value_zero_p(val)   value_eq(val,VALUE_ZERO)
#define value_notzero_p(val)   value_ne(val,VALUE_ZERO)
#define value_one_p(val)   value_eq(val,VALUE_ONE)
#define value_notone_p(val)   value_ne(val,VALUE_ONE)
#define value_mone_p(val)   value_eq(val,VALUE_MONE)
#define value_notmone_p(val)   value_ne(val,VALUE_MONE)
#define value_cmp_si(val, n)   (val - VALUE_CONST(n))
#define value_min_p(val)   value_eq(val,VALUE_MIN)
#define value_max_p(val)   value_eq(val,VALUE_MAX)
#define value_notmin_p(val)   value_ne(val,VALUE_MIN)
#define value_notmax_p(val)   value_ne(val,VALUE_MAX)
#define value_protected_hard_idiv_multiply(v, w, throw)
#define value_protected_multiply(v, w, throw)   value_protected_hard_idiv_multiply(v,w,throw)
#define value_protected_mult(v, w)   value_protected_multiply(v,w,THROW(overflow_error))
#define value_protected_product(v, w)   v=value_protected_mult(v,w)
#define value_mult(v, w)
#define value_product(v, w)   v=value_mult(v,w)
#define value_substract(ref, val1, val2)   (value_subtract((ref),(val1),(val2)))
#define ABS(x)   (((x)>=0) ? (x) : -(x))
#define MIN(x, y)   (((x)>=(y))?(y):(x))
#define MAX(x, y)   (((x)>=(y))?(x):(y))
#define SIGN(x)   (((x)>0)? 1 : ((x)==0? 0 : -1))
#define DIVIDE(x, y)
#define POSITIVE_DIVIDE(x, y)   ((x)>0 ? (x)/(y) : - (-(x)+(y)-1)/(y))
#define MODULO(x, y)   ((y)>0 ? POSITIVE_MODULO(x,y) : POSITIVE_MODULO(-x,-y))
#define POSITIVE_MODULO(x, y)
#define divide(a, b)   DIVIDE(a,b)
#define modulo(a, b)   MODULO(a,b)

Typedefs

typedef mpz_t Value
typedef col tableau

Functions

void dump_exception_stack_to_file (FILE *)
void dump_exception_stack (void)
jmp_buf * push_exception_on_stack (int, char *, char *, int)
void pop_exception_from_stack (int, char *, char *, int)
void throw_exception (int, const char *, const char *, int)

Variables

unsigned int overflow_error
unsigned int simplex_arithmetic_error
unsigned int user_exception_error
unsigned int parser_exception_error
unsigned int any_exception_error
unsigned int the_last_just_thrown_exception
int linear_exception_debug_mode


Define Documentation

#define __LONG_LONG_MAX__   9223372036854775807LL
 

Definition at line 61 of file arithmetique.h.

#define ABS  )     (((x)>=0) ? (x) : -(x))
 

Definition at line 558 of file arithmetique.h.

#define divide a,
 )     DIVIDE(a,b)
 

Definition at line 603 of file arithmetique.h.

#define DIVIDE x,
 ) 
 

Value:

((y)>0? POSITIVE_DIVIDE(x,y) : \
                     -POSITIVE_DIVIDE((x),(-(y))))

Definition at line 581 of file arithmetique.h.

#define double_to_value  )     ((Value)(d))
 

Definition at line 343 of file arithmetique.h.

#define float_to_value  )     ((Value)(f))
 

Definition at line 342 of file arithmetique.h.

#define int_to_value  )     ((Value)(i))
 

Definition at line 340 of file arithmetique.h.

#define LINEAR_VALUE_STRING   "gmp"
 

Definition at line 235 of file arithmetique.h.

#define LONG_LONG_MAX   __LONG_LONG_MAX__
 

Definition at line 64 of file arithmetique.h.

#define LONG_LONG_MIN   (-LONG_LONG_MAX-1)
 

Definition at line 66 of file arithmetique.h.

#define long_to_value  )     ((Value)(l))
 

Definition at line 341 of file arithmetique.h.

#define MAX x,
 )     (((x)>=(y))?(x):(y))
 

Definition at line 569 of file arithmetique.h.

#define MIN x,
 )     (((x)>=(y))?(y):(x))
 

Definition at line 566 of file arithmetique.h.

#define modulo a,
 )     MODULO(a,b)
 

Definition at line 605 of file arithmetique.h.

#define MODULO x,
 )     ((y)>0 ? POSITIVE_MODULO(x,y) : POSITIVE_MODULO(-x,-y))
 

Definition at line 588 of file arithmetique.h.

#define POSITIVE_DIVIDE x,
 )     ((x)>0 ? (x)/(y) : - (-(x)+(y)-1)/(y))
 

Definition at line 585 of file arithmetique.h.

#define POSITIVE_MODULO x,
 ) 
 

Value:

((x) > 0 ? (x)%(y) : \
                              ((x)%(y) == 0 ? 0 : ((y)-(-(x))%(y))))

Definition at line 596 of file arithmetique.h.

#define SIGN  )     (((x)>0)? 1 : ((x)==0? 0 : -1))
 

Definition at line 573 of file arithmetique.h.

#define ULONG_LONG_MAX   (LONG_LONG_MAX * 2ULL + 1)
 

Definition at line 68 of file arithmetique.h.

#define value_abs val   ) 
 

Value:

(value_posz_p(val)? \
    (val) :                                \
    (value_ne((val), VALUE_NAN) ?          \
     value_uminus(val) :                   \
    (THROW (overflow_error), VALUE_NAN )))

Definition at line 401 of file arithmetique.h.

#define value_absolute ref,
val   )     ((ref) = value_abs((val)))
 

Definition at line 391 of file arithmetique.h.

Referenced by Combine(), eliminate_var_with_constr(), encore(), GaussSimplify(), Gcd(), hermite(), Lcm3(), old_Polyhedron_Preprocess(), petit_c(), petit_l(), Print_Vertex(), Vector_Gcd(), and Vector_Min_Not_Zero().

#define value_add_int ref,
val,
vint   )     ((ref) = (val)+(Value)(vint))
 

Definition at line 378 of file arithmetique.h.

Referenced by count_points(), FindSimple(), lower_upper_bounds(), P_Enum(), and Polyhedron_Preprocess2().

#define value_addmul ref,
val1,
val2   )     ((ref) += (val1)*(val2))
 

Definition at line 379 of file arithmetique.h.

Referenced by AddLattice(), AffineSmith(), BuildSat(), CalcBase(), Chernikova(), colonne(), FindSimple(), hermite(), in_domain(), Inner_Product(), int_mod_basis(), ligne(), Matrix_Product(), Matrix_Vector_Product(), mpolyhedron_compress_last_vars(), old_Polyhedron_Preprocess(), Polyhedron_Preprocess(), PolyhedronIncludes(), rat_prodmat(), Rays_Mult(), Rays_Mult_Transpose(), Scalar_product(), SolveDiophantine(), and Vector_Matrix_Product().

#define value_addto ref,
val1,
val2   )     ((ref) = (val1)+(val2))
 

Definition at line 377 of file arithmetique.h.

Referenced by AffineSmith(), count_points(), dehomogenize_polynomial(), DomainCost(), eadd(), mpolyhedron_deflate(), mpolyhedron_inflate(), new_eadd(), P_Enum(), Poly2Sat(), Polyhedron_Enumerate(), Polyhedron_Preprocess(), Polyhedron_Preprocess2(), Simplify(), Vector_Add(), and Vector_Combine().

#define value_and v1,
v2   )     ((v1)&(v2))
 

Definition at line 371 of file arithmetique.h.

#define value_andto ref,
val1,
val2   )     ((ref) = (val1)&(val2))
 

Definition at line 395 of file arithmetique.h.

#define value_assign v1,
v2   )     ((v1) = (v2))
 

Definition at line 329 of file arithmetique.h.

Referenced by AddANullColumn(), AddANullRow(), affine_periods(), AffinePartSimplify(), AffineSmith(), align_context(), b_modulo(), CanonicalForm(), ChangeLatticeDimension(), check_poly(), cherche_min(), Combine(), compute_enode(), ConvertDarMattoPolMat(), ConvertPolMattoDarMat(), count_points(), dehomogenize_periodic(), dehomogenize_polynomial(), Domain_Enumerate(), DomainCost(), echange_c(), echange_l(), ecopy(), Ehrhart_Quick_Apx_Full_Dim(), Elim_Columns(), eliminate_var_with_constr(), ExchangeColumns(), ExchangeRows(), exist_points(), extract_funny_stuff(), ExtractLinearPart(), find_a_permutation(), Find_m_faces(), findHermiteBasis(), FindHermiteBasisofDomain(), FindSimple(), full_dimensionize(), GaussSimplify(), Gcd(), GenParamPolyhedron(), get_constant_part(), get_linear_part(), get_parameter_part(), hermite(), in_domain(), int_ker(), int_mod_basis(), isinHnf(), isIntegral(), Lattice2LatticeUnion(), LatticeIntersection(), LatticePreimage(), Lcm3(), left_hermite(), LexSmaller(), lower_upper_bounds(), MatInverse(), Matrix_Copy(), Matrix_Inverse(), Matrix_Product(), mpolyhedron_compress_last_vars(), mpolyhedron_permute(), mtransformation_expand_left_to_dim(), mtransformation_permute(), new_eadd(), old_Polyhedron_Preprocess(), Orthogonal_Base(), P_Enum(), petit_c(), petit_l(), Polyhedron_Image_Enumerate(), Polyhedron_Preprocess2(), PolyhedronLTQ(), PutColumnFirst(), PutColumnLast(), PutRowFirst(), PutRowLast(), rat_prodmat(), Rays_Mult(), Rays_Mult_Transpose(), RearrangeMatforSolveDio(), Remove_Redundants(), right_hermite(), scan_m_face(), Scan_Vertices(), Simplify(), smith(), SolveDiophantine(), split_constraints(), SubConstraint(), swap_line(), TestRank(), traite_m_face(), transpose(), Transpose(), Vector_Copy(), Vector_Map(), Vector_Max(), Vector_Min(), Vector_Min_Not_Zero(), Vector_Reduce(), Vector_Sort(), and VertexCT().

#define value_clear val   )     ((val) = 0)
 

Definition at line 332 of file arithmetique.h.

Referenced by AddLattice(), affine_periods(), AffinePartSimplify(), AffineSmith(), Binomial(), CanonicalForm(), check_poly(), cherche_min(), CNP(), Combine(), compute_enode(), count_points(), dehomogenize_polynomial(), DomainConstraintSimplify(), DomainCost(), eadd(), echange_c(), echange_l(), Ehrhart_Quick_Apx_Full_Dim(), Elim_Columns(), eliminate_var_with_constr(), emul(), encore(), Enumerate_NoParameters(), evalue_div(), ExchangeColumns(), ExchangeRows(), exist_points(), Factorial(), FindHermiteBasisofDomain(), FindSimple(), free_evalue_refs(), Gauss4(), GaussSimplify(), Gcd(), Hermite(), hermite(), in_domain(), isinHnf(), isIntegral(), Lattice2LatticeUnion(), LatticePreimage(), Lcm3(), left_hermite(), lower_upper_bounds(), main(), MatInverse(), Matrix_Inverse(), Matrix_Product(), mpolyhedron_deflate(), mpolyhedron_inflate(), mpolyhedron_simplify(), mtransformation_inverse(), new_eadd(), old_Polyhedron_Preprocess(), Orthogonal_Base(), P_Enum(), petit_c(), petit_l(), Poly2Sat(), Polyhedron_Enumerate(), Polyhedron_Image_Enumerate(), Polyhedron_Not_Empty(), Polyhedron_Preprocess(), Polyhedron_Preprocess2(), PolyhedronIncludes(), Print_Vertex(), PutColumnFirst(), PutColumnLast(), PutRowFirst(), PutRowLast(), rat_prodmat(), Rays_Mult(), Rays_Mult_Transpose(), reduce_evalue(), Reduce_Matrix(), Remove_Redundants(), right_hermite(), Scan_Vertices(), Simplify(), Smith(), smith(), SolveDiophantine(), Soustraire_ligne(), TestRank(), transpose(), value_free(), Vector_Combine(), Vector_Free(), Vector_Gcd(), Vector_Min_Not_Zero(), Vector_Normalize(), Vector_Normalize_Positive(), and Vector_Sort().

#define value_cmp_si val,
n   )     (val - VALUE_CONST(n))
 

Definition at line 419 of file arithmetique.h.

Referenced by Gauss4(), and mpolyhedron_eliminate_first_variables().

#define value_compare v1,
v2   )     (value_eq(v1,v2)?0:value_lt(v1,v2)?-1:1)
 

Definition at line 357 of file arithmetique.h.

#define value_decrement ref,
val   )     ((ref) = (val)-VALUE_ONE)
 

Definition at line 385 of file arithmetique.h.

Referenced by addToFilter(), AffineSmith(), b_modulo(), cherche_min(), FindSimple(), hermite(), Polyhedron_Image_Enumerate(), smith(), and SubConstraint().

#define value_direct_multiply v1,
v2   )     ((v1)*(v2))
 

Definition at line 364 of file arithmetique.h.

#define value_direct_product ref,
val1,
val2   )     ((ref) = (val1)*(val2))
 

Definition at line 381 of file arithmetique.h.

#define value_div v1,
v2   )     ((v1)/(v2))
 

Definition at line 362 of file arithmetique.h.

#define value_division ref,
val1,
val2   )     ((ref) = (val1)/(val2))
 

Definition at line 386 of file arithmetique.h.

Referenced by affine_periods(), AffineSmith(), b_modulo(), Binomial(), CalcBase(), CNP(), Combine(), dehomogenize_polynomial(), eadd(), Ehrhart_Quick_Apx_Full_Dim(), eliminate_var_with_constr(), emul(), evalue_div(), FindHermiteBasisofDomain(), Gauss4(), GaussSimplify(), hermite(), Lattice2LatticeUnion(), Lcm3(), lower_upper_bounds(), MatInverse(), Matrix_Inverse(), mpolyhedron_simplify(), mtransformation_inverse(), new_eadd(), old_Polyhedron_Preprocess(), Orthogonal_Base(), P_Enum(), Polyhedron_Preprocess2(), ppcm(), Print_Vertex(), rat_prodmat(), Scan_Vertices(), Simplify(), smith(), SolveDiophantine(), Soustraire_ligne(), TestRank(), Vector_AntiScale(), Vector_Normalize(), and Vector_Normalize_Positive().

#define value_eq v1,
v2   )     ((v1)==(v2))
 

Definition at line 347 of file arithmetique.h.

Referenced by b_modulo(), DomainCost(), FindSimple(), Remove_Redundants(), and Simplify().

#define VALUE_FMT   "%s"
 

Definition at line 237 of file arithmetique.h.

Referenced by AffineSmith(), check_poly(), main(), mpolyhedron_simplify(), P_Enum(), Polyhedron_Preprocess2(), Polyhedron_Print(), Print_Domain(), print_evalue(), and Print_Vertex().

#define value_ge v1,
v2   )     ((v1)>=(v2))
 

Definition at line 350 of file arithmetique.h.

Referenced by cherche_min(), GaussSimplify(), isinHnf(), petit_c(), petit_l(), and Simplify().

#define value_gt v1,
v2   )     ((v1)>(v2))
 

Definition at line 349 of file arithmetique.h.

Referenced by AffinePartCompare(), DomainCost(), FindSimple(), LinearPartCompare(), lower_upper_bounds(), P_Enum(), Polyhedron_Preprocess2(), Simplify(), and Vector_Normalize().

#define value_increment ref,
val   )     ((ref) = (val)+VALUE_ONE)
 

Definition at line 380 of file arithmetique.h.

Referenced by check_poly(), cherche_min(), count_points(), exist_points(), FindSimple(), P_Enum(), Remove_Redundants(), and Simplify().

#define value_init val   )     ((val) = 0)
 

Definition at line 328 of file arithmetique.h.

Referenced by AddLattice(), affine_periods(), AffinePartSimplify(), AffineSmith(), Binomial(), CanonicalForm(), check_poly(), cherche_min(), CNP(), Combine(), compute_enode(), compute_poly(), ConvertPolMattoDarMat(), count_points(), dehomogenize_periodic(), dehomogenize_polynomial(), Domain_Enumerate(), DomainConstraintSimplify(), DomainCost(), eadd(), echange_c(), echange_l(), ecopy(), edot(), Ehrhart_Quick_Apx_Full_Dim(), Elim_Columns(), eliminate_var_with_constr(), emul(), encore(), Enumerate_NoParameters(), evalue_div(), ExchangeColumns(), ExchangeRows(), exist_points(), Factorial(), FindHermiteBasisofDomain(), FindSimple(), Gauss4(), GaussSimplify(), Gcd(), Hermite(), hermite(), in_domain(), isinHnf(), isIntegral(), Lattice2LatticeUnion(), LatticePreimage(), Lcm(), Lcm3(), left_hermite(), lower_upper_bounds(), main(), MatInverse(), Matrix_Extend(), Matrix_Inverse(), Matrix_Product(), mpolyhedron_deflate(), mpolyhedron_inflate(), mpolyhedron_simplify(), mtransformation_inverse(), new_eadd(), new_enode(), old_Polyhedron_Preprocess(), Orthogonal_Base(), P_Enum(), petit_c(), petit_l(), Poly2Sat(), Polyhedron_Enumerate(), Polyhedron_Image_Enumerate(), Polyhedron_Not_Empty(), Polyhedron_Preprocess(), Polyhedron_Preprocess2(), PolyhedronIncludes(), ppcm(), Print_Vertex(), PutColumnFirst(), PutColumnLast(), PutRowFirst(), PutRowLast(), rat_prodmat(), Rays_Mult(), Rays_Mult_Transpose(), Remove_Redundants(), right_hermite(), Scan_Vertices(), Simplify(), Smith(), smith(), SolveDiophantine(), Soustraire_ligne(), TestRank(), transpose(), value_alloc(), Vector_Alloc(), Vector_Combine(), Vector_Gcd(), Vector_Min_Not_Zero(), Vector_Normalize(), Vector_Normalize_Positive(), and Vector_Sort().

#define value_le v1,
v2   )     ((v1)<=(v2))
 

Definition at line 352 of file arithmetique.h.

Referenced by check_poly(), cherche_min(), count_points(), exist_points(), and Polyhedron_Preprocess2().

#define value_lshift v1,
v2   )     ((v1)<<(v2))
 

Definition at line 372 of file arithmetique.h.

#define value_lt v1,
v2   )     ((v1)<(v2))
 

Definition at line 351 of file arithmetique.h.

Referenced by AffinePartCompare(), count_points(), DomainCost(), exist_points(), hermite(), LinearPartCompare(), lower_upper_bounds(), P_Enum(), Polyhedron_Preprocess2(), Remove_Redundants(), Simplify(), Vector_Min_Not_Zero(), and Vector_Sort().

#define value_max v1,
v2   )     (value_ge((v1),(v2))? (v1): (v2))
 

Definition at line 369 of file arithmetique.h.

#define value_max_p val   )     value_eq(val,VALUE_MAX)
 

Definition at line 421 of file arithmetique.h.

#define value_maximum ref,
val1,
val2   )     ((ref) = value_max((val1),(val2)))
 

Definition at line 393 of file arithmetique.h.

Referenced by Vector_Max().

#define value_min v1,
v2   )     (value_le((v1),(v2))? (v1): (v2))
 

Definition at line 368 of file arithmetique.h.

#define value_min_p val   )     value_eq(val,VALUE_MIN)
 

Definition at line 420 of file arithmetique.h.

#define value_minimum ref,
val1,
val2   )     ((ref) = value_min((val1),(val2)))
 

Definition at line 392 of file arithmetique.h.

Referenced by Vector_Min().

#define value_minus v1,
v2   )     ((v1)-(v2))
 

Definition at line 365 of file arithmetique.h.

#define value_mod v1,
v2   )     ((v1)%(v2))
 

Definition at line 363 of file arithmetique.h.

#define value_modulus ref,
val1,
val2   )     ((ref) = (val1)%(val2))
 

Definition at line 387 of file arithmetique.h.

Referenced by AffineSmith(), encore(), Gcd(), hermite(), isIntegral(), lower_upper_bounds(), P_Enum(), smith(), SolveDiophantine(), and Vector_Gcd().

#define value_mone_p val   )     value_eq(val,VALUE_MONE)
 

Definition at line 417 of file arithmetique.h.

Referenced by Degenerate(), Print_Domain(), and Print_Vertex().

#define value_mult v,
 ) 
 

Value:

value_protected_multiply(v,w,                                                 \
    (fprintf(stderr,"[value_mult] value overflow!\n"),THROW(overflow_error)))

Definition at line 471 of file arithmetique.h.

#define value_multiply ref,
val1,
val2   )     ((ref) = value_mult((val1),(val2)))
 

Definition at line 382 of file arithmetique.h.

Referenced by b_modulo(), Binomial(), CalcBase(), Chernikova(), CNP(), dehomogenize_polynomial(), DomainCost(), eadd(), Ehrhart_Quick_Apx_Full_Dim(), Elim_Columns(), eliminate_var_with_constr(), emul(), evalue_div(), Factorial(), FindHermiteBasisofDomain(), hermite(), Inner_Product(), LatticePreimage(), Lcm3(), MatInverse(), Matrix_Inverse(), Matrix_Vector_Product(), mtransformation_inverse(), new_eadd(), old_Polyhedron_Preprocess(), Orthogonal_Base(), P_Enum(), Poly2Sat(), Polyhedron_Enumerate(), Polyhedron_Preprocess2(), ppcm(), rat_prodmat(), Scan_Vertices(), Soustraire_ligne(), TestRank(), Vector_Combine(), Vector_Matrix_Product(), and Vector_Scale().

#define value_ne v1,
v2   )     ((v1)!=(v2))
 

Definition at line 348 of file arithmetique.h.

Referenced by AlmostSameAffinePart(), check_poly(), DomainCost(), eequal(), Polyhedron_Preprocess(), Remove_Redundants(), sameAffinepart(), sameLattice(), SameLinearPart(), SolveDiophantine(), and Vector_Equal().

#define value_neg_p val   )     value_lt(val,VALUE_ZERO)
 

Definition at line 410 of file arithmetique.h.

Referenced by AffineSmith(), b_modulo(), CalcBase(), cherche_min(), Chernikova(), Gauss4(), GaussSimplify(), hermite(), in_domain(), lower_upper_bounds(), Matrix_Inverse(), P_Enum(), Polyhedron_Preprocess(), PolyhedronIncludes(), PolyhedronLTQ(), RaySort(), smith(), and Vector_Normalize_Positive().

#define value_negz_p val   )     value_le(val,VALUE_ZERO)
 

Definition at line 412 of file arithmetique.h.

Referenced by old_Polyhedron_Preprocess().

#define value_not val   )     (~(val))
 

Definition at line 400 of file arithmetique.h.

#define value_notmax_p val   )     value_ne(val,VALUE_MAX)
 

Definition at line 423 of file arithmetique.h.

#define value_notmin_p val   )     value_ne(val,VALUE_MIN)
 

Definition at line 422 of file arithmetique.h.

#define value_notmone_p val   )     value_ne(val,VALUE_MONE)
 

Definition at line 418 of file arithmetique.h.

Referenced by count_points().

#define value_notone_p val   )     value_ne(val,VALUE_ONE)
 

Definition at line 416 of file arithmetique.h.

Referenced by compute_evalue(), eadd(), emul(), Enumerate_NoParameters(), evalue_div(), GaussSimplify(), GenParamPolyhedron(), IsLattice(), MatInverse(), Matrix_Inverse(), new_eadd(), Orthogonal_Base(), print_evalue(), Print_Vertex(), Rays_Mult(), Rays_Mult_Transpose(), Scan_Vertices(), Vector_Gcd(), and Vector_Normalize_Positive().

#define value_notzero_p val   )     value_ne(val,VALUE_ZERO)
 

Definition at line 414 of file arithmetique.h.

Referenced by addeliminatedparams_evalue(), aep_evalue(), BuildSat(), CalcBase(), Chernikova(), compute_evalue(), Degenerate(), dehomogenize_periodic(), DomainDifference(), eadd(), eequal(), Ehrhart_Quick_Apx_Full_Dim(), Elim_Columns(), eliminate_var_with_constr(), emul(), encore(), evalue_div(), existepivot(), Find_m_faces(), findHermiteBasis(), FindHermiteBasisofDomain(), FindSimple(), First_Non_Zero(), free_evalue_refs(), Gauss4(), GaussSimplify(), Gcd(), hermite(), in_domain(), isEmptyLattice(), isinHnf(), isIntegral(), IsLattice(), isLinear(), lower_upper_bounds(), MatInverse(), Matrix_Inverse(), new_eadd(), old_Polyhedron_Preprocess(), P_Enum(), petit_c(), petit_l(), Polyhedron_Enumerate(), Polyhedron_Print(), PolyhedronIncludes(), PreElim_Columns(), Print_Domain(), print_evalue(), Print_Vertex(), RearrangeMatforSolveDio(), reduce_evalue(), Remove_Redundants(), Scan_Vertices(), SimplifyEqualities(), smith(), SolveDiophantine(), SubConstraint(), TestRank(), Vector_Gcd(), Vector_Min_Not_Zero(), and VertexCT().

#define value_one_p val   )     value_eq(val,VALUE_ONE)
 

Definition at line 415 of file arithmetique.h.

Referenced by ConstraintSimplify(), GaussSimplify(), isEmptyLattice(), LatticeImage(), PolyhedronLTQ(), Print_Domain(), rat_prodmat(), reduce_evalue(), and Remove_Redundants().

#define value_oppose ref,
val   )     ((ref) = value_uminus((val)))
 

Definition at line 390 of file arithmetique.h.

Referenced by b_modulo(), CalcBase(), Chernikova(), Combine(), DomainCost(), Gauss4(), GaussSimplify(), hermite(), int_mod_basis(), LatticePreimage(), lower_upper_bounds(), MakeDioEqforInter(), Matrix_Inverse(), moins_c(), moins_l(), old_Polyhedron_Preprocess(), Polyhedron_Image_Enumerate(), Polyhedron_Preprocess(), Polyhedron_Preprocess2(), PolyhedronLTQ(), smith(), SolveDiophantine(), SubConstraint(), and Vector_Normalize_Positive().

#define value_or v1,
v2   )     ((v1)|(v2))
 

Definition at line 370 of file arithmetique.h.

#define value_orto ref,
val1,
val2   )     ((ref) = (val1)|(val2))
 

Definition at line 394 of file arithmetique.h.

Referenced by Vector_Or().

#define value_pdiv v1,
v2   )     (divide((v1),(v2)))
 

Definition at line 366 of file arithmetique.h.

#define value_pdivision ref,
val1,
val2   )     ((ref) = value_pdiv((val1),(val2)))
 

Definition at line 388 of file arithmetique.h.

Referenced by ConstraintSimplify().

#define value_plus v1,
v2   )     ((v1)+(v2))
 

Definition at line 361 of file arithmetique.h.

#define value_pmod v1,
v2   )     (modulo((v1),(v2)))
 

Definition at line 367 of file arithmetique.h.

#define value_pmodulus ref,
val1,
val2   )     ((ref) = value_pmod((val1),(val2)))
 

Definition at line 389 of file arithmetique.h.

Referenced by compute_enode().

#define value_pos_p val   )     value_gt(val,VALUE_ZERO)
 

Definition at line 409 of file arithmetique.h.

Referenced by cherche_min(), exist_points(), FindSimple(), lower_upper_bounds(), P_Enum(), Polyhedron_Image_Enumerate(), PolyhedronLTQ(), and Print_Domain().

#define value_posz_p val   )     value_ge(val,VALUE_ZERO)
 

Definition at line 411 of file arithmetique.h.

Referenced by addToFilter(), b_modulo(), FindSimple(), old_Polyhedron_Preprocess(), and Print_Vertex().

#define value_print Dst,
fmt,
val   )     (fprintf((Dst),(fmt),(val)))
 

Definition at line 334 of file arithmetique.h.

Referenced by AffineSmith(), check_poly(), cherche_min(), Chernikova(), count_points(), Ehrhart_Quick_Apx_Full_Dim(), Enumerate_NoParameters(), main(), Matrix_Print(), mpolyhedron_simplify(), P_Enum(), Polyhedron_Enumerate(), Polyhedron_Preprocess(), Polyhedron_Preprocess2(), Polyhedron_Print(), Polyhedron_PrintConstraints(), Print_Domain(), print_evalue(), Print_Vertex(), and Vector_Print().

#define value_product v,
 )     v=value_mult(v,w)
 

Definition at line 474 of file arithmetique.h.

#define value_protected_hard_idiv_multiply v,
w,
throw   ) 
 

Value:

((value_zero_p(w) || value_zero_p(v))? VALUE_ZERO:              \
   value_lt(value_abs(v),value_div(VALUE_MAX,value_abs(w)))?    \
   value_direct_multiply(v,w): (throw, VALUE_NAN))

Definition at line 435 of file arithmetique.h.

#define value_protected_mult v,
 )     value_protected_multiply(v,w,THROW(overflow_error))
 

Definition at line 454 of file arithmetique.h.

#define value_protected_multiply v,
w,
throw   )     value_protected_hard_idiv_multiply(v,w,throw)
 

Definition at line 448 of file arithmetique.h.

#define value_protected_product v,
 )     v=value_protected_mult(v,w)
 

Definition at line 456 of file arithmetique.h.

#define value_read val,
str   )     (sscanf((str),VALUE_FMT,&(val)))
 

Definition at line 333 of file arithmetique.h.

Referenced by main(), Matrix_Read_Input(), and Vector_Read().

#define value_rshift v1,
v2   )     ((v1)>>(v2))
 

Definition at line 373 of file arithmetique.h.

#define value_set_double val,
 )     ((val) = (Value)(d))
 

Definition at line 331 of file arithmetique.h.

Referenced by compute_poly().

#define value_set_si val,
 )     ((val) = (Value)(i))
 

Definition at line 330 of file arithmetique.h.

Referenced by AddANullColumn(), AddANullRow(), AddLattice(), addToFilter(), affine_periods(), AffineSmith(), align_context(), b_modulo(), Binomial(), BuildSat(), CalcBase(), ChangeLatticeDimension(), cherche_min(), CNP(), compute_enode(), compute_poly(), Constraints2Polyhedron(), count_points(), dehomogenize_polynomial(), DomainConstraintSimplify(), DomainCost(), edot(), Ehrhart_Quick_Apx_Full_Dim(), Empty_Polyhedron(), EmptyLattice(), emul(), Enumerate_NoParameters(), exist_points(), Factorial(), Find_m_faces(), FindHermiteBasisofDomain(), FindSimple(), full_dimensionize(), GaussSimplify(), GenParamPolyhedron(), identite(), Identity(), Identity_Matrix(), int_mod_basis(), LatticeIntersection(), LatticePreimage(), left_hermite(), LexSmaller(), lower_upper_bounds(), main(), MakeDioEqforInter(), MatInverse(), Matrix_Inverse(), Matrix_Product(), mpolyhedron_compress_last_vars(), mpolyhedron_deflate(), mpolyhedron_eliminate_first_variables(), mpolyhedron_inflate(), mpolyhedron_simplify(), mtransformation_inverse(), new_eadd(), new_enode(), old_Polyhedron_Preprocess(), Orthogonal_Base(), P_Enum(), Poly2Sat(), Polyhedron_Enumerate(), Polyhedron_Image_Enumerate(), Polyhedron_Not_Empty(), Polyhedron_Preprocess(), Polyhedron_Preprocess2(), Polyhedron_Scan(), PolyhedronIncludes(), PolyhedronLTQ(), PreElim_Columns(), rat_prodmat(), Rays2Polyhedron(), Rays_Mult(), Rays_Mult_Transpose(), Remove_Redundants(), right_hermite(), Scalar_product(), Scan_Vertices(), Simplify(), smith(), SolveDiophantine(), Soustraire_ligne(), SubConstraint(), Universe_Polyhedron(), Vector_Min_Not_Zero(), Vector_Normalize(), Vector_Set(), and VertexCT().

#define value_sign  )     (value_eq(v,VALUE_ZERO)?0:value_lt(v,VALUE_ZERO)?-1:1)
 

Definition at line 356 of file arithmetique.h.

Referenced by mpolyhedron_deflate(), and mpolyhedron_inflate().

#define value_sub_int ref,
val,
vint   )     ((ref) = (val)-(Value)(vint))
 

Definition at line 384 of file arithmetique.h.

Referenced by lower_upper_bounds(), P_Enum(), Polyhedron_Preprocess(), and Polyhedron_Preprocess2().

#define value_substract ref,
val1,
val2   )     (value_subtract((ref),(val1),(val2)))
 

Definition at line 553 of file arithmetique.h.

#define value_subtract ref,
val1,
val2   )     ((ref) = (val1)-(val2))
 

Definition at line 383 of file arithmetique.h.

Referenced by b_modulo(), count_points(), Elim_Columns(), eliminate_var_with_constr(), exist_points(), FindHermiteBasisofDomain(), hermite(), LatticePreimage(), main(), MatInverse(), Matrix_Inverse(), mpolyhedron_deflate(), mpolyhedron_inflate(), Orthogonal_Base(), P_Enum(), Polyhedron_Image_Enumerate(), Polyhedron_Preprocess2(), SolveDiophantine(), Soustraire_ligne(), TestRank(), and Vector_Sub().

#define value_swap v1,
v2   ) 
 

Value:

{Value tmp; tmp = v2; \
                                    v2 = v1; v1 = tmp;   \
                                   }

Definition at line 335 of file arithmetique.h.

Referenced by Vector_Exchange().

#define VALUE_TO_DOUBLE val   )     (mpz_get_d(val))
 

Definition at line 246 of file arithmetique.h.

Referenced by compute_enode(), and compute_evalue().

#define VALUE_TO_FLOAT val   )     ((float)((int)mpz_get_si(val)))
 

Definition at line 245 of file arithmetique.h.

#define VALUE_TO_INT val   )     ((int)mpz_get_si(val))
 

Definition at line 244 of file arithmetique.h.

Referenced by check_poly(), compute_enode(), main(), P_Enum(), Simplify(), and SplitLattice().

#define VALUE_TO_LONG val   )     (mpz_get_si(val))
 

Definition at line 243 of file arithmetique.h.

#define value_uminus val   )     (-(val))
 

Definition at line 399 of file arithmetique.h.

#define value_zero_p val   )     value_eq(val,VALUE_ZERO)
 

Definition at line 413 of file arithmetique.h.

Referenced by b_modulo(), CalcBase(), Chernikova(), Constraints2Polyhedron(), dehomogenize_evalue(), dehomogenize_polynomial(), Disjoint_Domain(), Domain_Enumerate(), DomainCost(), eadd(), ecopy(), Ehrhart_Quick_Apx_Full_Dim(), emul(), encore(), Enumerate_NoParameters(), evalue_div(), existepivot(), findHermiteBasis(), FindHermiteBasisofDomain(), FindSimple(), GaussSimplify(), GenParamPolyhedron(), hermite(), isfulldim(), Lcm3(), lower_upper_bounds(), MatInverse(), Matrix_Inverse(), new_eadd(), P_Enum(), Poly2Sat(), Polyhedron_Enumerate(), Polyhedron_Image_Enumerate(), Polyhedron_Preprocess(), Polyhedron_Preprocess2(), PolyhedronIncludes(), PolyhedronLTQ(), PreElim_Columns(), RaySort(), RearrangeMatforSolveDio(), reduce_evalue(), Remove_Redundants(), Soustraire_ligne(), split_constraints(), and TestRank().


Typedef Documentation

typedef struct col tableau
 

typedef mpz_t Value
 

Definition at line 236 of file arithmetique.h.

Referenced by AddConstraints(), AddLattice(), AddRays(), addToFilter(), affine_periods(), AffinePartSimplify(), AffineSmith(), b_modulo(), Binomial(), BuildSat(), CalcBase(), CanonicalForm(), check_poly(), cherche_min(), Chernikova(), CNP(), colonne(), Combine(), compute_enode(), compute_evalue(), compute_poly(), ConstraintSimplify(), ConvertDarMattoPolMat(), ConvertPolMattoDarMat(), count_points(), dehomogenize_polynomial(), DomainConstraintSimplify(), DomainCost(), eadd(), echange_c(), echange_l(), Ehrhart_Quick_Apx_Full_Dim(), Elim_Columns(), eliminate_var_with_constr(), emul(), encore(), Enumerate_NoParameters(), evalue_div(), ExchangeColumns(), ExchangeRows(), exist_points(), Factorial(), FindHermiteBasisofDomain(), FindSimple(), First_Non_Zero(), Gauss4(), GaussSimplify(), Gcd(), Hermite(), hermite(), identite(), in_domain(), Inner_Product(), isinHnf(), isIntegral(), Lattice2LatticeUnion(), LatticePreimage(), Lcm(), Lcm3(), left_hermite(), ligne(), lower_upper_bounds(), main(), MatInverse(), Matrix_Alloc(), Matrix_Extend(), Matrix_Inverse(), Matrix_Print(), Matrix_Product(), Matrix_Read_Input(), Matrix_Vector_Product(), moins_c(), moins_l(), mpolyhedron_deflate(), mpolyhedron_inflate(), mpolyhedron_simplify(), mtransformation_inverse(), new_eadd(), old_Polyhedron_Preprocess(), Orthogonal_Base(), P_Enum(), p_simplify_constraints(), petit_c(), petit_l(), Poly2Sat(), Polyhedron_Alloc(), Polyhedron_Enumerate(), Polyhedron_Image_Enumerate(), Polyhedron_Not_Empty(), Polyhedron_Preprocess(), Polyhedron_Preprocess2(), Polyhedron_Print(), PolyhedronIncludes(), ppcm(), Print_Vertex(), PutColumnFirst(), PutColumnLast(), PutRowFirst(), PutRowLast(), rat_prodmat(), Rays_Mult(), Rays_Mult_Transpose(), RaySort(), Reduce_Matrix(), Remove_Redundants(), right_hermite(), Scalar_product(), Scan_Vertices(), Simplify(), Smith(), smith(), SolveDiophantine(), Soustraire_ligne(), SplitZpolyhedron(), SubConstraint(), swap_line(), TestRank(), transpose(), value_alloc(), value_free(), Vector_Add(), Vector_Alloc(), Vector_AntiScale(), Vector_Combine(), Vector_Copy(), Vector_Equal(), Vector_Exchange(), Vector_Gcd(), Vector_Map(), Vector_Matrix_Product(), Vector_Max(), Vector_Min(), Vector_Min_Not_Zero(), Vector_Normalize(), Vector_Normalize_Positive(), Vector_Or(), Vector_Print(), Vector_Read(), Vector_Reduce(), Vector_Scale(), Vector_Set(), Vector_Sort(), and Vector_Sub().


Function Documentation

void dump_exception_stack void   ) 
 

Definition at line 213 of file errors.c.

References dump_exception_stack_to_file().

Referenced by pop_exception_from_stack(), push_exception_on_stack(), and throw_exception().

void dump_exception_stack_to_file FILE *   ) 
 

Definition at line 196 of file errors.c.

References exception_index, and exception_stack.

Referenced by dump_exception_stack().

void pop_exception_from_stack int  ,
char *  ,
char *  ,
int 
 

Definition at line 265 of file errors.c.

References dump_exception_stack(), exception_debug_message, exception_debug_trace, exception_index, exception_stack, pop_callback, same_string_p, and the_last_just_thrown_exception.

jmp_buf* push_exception_on_stack int  ,
char *  ,
char *  ,
int 
 

Definition at line 229 of file errors.c.

References dump_exception_stack(), exception_debug_message, exception_debug_trace, exception_index, exception_stack, MAX_STACKED_CONTEXTS, push_callback, and the_last_just_thrown_exception.

void throw_exception int  ,
const char *  ,
const char *  ,
int 
 

Definition at line 309 of file errors.c.

References dump_exception_stack(), exception_debug_message, exception_debug_trace, exception_index, exception_stack, linear_exception_debug_mode, linear_exception_verbose, linear_number_of_exception_thrown, pop_callback, the_last_just_thrown_exception, and linear_exception_holder::what.


Variable Documentation

unsigned int any_exception_error
 

Definition at line 615 of file arithmetique.h.

Referenced by AddConstraints(), AddRays(), align_context(), BuildSat(), Chernikova(), Constraints2Polyhedron(), DomainConvex(), DomainCost(), DomainImage(), DomainPreimage(), FindSimple(), Gauss4(), get_exception_name(), Polyhedron_Image(), Polyhedron_Preimage(), Rays2Polyhedron(), Rays_Mult(), Rays_Mult_Transpose(), Remove_Redundants(), SimplifyConstraints(), Stras_DomainSimplify(), and SubConstraint().

int linear_exception_debug_mode
 

Definition at line 617 of file arithmetique.h.

Referenced by throw_exception().

unsigned int overflow_error
 

Definition at line 611 of file arithmetique.h.

Referenced by Ehrhart_Quick_Apx_Full_Dim(), Enumerate_NoParameters(), get_exception_name(), and Polyhedron_Enumerate().

unsigned int parser_exception_error
 

Definition at line 614 of file arithmetique.h.

Referenced by get_exception_name().

unsigned int simplex_arithmetic_error
 

Definition at line 612 of file arithmetique.h.

Referenced by get_exception_name().

unsigned int the_last_just_thrown_exception
 

Definition at line 616 of file arithmetique.h.

unsigned int user_exception_error
 

Definition at line 613 of file arithmetique.h.

Referenced by get_exception_name().


Generated on Mon Sep 12 15:15:12 2005 for polylib by doxygen 1.3.5