00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef PPL_ppl_c_h
00024 #define PPL_ppl_c_h 1
00025
00127
00128
00129
00130
00132
00133 #include <stdio.h>
00134 #include <gmp.h>
00135 #include <stddef.h>
00136
00137
00138
00139
00140
00141
00142 #if defined(__STDC__) \
00143 || defined(__cplusplus) \
00144 || defined (_AIX) \
00145 || (defined (__mips) && defined (_SYSTYPE_SVR4)) \
00146 || defined(_WIN32)
00147 # define PPL_PROTO(protos) protos
00148 #else
00149 # define PPL_PROTO(protos) ()
00150 #endif
00151
00152 #ifdef __cplusplus
00153 extern "C" {
00154 #endif
00155
00159 enum ppl_enum_error_code {
00162 PPL_ERROR_OUT_OF_MEMORY = -2,
00165 PPL_ERROR_INVALID_ARGUMENT = -3,
00168 PPL_ERROR_DOMAIN_ERROR = -4,
00172 PPL_ERROR_LENGTH_ERROR = -5,
00177 PPL_ARITHMETIC_OVERFLOW = -6,
00182 PPL_STDIO_ERROR = -7,
00186 PPL_ERROR_INTERNAL_ERROR = -8,
00190 PPL_ERROR_UNKNOWN_STANDARD_EXCEPTION = -9,
00194 PPL_ERROR_UNEXPECTED_ERROR = -10
00195 };
00196
00199
00203 #define PPL_VERSION_MAJOR 0
00204
00208 #define PPL_VERSION_MINOR 9
00209
00213 #define PPL_VERSION_REVISION 0
00214
00219 #define PPL_VERSION_BETA 0
00220
00234 #define PPL_VERSION "0.9"
00235
00239 int
00240 ppl_version_major PPL_PROTO((void));
00241
00245 int
00246 ppl_version_minor PPL_PROTO((void));
00247
00251 int
00252 ppl_version_revision PPL_PROTO((void));
00253
00257 int
00258 ppl_version_beta PPL_PROTO((void));
00259
00264 int
00265 ppl_version PPL_PROTO((const char** p));
00266
00275 int
00276 ppl_banner PPL_PROTO((const char** p));
00277
00279
00283 typedef size_t ppl_dimension_type;
00284
00287
00291 int
00292 ppl_max_space_dimension PPL_PROTO((ppl_dimension_type* m));
00293
00297 int
00298 ppl_not_a_dimension PPL_PROTO((ppl_dimension_type* m));
00299
00308 int
00309 ppl_initialize PPL_PROTO((void));
00310
00319 int
00320 ppl_finalize PPL_PROTO((void));
00321
00330 int
00331 ppl_set_error_handler PPL_PROTO((void (*h)(enum ppl_enum_error_code code,
00332 const char* description)));
00333
00335
00336 #undef PPL_TYPE_DECLARATION
00337
00338 #define PPL_TYPE_DECLARATION(Type) typedef struct ppl_ ## Type ## _tag* ppl_ ## Type ## _t; typedef struct ppl_ ## Type ## _tag const* ppl_const_ ## Type ## _t
00339
00340 PPL_TYPE_DECLARATION(Coefficient);
00341
00342 PPL_TYPE_DECLARATION(Linear_Expression);
00343
00344 PPL_TYPE_DECLARATION(Constraint);
00345
00346 PPL_TYPE_DECLARATION(Constraint_System);
00347
00348 PPL_TYPE_DECLARATION(Constraint_System_const_iterator);
00349
00350 PPL_TYPE_DECLARATION(Generator);
00351
00352 PPL_TYPE_DECLARATION(Generator_System);
00353
00354 PPL_TYPE_DECLARATION(Generator_System_const_iterator);
00355
00356 PPL_TYPE_DECLARATION(Polyhedron);
00357
00358 PPL_TYPE_DECLARATION(LP_Problem);
00359
00360 #undef PPL_TYPE_DECLARATION
00361
00364
00369 int
00370 ppl_new_Coefficient PPL_PROTO((ppl_Coefficient_t* pc));
00371
00377 int
00378 ppl_new_Coefficient_from_mpz_t PPL_PROTO((ppl_Coefficient_t* pc, mpz_t z));
00379
00384 int
00385 ppl_new_Coefficient_from_Coefficient PPL_PROTO((ppl_Coefficient_t* pc,
00386 ppl_const_Coefficient_t c));
00387
00391 int
00392 ppl_assign_Coefficient_from_mpz_t PPL_PROTO((ppl_Coefficient_t dst, mpz_t z));
00393
00397 int
00398 ppl_assign_Coefficient_from_Coefficient
00399 PPL_PROTO((ppl_Coefficient_t dst, ppl_const_Coefficient_t src));
00400
00405 int
00406 ppl_delete_Coefficient PPL_PROTO((ppl_const_Coefficient_t c));
00407
00411 int
00412 ppl_Coefficient_to_mpz_t PPL_PROTO((ppl_const_Coefficient_t c, mpz_t z));
00413
00419 int
00420 ppl_Coefficient_OK PPL_PROTO((ppl_const_Coefficient_t c));
00421
00426 int
00427 ppl_Coefficient_is_bounded PPL_PROTO((void));
00428
00433 int
00434 ppl_Coefficient_min PPL_PROTO((mpz_t min));
00435
00440 int
00441 ppl_Coefficient_max PPL_PROTO((mpz_t max));
00442
00444
00447
00453 int
00454 ppl_new_Linear_Expression PPL_PROTO((ppl_Linear_Expression_t* ple));
00455
00461 int
00462 ppl_new_Linear_Expression_with_dimension
00463 PPL_PROTO((ppl_Linear_Expression_t* ple, ppl_dimension_type d));
00464
00469 int
00470 ppl_new_Linear_Expression_from_Linear_Expression
00471 PPL_PROTO((ppl_Linear_Expression_t* ple, ppl_const_Linear_Expression_t le));
00472
00477 int
00478 ppl_new_Linear_Expression_from_Constraint
00479 PPL_PROTO((ppl_Linear_Expression_t* ple, ppl_const_Constraint_t c));
00480
00485 int
00486 ppl_new_Linear_Expression_from_Generator
00487 PPL_PROTO((ppl_Linear_Expression_t* ple, ppl_const_Generator_t g));
00488
00493 int
00494 ppl_delete_Linear_Expression PPL_PROTO((ppl_const_Linear_Expression_t le));
00495
00499 int
00500 ppl_assign_Linear_Expression_from_Linear_Expression
00501 PPL_PROTO((ppl_Linear_Expression_t dst, ppl_const_Linear_Expression_t src));
00502
00508 int
00509 ppl_Linear_Expression_add_to_coefficient
00510 PPL_PROTO((ppl_Linear_Expression_t le,
00511 ppl_dimension_type var,
00512 ppl_const_Coefficient_t n));
00513
00518 int
00519 ppl_Linear_Expression_add_to_inhomogeneous
00520 PPL_PROTO((ppl_Linear_Expression_t le, ppl_const_Coefficient_t n));
00521
00525 int
00526 ppl_add_Linear_Expression_to_Linear_Expression
00527 PPL_PROTO((ppl_Linear_Expression_t dst, ppl_const_Linear_Expression_t src));
00528
00532 int
00533 ppl_subtract_Linear_Expression_from_Linear_Expression
00534 PPL_PROTO((ppl_Linear_Expression_t dst, ppl_const_Linear_Expression_t src));
00535
00539 int
00540 ppl_multiply_Linear_Expression_by_Coefficient
00541 PPL_PROTO((ppl_Linear_Expression_t le, ppl_const_Coefficient_t n));
00542
00546 int
00547 ppl_Linear_Expression_space_dimension
00548 PPL_PROTO((ppl_const_Linear_Expression_t le, ppl_dimension_type* m));
00549
00554 int
00555 ppl_Linear_Expression_coefficient PPL_PROTO((ppl_const_Linear_Expression_t le,
00556 ppl_dimension_type var,
00557 ppl_Coefficient_t n));
00558
00562 int
00563 ppl_Linear_Expression_inhomogeneous_term
00564 PPL_PROTO((ppl_const_Linear_Expression_t le, ppl_Coefficient_t n));
00565
00571 int
00572 ppl_Linear_Expression_OK PPL_PROTO((ppl_const_Linear_Expression_t le));
00573
00575
00579 enum ppl_enum_Constraint_Type {
00581 PPL_CONSTRAINT_TYPE_LESS_THAN,
00583 PPL_CONSTRAINT_TYPE_LESS_THAN_OR_EQUAL,
00585 PPL_CONSTRAINT_TYPE_EQUAL,
00587 PPL_CONSTRAINT_TYPE_GREATER_THAN_OR_EQUAL,
00589 PPL_CONSTRAINT_TYPE_GREATER_THAN
00590 };
00591
00592
00595
00601 int
00602 ppl_new_Constraint PPL_PROTO((ppl_Constraint_t* pc,
00603 ppl_const_Linear_Expression_t le,
00604 enum ppl_enum_Constraint_Type rel));
00605
00610 int
00611 ppl_new_Constraint_zero_dim_false PPL_PROTO((ppl_Constraint_t* pc));
00612
00618 int
00619 ppl_new_Constraint_zero_dim_positivity PPL_PROTO((ppl_Constraint_t* pc));
00620
00625 int
00626 ppl_new_Constraint_from_Constraint PPL_PROTO((ppl_Constraint_t* pc,
00627 ppl_const_Constraint_t c));
00628
00633 int
00634 ppl_delete_Constraint PPL_PROTO((ppl_const_Constraint_t c));
00635
00639 int
00640 ppl_assign_Constraint_from_Constraint PPL_PROTO((ppl_Constraint_t dst,
00641 ppl_const_Constraint_t src));
00642
00646 int
00647 ppl_Constraint_space_dimension PPL_PROTO((ppl_const_Constraint_t c,
00648 ppl_dimension_type* m));
00649
00653 int
00654 ppl_Constraint_type PPL_PROTO((ppl_const_Constraint_t c));
00655
00660 int
00661 ppl_Constraint_coefficient PPL_PROTO((ppl_const_Constraint_t c,
00662 ppl_dimension_type var,
00663 ppl_Coefficient_t n));
00664
00668 int
00669 ppl_Constraint_inhomogeneous_term PPL_PROTO((ppl_const_Constraint_t c,
00670 ppl_Coefficient_t n));
00671
00677 int
00678 ppl_Constraint_OK PPL_PROTO((ppl_const_Constraint_t c));
00679
00681
00684
00689 int
00690 ppl_new_Constraint_System PPL_PROTO((ppl_Constraint_System_t* pcs));
00691
00696 int
00697 ppl_new_Constraint_System_zero_dim_empty
00698 PPL_PROTO((ppl_Constraint_System_t* pcs));
00699
00705 int
00706 ppl_new_Constraint_System_from_Constraint
00707 PPL_PROTO((ppl_Constraint_System_t* pcs, ppl_const_Constraint_t c));
00708
00713 int
00714 ppl_new_Constraint_System_from_Constraint_System
00715 PPL_PROTO((ppl_Constraint_System_t* pcs, ppl_const_Constraint_System_t cs));
00716
00721 int
00722 ppl_delete_Constraint_System PPL_PROTO((ppl_const_Constraint_System_t cs));
00723
00727 int
00728 ppl_assign_Constraint_System_from_Constraint_System
00729 PPL_PROTO((ppl_Constraint_System_t dst, ppl_const_Constraint_System_t src));
00730
00734 int
00735 ppl_Constraint_System_space_dimension
00736 PPL_PROTO((ppl_const_Constraint_System_t cs, ppl_dimension_type* m));
00737
00742 int
00743 ppl_Constraint_System_has_strict_inequalities
00744 PPL_PROTO((ppl_const_Constraint_System_t cs));
00745
00750 int
00751 ppl_Constraint_System_clear PPL_PROTO((ppl_Constraint_System_t cs));
00752
00757 int
00758 ppl_Constraint_System_insert_Constraint PPL_PROTO((ppl_Constraint_System_t cs,
00759 ppl_const_Constraint_t c));
00760
00766 int
00767 ppl_Constraint_System_OK PPL_PROTO((ppl_const_Constraint_System_t c));
00768
00769
00774 int
00775 ppl_new_Constraint_System_const_iterator
00776 PPL_PROTO((ppl_Constraint_System_const_iterator_t* pcit));
00777
00782 int
00783 ppl_new_Constraint_System_const_iterator_from_Constraint_System_const_iterator
00784 PPL_PROTO((ppl_Constraint_System_const_iterator_t* pcit,
00785 ppl_const_Constraint_System_const_iterator_t cit));
00786
00791 int
00792 ppl_delete_Constraint_System_const_iterator
00793 PPL_PROTO((ppl_const_Constraint_System_const_iterator_t cit));
00794
00798 int
00799 ppl_assign_Constraint_System_const_iterator_from_Constraint_System_const_iterator
00800 PPL_PROTO((ppl_Constraint_System_const_iterator_t dst,
00801 ppl_const_Constraint_System_const_iterator_t src));
00802
00807 int
00808 ppl_Constraint_System_begin
00809 PPL_PROTO((ppl_const_Constraint_System_t cs,
00810 ppl_Constraint_System_const_iterator_t cit));
00811
00816 int
00817 ppl_Constraint_System_end
00818 PPL_PROTO((ppl_const_Constraint_System_t cs,
00819 ppl_Constraint_System_const_iterator_t cit));
00820
00825 int
00826 ppl_Constraint_System_const_iterator_dereference
00827 PPL_PROTO((ppl_const_Constraint_System_const_iterator_t cit,
00828 ppl_const_Constraint_t* pc));
00829
00833 int
00834 ppl_Constraint_System_const_iterator_increment
00835 PPL_PROTO((ppl_Constraint_System_const_iterator_t cit));
00836
00841 int
00842 ppl_Constraint_System_const_iterator_equal_test
00843 PPL_PROTO((ppl_const_Constraint_System_const_iterator_t x,
00844 ppl_const_Constraint_System_const_iterator_t y));
00845
00847
00851 enum ppl_enum_Generator_Type {
00853 PPL_GENERATOR_TYPE_LINE,
00855 PPL_GENERATOR_TYPE_RAY,
00857 PPL_GENERATOR_TYPE_POINT,
00859 PPL_GENERATOR_TYPE_CLOSURE_POINT
00860 };
00861
00862
00865
00874 int
00875 ppl_new_Generator PPL_PROTO((ppl_Generator_t* pg,
00876 ppl_const_Linear_Expression_t le,
00877 enum ppl_enum_Generator_Type t,
00878 ppl_const_Coefficient_t d));
00879
00885 int
00886 ppl_new_Generator_zero_dim_point PPL_PROTO((ppl_Generator_t* pg));
00887
00893 int
00894 ppl_new_Generator_zero_dim_closure_point PPL_PROTO((ppl_Generator_t* pg));
00895
00900 int
00901 ppl_new_Generator_from_Generator PPL_PROTO((ppl_Generator_t* pg,
00902 ppl_const_Generator_t g));
00903
00908 int
00909 ppl_delete_Generator PPL_PROTO((ppl_const_Generator_t g));
00910
00914 int
00915 ppl_assign_Generator_from_Generator PPL_PROTO((ppl_Generator_t dst,
00916 ppl_const_Generator_t src));
00917
00921 int
00922 ppl_Generator_space_dimension PPL_PROTO((ppl_const_Generator_t g,
00923 ppl_dimension_type* m));
00924
00928 int
00929 ppl_Generator_type PPL_PROTO((ppl_const_Generator_t g));
00930
00935 int
00936 ppl_Generator_coefficient PPL_PROTO((ppl_const_Generator_t g,
00937 ppl_dimension_type var,
00938 ppl_Coefficient_t n));
00939
00943 int
00944 ppl_Generator_divisor PPL_PROTO((ppl_const_Generator_t g,
00945 ppl_Coefficient_t n));
00946
00952 int
00953 ppl_Generator_OK PPL_PROTO((ppl_const_Generator_t g));
00954
00956
00959
00964 int
00965 ppl_new_Generator_System PPL_PROTO((ppl_Generator_System_t* pgs));
00966
00967
00968
00969
00970
00971
00972 int
00973 ppl_new_Generator_System_zero_dim_univ
00974 PPL_PROTO((ppl_Generator_System_t* pgs));
00975
00981 int
00982 ppl_new_Generator_System_from_Generator PPL_PROTO((ppl_Generator_System_t* pgs,
00983 ppl_const_Generator_t g));
00984
00989 int
00990 ppl_new_Generator_System_from_Generator_System
00991 PPL_PROTO((ppl_Generator_System_t* pgs, ppl_const_Generator_System_t gs));
00992
00997 int
00998 ppl_delete_Generator_System PPL_PROTO((ppl_const_Generator_System_t gs));
00999
01003 int
01004 ppl_assign_Generator_System_from_Generator_System
01005 PPL_PROTO((ppl_Generator_System_t dst, ppl_const_Generator_System_t src));
01006
01010 int
01011 ppl_Generator_System_space_dimension
01012 PPL_PROTO((ppl_const_Generator_System_t gs, ppl_dimension_type* m));
01013
01018 int
01019 ppl_Generator_System_clear PPL_PROTO((ppl_Generator_System_t gs));
01020
01025 int
01026 ppl_Generator_System_insert_Generator PPL_PROTO((ppl_Generator_System_t gs,
01027 ppl_const_Generator_t g));
01028
01034 int
01035 ppl_Generator_System_OK PPL_PROTO((ppl_const_Generator_System_t c));
01036
01037
01042 int
01043 ppl_new_Generator_System_const_iterator
01044 PPL_PROTO((ppl_Generator_System_const_iterator_t* pgit));
01045
01050 int
01051 ppl_new_Generator_System_const_iterator_from_Generator_System_const_iterator
01052 PPL_PROTO((ppl_Generator_System_const_iterator_t* pgit,
01053 ppl_const_Generator_System_const_iterator_t git));
01054
01059 int
01060 ppl_delete_Generator_System_const_iterator
01061 PPL_PROTO((ppl_const_Generator_System_const_iterator_t git));
01062
01066 int
01067 ppl_assign_Generator_System_const_iterator_from_Generator_System_const_iterator
01068 PPL_PROTO((ppl_Generator_System_const_iterator_t dst,
01069 ppl_const_Generator_System_const_iterator_t src));
01070
01075 int
01076 ppl_Generator_System_begin
01077 PPL_PROTO((ppl_const_Generator_System_t gs,
01078 ppl_Generator_System_const_iterator_t git));
01079
01084 int
01085 ppl_Generator_System_end
01086 PPL_PROTO((ppl_const_Generator_System_t gs,
01087 ppl_Generator_System_const_iterator_t git));
01088
01093 int
01094 ppl_Generator_System_const_iterator_dereference
01095 PPL_PROTO((ppl_const_Generator_System_const_iterator_t git,
01096 ppl_const_Generator_t* pg));
01097
01101 int
01102 ppl_Generator_System_const_iterator_increment
01103 PPL_PROTO((ppl_Generator_System_const_iterator_t git));
01104
01109 int
01110 ppl_Generator_System_const_iterator_equal_test
01111 PPL_PROTO((ppl_const_Generator_System_const_iterator_t x,
01112 ppl_const_Generator_System_const_iterator_t y));
01113
01115
01119 extern unsigned int PPL_COMPLEXITY_CLASS_POLYNOMIAL;
01120
01125 extern unsigned int PPL_COMPLEXITY_CLASS_SIMPLEX;
01126
01130 extern unsigned int PPL_COMPLEXITY_CLASS_ANY;
01131
01135 extern int PPL_LP_PROBLEM_STATUS_UNFEASIBLE;
01136
01140 extern int PPL_LP_PROBLEM_STATUS_UNBOUNDED;
01141
01145 extern int PPL_LP_PROBLEM_STATUS_OPTIMIZED;
01146
01150 extern int PPL_LP_PROBLEM_MAXIMIZATION;
01151
01155 extern int PPL_LP_PROBLEM_MINIMIZATION;
01156
01161 extern unsigned int PPL_POLY_CON_RELATION_IS_DISJOINT;
01162
01167 extern unsigned int PPL_POLY_CON_RELATION_STRICTLY_INTERSECTS;
01168
01173 extern unsigned int PPL_POLY_CON_RELATION_IS_INCLUDED;
01174
01179 extern unsigned int PPL_POLY_CON_RELATION_SATURATES;
01180
01185 extern unsigned int PPL_POLY_GEN_RELATION_SUBSUMES;
01186
01189
01194 int
01195 ppl_new_C_Polyhedron_from_dimension PPL_PROTO((ppl_Polyhedron_t* pph,
01196 ppl_dimension_type d));
01197
01202 int
01203 ppl_new_NNC_Polyhedron_from_dimension PPL_PROTO((ppl_Polyhedron_t* pph,
01204 ppl_dimension_type d));
01205
01210 int
01211 ppl_new_C_Polyhedron_empty_from_dimension PPL_PROTO((ppl_Polyhedron_t* pph,
01212 ppl_dimension_type d));
01213
01218 int
01219 ppl_new_NNC_Polyhedron_empty_from_dimension PPL_PROTO((ppl_Polyhedron_t* pph,
01220 ppl_dimension_type d));
01221
01226 int
01227 ppl_new_C_Polyhedron_from_C_Polyhedron PPL_PROTO((ppl_Polyhedron_t* pph,
01228 ppl_const_Polyhedron_t ph));
01229
01234 int
01235 ppl_new_C_Polyhedron_from_NNC_Polyhedron
01236 PPL_PROTO((ppl_Polyhedron_t* pph, ppl_const_Polyhedron_t ph));
01237
01242 int
01243 ppl_new_NNC_Polyhedron_from_C_Polyhedron
01244 PPL_PROTO((ppl_Polyhedron_t* pph, ppl_const_Polyhedron_t ph));
01245
01250 int
01251 ppl_new_NNC_Polyhedron_from_NNC_Polyhedron
01252 PPL_PROTO((ppl_Polyhedron_t* pph, ppl_const_Polyhedron_t ph));
01253
01261 int
01262 ppl_new_C_Polyhedron_from_Constraint_System
01263 PPL_PROTO((ppl_Polyhedron_t* pph, ppl_const_Constraint_System_t cs));
01264
01277 int
01278 ppl_new_C_Polyhedron_recycle_Constraint_System
01279 PPL_PROTO((ppl_Polyhedron_t* pph, ppl_Constraint_System_t cs));
01280
01288 int
01289 ppl_new_NNC_Polyhedron_from_Constraint_System
01290 PPL_PROTO((ppl_Polyhedron_t* pph, ppl_const_Constraint_System_t cs));
01291
01304 int
01305 ppl_new_NNC_Polyhedron_recycle_Constraint_System
01306 PPL_PROTO((ppl_Polyhedron_t* pph, ppl_Constraint_System_t cs));
01307
01315 int
01316 ppl_new_C_Polyhedron_from_Generator_System
01317 PPL_PROTO((ppl_Polyhedron_t* pph, ppl_const_Generator_System_t gs));
01318
01331 int
01332 ppl_new_C_Polyhedron_recycle_Generator_System
01333 PPL_PROTO((ppl_Polyhedron_t* pph, ppl_Generator_System_t gs));
01334
01342 int
01343 ppl_new_NNC_Polyhedron_from_Generator_System
01344 PPL_PROTO((ppl_Polyhedron_t* pph, ppl_const_Generator_System_t gs));
01345
01358 int
01359 ppl_new_NNC_Polyhedron_recycle_Generator_System
01360 PPL_PROTO((ppl_Polyhedron_t* pph, ppl_Generator_System_t gs));
01361
01412 int
01413 ppl_new_C_Polyhedron_from_bounding_box
01414 PPL_PROTO((ppl_Polyhedron_t* pph,
01415 ppl_dimension_type (*space_dimension)(void),
01416 int (*is_empty)(void),
01417 int (*get_lower_bound)(ppl_dimension_type k, int closed,
01418 ppl_Coefficient_t n,
01419 ppl_Coefficient_t d),
01420 int (*get_upper_bound)(ppl_dimension_type k, int closed,
01421 ppl_Coefficient_t n,
01422 ppl_Coefficient_t d)));
01423
01471 int
01472 ppl_new_NNC_Polyhedron_from_bounding_box
01473 PPL_PROTO((ppl_Polyhedron_t* pph,
01474 ppl_dimension_type (*space_dimension)(void),
01475 int (*is_empty)(void),
01476 int (*get_lower_bound)(ppl_dimension_type k, int closed,
01477 ppl_Coefficient_t n,
01478 ppl_Coefficient_t d),
01479 int (*get_upper_bound)(ppl_dimension_type k, int closed,
01480 ppl_Coefficient_t n,
01481 ppl_Coefficient_t d)));
01482
01486 int
01487 ppl_assign_C_Polyhedron_from_C_Polyhedron
01488 PPL_PROTO((ppl_Polyhedron_t dst, ppl_const_Polyhedron_t src));
01489
01494 int
01495 ppl_assign_NNC_Polyhedron_from_NNC_Polyhedron
01496 PPL_PROTO((ppl_Polyhedron_t dst, ppl_const_Polyhedron_t src));
01497
01502 int
01503 ppl_delete_Polyhedron PPL_PROTO((ppl_const_Polyhedron_t ph));
01504
01508 int
01509 ppl_Polyhedron_space_dimension PPL_PROTO((ppl_const_Polyhedron_t ph,
01510 ppl_dimension_type* m));
01511
01516 int
01517 ppl_Polyhedron_affine_dimension PPL_PROTO((ppl_const_Polyhedron_t ph));
01518
01523 int
01524 ppl_Polyhedron_constraints PPL_PROTO((ppl_const_Polyhedron_t ph,
01525 ppl_const_Constraint_System_t* pcs));
01526
01531 int
01532 ppl_Polyhedron_minimized_constraints
01533 PPL_PROTO((ppl_const_Polyhedron_t ph, ppl_const_Constraint_System_t* pcs));
01534
01539 int
01540 ppl_Polyhedron_generators PPL_PROTO((ppl_const_Polyhedron_t ph,
01541 ppl_const_Generator_System_t* pgs));
01542
01547 int
01548 ppl_Polyhedron_minimized_generators
01549 PPL_PROTO((ppl_const_Polyhedron_t ph, ppl_const_Generator_System_t* pgs));
01550
01562 int
01563 ppl_Polyhedron_relation_with_Constraint PPL_PROTO((ppl_const_Polyhedron_t ph,
01564 ppl_const_Constraint_t c));
01565
01574 int
01575 ppl_Polyhedron_relation_with_Generator PPL_PROTO((ppl_const_Polyhedron_t ph,
01576 ppl_const_Generator_t g));
01577
01614 int
01615 ppl_Polyhedron_shrink_bounding_box
01616 PPL_PROTO((ppl_const_Polyhedron_t ph,
01617 unsigned int complexity,
01618 void (*set_empty)(void),
01619 void (*raise_lower_bound)(ppl_dimension_type k, int closed,
01620 ppl_const_Coefficient_t n,
01621 ppl_const_Coefficient_t d),
01622 void (*lower_upper_bound)(ppl_dimension_type k, int closed,
01623 ppl_const_Coefficient_t n,
01624 ppl_const_Coefficient_t d)));
01625
01630 int
01631 ppl_Polyhedron_is_empty PPL_PROTO((ppl_const_Polyhedron_t ph));
01632
01637 int
01638 ppl_Polyhedron_is_universe PPL_PROTO((ppl_const_Polyhedron_t ph));
01639
01644 int
01645 ppl_Polyhedron_is_bounded PPL_PROTO((ppl_const_Polyhedron_t ph));
01646
01651 int
01652 ppl_Polyhedron_bounds_from_above PPL_PROTO((ppl_const_Polyhedron_t ph,
01653 ppl_const_Linear_Expression_t le));
01654
01659 int
01660 ppl_Polyhedron_bounds_from_below PPL_PROTO((ppl_const_Polyhedron_t ph,
01661 ppl_const_Linear_Expression_t le));
01662
01692 int
01693 ppl_Polyhedron_maximize PPL_PROTO((ppl_const_Polyhedron_t ph,
01694 ppl_const_Linear_Expression_t le,
01695 ppl_Coefficient_t sup_n,
01696 ppl_Coefficient_t sup_d,
01697 int* pmaximum,
01698 ppl_Generator_t point));
01699
01729 int
01730 ppl_Polyhedron_minimize PPL_PROTO((ppl_const_Polyhedron_t ph,
01731 ppl_const_Linear_Expression_t le,
01732 ppl_Coefficient_t inf_n,
01733 ppl_Coefficient_t inf_d,
01734 int* pminimum,
01735 ppl_Generator_t point));
01736
01741 int
01742 ppl_Polyhedron_is_topologically_closed PPL_PROTO((ppl_const_Polyhedron_t ph));
01743
01748 int
01749 ppl_Polyhedron_contains_Polyhedron PPL_PROTO((ppl_const_Polyhedron_t x,
01750 ppl_const_Polyhedron_t y));
01751
01756 int
01757 ppl_Polyhedron_strictly_contains_Polyhedron
01758 PPL_PROTO((ppl_const_Polyhedron_t x, ppl_const_Polyhedron_t y));
01759
01764 int
01765 ppl_Polyhedron_is_disjoint_from_Polyhedron
01766 PPL_PROTO((ppl_const_Polyhedron_t x, ppl_const_Polyhedron_t y));
01767
01775 int
01776 ppl_Polyhedron_equals_Polyhedron PPL_PROTO((ppl_const_Polyhedron_t x,
01777 ppl_const_Polyhedron_t y));
01778
01784 int
01785 ppl_Polyhedron_OK PPL_PROTO((ppl_const_Polyhedron_t ph));
01786
01791 int
01792 ppl_Polyhedron_add_constraint PPL_PROTO((ppl_Polyhedron_t ph,
01793 ppl_const_Constraint_t c));
01794
01801 int
01802 ppl_Polyhedron_add_constraint_and_minimize
01803 PPL_PROTO((ppl_Polyhedron_t ph, ppl_const_Constraint_t c));
01804
01809 int
01810 ppl_Polyhedron_add_generator PPL_PROTO((ppl_Polyhedron_t ph,
01811 ppl_const_Generator_t g));
01812
01819 int
01820 ppl_Polyhedron_add_generator_and_minimize PPL_PROTO((ppl_Polyhedron_t ph,
01821 ppl_const_Generator_t g));
01822
01827 int
01828 ppl_Polyhedron_add_constraints PPL_PROTO((ppl_Polyhedron_t ph,
01829 ppl_const_Constraint_System_t cs));
01830
01837 int
01838 ppl_Polyhedron_add_constraints_and_minimize
01839 PPL_PROTO((ppl_Polyhedron_t ph, ppl_const_Constraint_System_t cs));
01840
01845 int
01846 ppl_Polyhedron_add_generators PPL_PROTO((ppl_Polyhedron_t ph,
01847 ppl_const_Generator_System_t gs));
01848
01855 int
01856 ppl_Polyhedron_add_generators_and_minimize
01857 PPL_PROTO((ppl_Polyhedron_t ph, ppl_const_Generator_System_t gs));
01858
01867 int
01868 ppl_Polyhedron_add_recycled_constraints
01869 PPL_PROTO((ppl_Polyhedron_t ph, ppl_Constraint_System_t cs));
01870
01881 int
01882 ppl_Polyhedron_add_recycled_constraints_and_minimize
01883 PPL_PROTO((ppl_Polyhedron_t ph, ppl_Constraint_System_t cs));
01884
01893 int
01894 ppl_Polyhedron_add_recycled_generators PPL_PROTO((ppl_Polyhedron_t ph,
01895 ppl_Generator_System_t gs));
01896
01907 int
01908 ppl_Polyhedron_add_recycled_generators_and_minimize
01909 PPL_PROTO((ppl_Polyhedron_t ph, ppl_Generator_System_t gs));
01910
01914 int
01915 ppl_Polyhedron_intersection_assign PPL_PROTO((ppl_Polyhedron_t x,
01916 ppl_const_Polyhedron_t y));
01917
01924 int
01925 ppl_Polyhedron_intersection_assign_and_minimize
01926 PPL_PROTO((ppl_Polyhedron_t x, ppl_const_Polyhedron_t y));
01927
01931 int
01932 ppl_Polyhedron_poly_hull_assign PPL_PROTO((ppl_Polyhedron_t x,
01933 ppl_const_Polyhedron_t y));
01934
01940 int
01941 ppl_Polyhedron_poly_hull_assign_and_minimize
01942 PPL_PROTO((ppl_Polyhedron_t x, ppl_const_Polyhedron_t y));
01943
01948 int
01949 ppl_Polyhedron_poly_difference_assign PPL_PROTO((ppl_Polyhedron_t x,
01950 ppl_const_Polyhedron_t y));
01951
01968 int
01969 ppl_Polyhedron_affine_image PPL_PROTO((ppl_Polyhedron_t ph,
01970 ppl_dimension_type var,
01971 ppl_const_Linear_Expression_t le,
01972 ppl_const_Coefficient_t d));
01973
01990 int
01991 ppl_Polyhedron_affine_preimage PPL_PROTO((ppl_Polyhedron_t ph,
01992 ppl_dimension_type var,
01993 ppl_const_Linear_Expression_t le,
01994 ppl_const_Coefficient_t d));
01995
02018 int
02019 ppl_Polyhedron_bounded_affine_image
02020 PPL_PROTO((ppl_Polyhedron_t ph,
02021 ppl_dimension_type var,
02022 ppl_const_Linear_Expression_t lb,
02023 ppl_const_Linear_Expression_t ub,
02024 ppl_const_Coefficient_t d));
02025
02048 int
02049 ppl_Polyhedron_bounded_affine_preimage
02050 PPL_PROTO((ppl_Polyhedron_t ph,
02051 ppl_dimension_type var,
02052 ppl_const_Linear_Expression_t lb,
02053 ppl_const_Linear_Expression_t ub,
02054 ppl_const_Coefficient_t d));
02055
02078 int
02079 ppl_Polyhedron_generalized_affine_image
02080 PPL_PROTO((ppl_Polyhedron_t ph,
02081 ppl_dimension_type var,
02082 enum ppl_enum_Constraint_Type relsym,
02083 ppl_const_Linear_Expression_t le,
02084 ppl_const_Coefficient_t d));
02085
02108 int
02109 ppl_Polyhedron_generalized_affine_preimage
02110 PPL_PROTO((ppl_Polyhedron_t ph,
02111 ppl_dimension_type var,
02112 enum ppl_enum_Constraint_Type relsym,
02113 ppl_const_Linear_Expression_t le,
02114 ppl_const_Coefficient_t d));
02115
02134 int
02135 ppl_Polyhedron_generalized_affine_image_lhs_rhs
02136 PPL_PROTO((ppl_Polyhedron_t ph,
02137 ppl_const_Linear_Expression_t lhs,
02138 enum ppl_enum_Constraint_Type relsym,
02139 ppl_const_Linear_Expression_t rhs));
02140
02159 int
02160 ppl_Polyhedron_generalized_affine_preimage_lhs_rhs
02161 PPL_PROTO((ppl_Polyhedron_t ph,
02162 ppl_const_Linear_Expression_t lhs,
02163 enum ppl_enum_Constraint_Type relsym,
02164 ppl_const_Linear_Expression_t rhs));
02165
02170 int
02171 ppl_Polyhedron_time_elapse_assign PPL_PROTO((ppl_Polyhedron_t x,
02172 ppl_const_Polyhedron_t y));
02173
02181 int
02182 ppl_Polyhedron_BHRZ03_widening_assign_with_tokens
02183 PPL_PROTO((ppl_Polyhedron_t x,
02184 ppl_const_Polyhedron_t y,
02185 unsigned* tp));
02186
02192 int
02193 ppl_Polyhedron_BHRZ03_widening_assign PPL_PROTO((ppl_Polyhedron_t x,
02194 ppl_const_Polyhedron_t y));
02195
02204 int
02205 ppl_Polyhedron_limited_BHRZ03_extrapolation_assign_with_tokens
02206 PPL_PROTO((ppl_Polyhedron_t x,
02207 ppl_const_Polyhedron_t y,
02208 ppl_const_Constraint_System_t cs,
02209 unsigned* tp));
02210
02217 int
02218 ppl_Polyhedron_limited_BHRZ03_extrapolation_assign
02219 PPL_PROTO((ppl_Polyhedron_t x,
02220 ppl_const_Polyhedron_t y,
02221 ppl_const_Constraint_System_t cs));
02222
02234 int
02235 ppl_Polyhedron_bounded_BHRZ03_extrapolation_assign_with_tokens
02236 PPL_PROTO((ppl_Polyhedron_t x,
02237 ppl_const_Polyhedron_t y,
02238 ppl_const_Constraint_System_t cs,
02239 unsigned* tp));
02240
02249 int
02250 ppl_Polyhedron_bounded_BHRZ03_extrapolation_assign
02251 PPL_PROTO((ppl_Polyhedron_t x,
02252 ppl_const_Polyhedron_t y,
02253 ppl_const_Constraint_System_t cs));
02254
02262 int
02263 ppl_Polyhedron_H79_widening_assign_with_tokens
02264 PPL_PROTO((ppl_Polyhedron_t x,
02265 ppl_const_Polyhedron_t y,
02266 unsigned* tp));
02267
02273 int
02274 ppl_Polyhedron_H79_widening_assign PPL_PROTO((ppl_Polyhedron_t x,
02275 ppl_const_Polyhedron_t y));
02276
02285 int
02286 ppl_Polyhedron_limited_H79_extrapolation_assign_with_tokens
02287 PPL_PROTO((ppl_Polyhedron_t x,
02288 ppl_const_Polyhedron_t y,
02289 ppl_const_Constraint_System_t cs,
02290 unsigned* tp));
02291
02298 int
02299 ppl_Polyhedron_limited_H79_extrapolation_assign
02300 PPL_PROTO((ppl_Polyhedron_t x,
02301 ppl_const_Polyhedron_t y,
02302 ppl_const_Constraint_System_t cs));
02303
02315 int
02316 ppl_Polyhedron_bounded_H79_extrapolation_assign_with_tokens
02317 PPL_PROTO((ppl_Polyhedron_t x,
02318 ppl_const_Polyhedron_t y,
02319 ppl_const_Constraint_System_t cs,
02320 unsigned* tp));
02321
02331 int
02332 ppl_Polyhedron_bounded_H79_extrapolation_assign
02333 PPL_PROTO((ppl_Polyhedron_t x,
02334 ppl_const_Polyhedron_t y,
02335 ppl_const_Constraint_System_t cs));
02336
02340 int
02341 ppl_Polyhedron_topological_closure_assign PPL_PROTO((ppl_Polyhedron_t ph));
02342
02347 int
02348 ppl_Polyhedron_add_space_dimensions_and_embed
02349 PPL_PROTO((ppl_Polyhedron_t ph, ppl_dimension_type d));
02350
02354 int
02355 ppl_Polyhedron_add_space_dimensions_and_project
02356 PPL_PROTO((ppl_Polyhedron_t ph, ppl_dimension_type d));
02357
02363 int
02364 ppl_Polyhedron_concatenate_assign PPL_PROTO((ppl_Polyhedron_t x,
02365 ppl_const_Polyhedron_t y));
02366
02372 int
02373 ppl_Polyhedron_remove_space_dimensions PPL_PROTO((ppl_Polyhedron_t ph,
02374 ppl_dimension_type ds[],
02375 size_t n));
02376
02381 int
02382 ppl_Polyhedron_remove_higher_space_dimensions
02383 PPL_PROTO((ppl_Polyhedron_t ph, ppl_dimension_type d));
02384
02402 int
02403 ppl_Polyhedron_map_space_dimensions PPL_PROTO((ppl_Polyhedron_t ph,
02404 ppl_dimension_type maps[],
02405 size_t n));
02406
02411 int
02412 ppl_Polyhedron_expand_space_dimension PPL_PROTO((ppl_Polyhedron_t ph,
02413 ppl_dimension_type d,
02414 ppl_dimension_type m));
02415
02422 int
02423 ppl_Polyhedron_fold_space_dimensions PPL_PROTO((ppl_Polyhedron_t ph,
02424 ppl_dimension_type ds[],
02425 size_t n,
02426 ppl_dimension_type d));
02427
02429
02430
02433
02437 int
02438 ppl_new_LP_Problem_trivial PPL_PROTO((ppl_LP_Problem_t* plp));
02439
02444 int
02445 ppl_new_LP_Problem PPL_PROTO((ppl_LP_Problem_t* plp,
02446 ppl_const_Constraint_System_t cs,
02447 ppl_const_Linear_Expression_t le,
02448 int m));
02449
02454 int
02455 ppl_new_LP_Problem_from_LP_Problem
02456 PPL_PROTO((ppl_LP_Problem_t* plp, ppl_const_LP_Problem_t lp));
02457
02462 int
02463 ppl_delete_LP_Problem PPL_PROTO((ppl_const_LP_Problem_t lp));
02464
02468 int
02469 ppl_assign_LP_Problem_from_LP_Problem
02470 PPL_PROTO((ppl_LP_Problem_t dst, ppl_const_LP_Problem_t src));
02471
02475 int
02476 ppl_LP_Problem_space_dimension
02477 PPL_PROTO((ppl_const_LP_Problem_t lp, ppl_dimension_type* m));
02478
02483 int
02484 ppl_LP_Problem_constraints PPL_PROTO((ppl_const_LP_Problem_t lp,
02485 ppl_const_Constraint_System_t* pcs));
02486
02491 int
02492 ppl_LP_Problem_objective_function
02493 PPL_PROTO((ppl_const_LP_Problem_t lp, ppl_const_Linear_Expression_t* ple));
02494
02498 int
02499 ppl_LP_Problem_optimization_mode PPL_PROTO((ppl_const_LP_Problem_t lp));
02500
02504 int
02505 ppl_LP_Problem_clear PPL_PROTO((ppl_LP_Problem_t lp));
02506
02511 int
02512 ppl_LP_Problem_add_constraint PPL_PROTO((ppl_LP_Problem_t lp,
02513 ppl_const_Constraint_t c));
02514
02519 int
02520 ppl_LP_Problem_add_constraints PPL_PROTO((ppl_LP_Problem_t lp,
02521 ppl_const_Constraint_System_t cs));
02522
02526 int
02527 ppl_LP_Problem_set_objective_function
02528 PPL_PROTO((ppl_LP_Problem_t lp, ppl_const_Linear_Expression_t le));
02529
02533 int
02534 ppl_LP_Problem_set_optimization_mode PPL_PROTO((ppl_LP_Problem_t lp,
02535 int mode));
02536
02540 int
02541 ppl_LP_Problem_is_satisfiable PPL_PROTO((ppl_const_LP_Problem_t lp));
02542
02555 int
02556 ppl_LP_Problem_solve PPL_PROTO((ppl_const_LP_Problem_t lp));
02557
02573 int
02574 ppl_LP_Problem_evaluate_objective_function
02575 PPL_PROTO((ppl_const_LP_Problem_t lp, ppl_const_Generator_t g,
02576 ppl_Coefficient_t num, ppl_Coefficient_t den));
02577
02582 int
02583 ppl_LP_Problem_feasible_point PPL_PROTO((ppl_const_LP_Problem_t lp,
02584 ppl_const_Generator_t* pg));
02585
02590 int
02591 ppl_LP_Problem_optimizing_point PPL_PROTO((ppl_const_LP_Problem_t lp,
02592 ppl_const_Generator_t* pg));
02593
02606 int
02607 ppl_LP_Problem_optimal_value
02608 PPL_PROTO((ppl_const_LP_Problem_t lp,
02609 ppl_Coefficient_t num, ppl_Coefficient_t den));
02610
02616 int
02617 ppl_LP_Problem_OK PPL_PROTO((ppl_const_LP_Problem_t lp));
02618
02620
02621
02624
02626 int
02627 ppl_io_print_variable PPL_PROTO((ppl_dimension_type var));
02628
02630 int
02631 ppl_io_fprint_variable PPL_PROTO((FILE* stream, ppl_dimension_type var));
02632
02633 #undef PPL_DECLARE_PRINT_FUNCTIONS
02634
02635 #define PPL_DECLARE_PRINT_FUNCTIONS(Type) \
02636 \
02637 int \
02638 ppl_io_print_ ## Type PPL_PROTO((ppl_const_ ## Type ## _t x)); \
02639 \
02640 \
02641 int \
02642 ppl_io_fprint_ ## Type PPL_PROTO((FILE* stream, ppl_const_ ## Type ## _t x));
02643
02644 PPL_DECLARE_PRINT_FUNCTIONS(Coefficient)
02645
02646 PPL_DECLARE_PRINT_FUNCTIONS(Linear_Expression)
02647
02648 PPL_DECLARE_PRINT_FUNCTIONS(Constraint)
02649
02650 PPL_DECLARE_PRINT_FUNCTIONS(Constraint_System)
02651
02652 PPL_DECLARE_PRINT_FUNCTIONS(Generator)
02653
02654 PPL_DECLARE_PRINT_FUNCTIONS(Generator_System)
02655
02656 PPL_DECLARE_PRINT_FUNCTIONS(Polyhedron)
02657
02658 #undef PPL_DECLARE_PRINT_FUNCTIONS
02659
02670 typedef const char*
02671 ppl_io_variable_output_function_type(ppl_dimension_type var);
02672
02676 int
02677 ppl_io_set_variable_output_function(ppl_io_variable_output_function_type* p);
02678
02682 int
02683 ppl_io_get_variable_output_function(ppl_io_variable_output_function_type** pp);
02684
02686
02687 #ifdef __cplusplus
02688 }
02689 #endif
02690
02691 #undef PPL_PROTO
02692
02694
02695 #endif