155 #if defined(__STDC__) \
156 || defined(__cplusplus) \
158 || (defined (__mips) && defined (_SYSTYPE_SVR4)) \
160 # define PPL_PROTO(protos) protos
162 # define PPL_PROTO(protos) ()
357 const char* description)));
540 unsigned indent_depth,
541 unsigned preferred_first_line_length,
542 unsigned preferred_line_length);
546 #undef PPL_TYPE_DECLARATION
548 #define PPL_TYPE_DECLARATION(Type) \
550 typedef struct ppl_##Type##_tag* ppl_##Type##_t; \
552 typedef struct ppl_##Type##_tag const* ppl_const_##Type##_t;
759 #undef PPL_DECLARE_PRINT_FUNCTIONS
760 #undef PPL_DECLARE_ASCII_DUMP_LOAD_FUNCTIONS
761 #undef PPL_DECLARE_IO_FUNCTIONS
762 #undef PPL_DECLARE_AND_DOCUMENT_PRINT_FUNCTIONS
763 #undef PPL_DECLARE_AND_DOCUMENT_ASCII_DUMP_LOAD_FUNCTIONS
764 #undef PPL_DECLARE_AND_DOCUMENT_IO_FUNCTIONS
766 #define PPL_DECLARE_PRINT_FUNCTIONS(Type) \
769 ppl_io_print_##Type PPL_PROTO((ppl_const_##Type##_t x)); \
772 ppl_io_fprint_##Type PPL_PROTO((FILE* stream, ppl_const_##Type##_t x)); \
775 ppl_io_asprint_##Type PPL_PROTO((char** strp, ppl_const_##Type##_t x));
777 #define PPL_DECLARE_ASCII_DUMP_LOAD_FUNCTIONS(Type) \
780 ppl_##Type##_ascii_dump \
781 PPL_PROTO((ppl_const_##Type##_t x, FILE* stream)); \
784 ppl_##Type##_ascii_load \
785 PPL_PROTO((ppl_##Type##_t x, FILE* stream));
787 #define PPL_DECLARE_IO_FUNCTIONS(Type) \
788 PPL_DECLARE_PRINT_FUNCTIONS(Type) \
789 PPL_DECLARE_ASCII_DUMP_LOAD_FUNCTIONS(Type)
791 #define PPL_DECLARE_AND_DOCUMENT_PRINT_FUNCTIONS(Type) \
794 ppl_io_print_##Type PPL_PROTO((ppl_const_##Type##_t x)); \
797 ppl_io_fprint_##Type PPL_PROTO((FILE* stream, ppl_const_##Type##_t x)); \
800 ppl_io_asprint_##Type PPL_PROTO((char** strp, ppl_const_##Type##_t x));
803 #define PPL_DECLARE_AND_DOCUMENT_ASCII_DUMP_LOAD_FUNCTIONS(Type) \
806 ppl_##Type##_ascii_dump \
807 PPL_PROTO((ppl_const_##Type##_t x, FILE* stream)); \
810 ppl_##Type##_ascii_load \
811 PPL_PROTO((ppl_##Type##_t x, FILE* stream));
813 #define PPL_DECLARE_AND_DOCUMENT_IO_FUNCTIONS(Type) \
816 PPL_DECLARE_AND_DOCUMENT_PRINT_FUNCTIONS(Type) \
817 PPL_DECLARE_AND_DOCUMENT_ASCII_DUMP_LOAD_FUNCTIONS(Type) \
845 ppl_const_Coefficient_t c));
858 PPL_PROTO((ppl_Coefficient_t dst, ppl_const_Coefficient_t src));
934 PPL_PROTO((ppl_Linear_Expression_t* ple, ppl_dimension_type d));
942 PPL_PROTO((ppl_Linear_Expression_t* ple, ppl_const_Linear_Expression_t le));
950 PPL_PROTO((ppl_Linear_Expression_t* ple, ppl_const_Constraint_t c));
958 PPL_PROTO((ppl_Linear_Expression_t* ple, ppl_const_Generator_t g));
966 PPL_PROTO((ppl_Linear_Expression_t* ple, ppl_const_Congruence_t c));
974 PPL_PROTO((ppl_Linear_Expression_t* ple, ppl_const_Grid_Generator_t g));
981 PPL_PROTO((ppl_Linear_Expression_t dst, ppl_const_Linear_Expression_t src));
1000 PPL_PROTO((ppl_const_Linear_Expression_t le, ppl_dimension_type* m));
1008 ppl_dimension_type var,
1009 ppl_Coefficient_t n));
1016 PPL_PROTO((ppl_const_Linear_Expression_t le, ppl_Coefficient_t n));
1038 PPL_PROTO((ppl_const_Linear_Expression_t le));
1052 PPL_PROTO((ppl_Linear_Expression_t le,
1053 ppl_dimension_type var,
1054 ppl_const_Coefficient_t n));
1061 PPL_PROTO((ppl_Linear_Expression_t le, ppl_const_Coefficient_t n));
1068 PPL_PROTO((ppl_Linear_Expression_t dst, ppl_const_Linear_Expression_t src));
1075 PPL_PROTO((ppl_Linear_Expression_t dst, ppl_const_Linear_Expression_t src));
1082 PPL_PROTO((ppl_Linear_Expression_t le, ppl_const_Coefficient_t n));
1114 ppl_const_Linear_Expression_t le,
1138 ppl_const_Constraint_t c));
1145 ppl_const_Constraint_t src));
1164 ppl_dimension_type* m));
1178 ppl_dimension_type var,
1179 ppl_Coefficient_t n));
1186 ppl_Coefficient_t n));
1217 PPL_PROTO((ppl_Constraint_System_t* pcs));
1226 PPL_PROTO((ppl_Constraint_System_t* pcs, ppl_const_Constraint_t c));
1234 PPL_PROTO((ppl_Constraint_System_t* pcs, ppl_const_Constraint_System_t cs));
1241 PPL_PROTO((ppl_Constraint_System_t dst, ppl_const_Constraint_System_t src));
1260 PPL_PROTO((ppl_const_Constraint_System_t cs, ppl_dimension_type* m));
1268 PPL_PROTO((ppl_const_Constraint_System_t cs));
1276 PPL_PROTO((ppl_const_Constraint_System_t cs));
1284 PPL_PROTO((ppl_const_Constraint_System_t cs,
1285 ppl_Constraint_System_const_iterator_t cit));
1293 PPL_PROTO((ppl_const_Constraint_System_t cs,
1294 ppl_Constraint_System_const_iterator_t cit));
1322 ppl_const_Constraint_t c));
1338 PPL_PROTO((ppl_Constraint_System_const_iterator_t* pcit));
1346 PPL_PROTO((ppl_Constraint_System_const_iterator_t* pcit,
1347 ppl_const_Constraint_System_const_iterator_t cit));
1354 PPL_PROTO((ppl_Constraint_System_const_iterator_t dst,
1355 ppl_const_Constraint_System_const_iterator_t src));
1363 PPL_PROTO((ppl_const_Constraint_System_const_iterator_t cit));
1376 PPL_PROTO((ppl_const_Constraint_System_const_iterator_t cit,
1377 ppl_const_Constraint_t* pc));
1384 PPL_PROTO((ppl_Constraint_System_const_iterator_t cit));
1392 PPL_PROTO((ppl_const_Constraint_System_const_iterator_t x,
1393 ppl_const_Constraint_System_const_iterator_t y));
1425 ppl_const_Linear_Expression_t le,
1427 ppl_const_Coefficient_t d));
1451 ppl_const_Generator_t g));
1458 ppl_const_Generator_t src));
1477 ppl_dimension_type* m));
1490 ppl_dimension_type var,
1491 ppl_Coefficient_t n));
1498 ppl_Coefficient_t n));
1530 PPL_PROTO((ppl_Generator_System_t* pgs));
1539 ppl_const_Generator_t g));
1547 PPL_PROTO((ppl_Generator_System_t* pgs, ppl_const_Generator_System_t gs));
1554 PPL_PROTO((ppl_Generator_System_t dst, ppl_const_Generator_System_t src));
1573 PPL_PROTO((ppl_const_Generator_System_t gs, ppl_dimension_type* m));
1581 PPL_PROTO((ppl_const_Generator_System_t gs));
1589 PPL_PROTO((ppl_const_Generator_System_t gs,
1590 ppl_Generator_System_const_iterator_t git));
1598 PPL_PROTO((ppl_const_Generator_System_t gs,
1599 ppl_Generator_System_const_iterator_t git));
1627 ppl_const_Generator_t g));
1643 PPL_PROTO((ppl_Generator_System_const_iterator_t* pgit));
1651 PPL_PROTO((ppl_Generator_System_const_iterator_t* pgit,
1652 ppl_const_Generator_System_const_iterator_t git));
1659 PPL_PROTO((ppl_Generator_System_const_iterator_t dst,
1660 ppl_const_Generator_System_const_iterator_t src));
1668 PPL_PROTO((ppl_const_Generator_System_const_iterator_t git));
1681 PPL_PROTO((ppl_const_Generator_System_const_iterator_t git,
1682 ppl_const_Generator_t* pg));
1689 PPL_PROTO((ppl_Generator_System_const_iterator_t git));
1697 PPL_PROTO((ppl_const_Generator_System_const_iterator_t x,
1698 ppl_const_Generator_System_const_iterator_t y));
1713 ppl_const_Linear_Expression_t le,
1714 ppl_const_Coefficient_t m));
1737 ppl_const_Congruence_t c));
1744 ppl_const_Congruence_t src));
1763 ppl_dimension_type* m));
1771 ppl_dimension_type var,
1772 ppl_Coefficient_t n));
1779 ppl_Coefficient_t n));
1786 ppl_Coefficient_t m));
1817 PPL_PROTO((ppl_Congruence_System_t* pcs));
1826 PPL_PROTO((ppl_Congruence_System_t* pcs, ppl_const_Congruence_t c));
1834 PPL_PROTO((ppl_Congruence_System_t* pcs, ppl_const_Congruence_System_t cs));
1841 PPL_PROTO((ppl_Congruence_System_t dst, ppl_const_Congruence_System_t src));
1860 PPL_PROTO((ppl_const_Congruence_System_t cs, ppl_dimension_type* m));
1868 PPL_PROTO((ppl_const_Congruence_System_t cs));
1876 PPL_PROTO((ppl_const_Congruence_System_t cs,
1877 ppl_Congruence_System_const_iterator_t cit));
1885 PPL_PROTO((ppl_const_Congruence_System_t cs,
1886 ppl_Congruence_System_const_iterator_t cit));
1914 ppl_const_Congruence_t c));
1930 PPL_PROTO((ppl_Congruence_System_const_iterator_t* pcit));
1938 PPL_PROTO((ppl_Congruence_System_const_iterator_t* pcit,
1939 ppl_const_Congruence_System_const_iterator_t cit));
1946 PPL_PROTO((ppl_Congruence_System_const_iterator_t dst,
1947 ppl_const_Congruence_System_const_iterator_t src));
1955 PPL_PROTO((ppl_const_Congruence_System_const_iterator_t cit));
1968 PPL_PROTO((ppl_const_Congruence_System_const_iterator_t cit,
1969 ppl_const_Congruence_t* pc));
1976 PPL_PROTO((ppl_Congruence_System_const_iterator_t cit));
1984 PPL_PROTO((ppl_const_Congruence_System_const_iterator_t x,
1985 ppl_const_Congruence_System_const_iterator_t y));
2015 ppl_const_Linear_Expression_t le,
2017 ppl_const_Coefficient_t d));
2033 PPL_PROTO((ppl_Grid_Generator_t* pg, ppl_const_Grid_Generator_t g));
2041 ppl_const_Grid_Generator_t src));
2060 ppl_dimension_type* m));
2074 ppl_dimension_type var,
2075 ppl_Coefficient_t n));
2082 ppl_Coefficient_t n));
2114 PPL_PROTO((ppl_Grid_Generator_System_t* pgs));
2123 PPL_PROTO((ppl_Grid_Generator_System_t* pgs,
2124 ppl_const_Grid_Generator_t g));
2132 PPL_PROTO((ppl_Grid_Generator_System_t* pgs,
2133 ppl_const_Grid_Generator_System_t gs));
2140 PPL_PROTO((ppl_Grid_Generator_System_t dst,
2141 ppl_const_Grid_Generator_System_t src));
2149 PPL_PROTO((ppl_const_Grid_Generator_System_t gs));
2161 PPL_PROTO((ppl_const_Grid_Generator_System_t gs, ppl_dimension_type* m));
2169 PPL_PROTO((ppl_const_Grid_Generator_System_t gs));
2177 PPL_PROTO((ppl_const_Grid_Generator_System_t gs,
2178 ppl_Grid_Generator_System_const_iterator_t git));
2186 PPL_PROTO((ppl_const_Grid_Generator_System_t gs,
2187 ppl_Grid_Generator_System_const_iterator_t git));
2215 PPL_PROTO((ppl_Grid_Generator_System_t gs,
2216 ppl_const_Grid_Generator_t g));
2232 PPL_PROTO((ppl_Grid_Generator_System_const_iterator_t* pgit));
2240 PPL_PROTO((ppl_Grid_Generator_System_const_iterator_t* pgit,
2241 ppl_const_Grid_Generator_System_const_iterator_t git));
2248 PPL_PROTO((ppl_Grid_Generator_System_const_iterator_t dst,
2249 ppl_const_Grid_Generator_System_const_iterator_t src));
2257 PPL_PROTO((ppl_const_Grid_Generator_System_const_iterator_t git));
2270 PPL_PROTO((ppl_const_Grid_Generator_System_const_iterator_t git,
2271 ppl_const_Grid_Generator_t* pg));
2278 PPL_PROTO((ppl_Grid_Generator_System_const_iterator_t git));
2286 PPL_PROTO((ppl_const_Grid_Generator_System_const_iterator_t x,
2287 ppl_const_Grid_Generator_System_const_iterator_t y));
2512 ppl_dimension_type d));
2521 ppl_dimension_type d,
2522 ppl_const_Constraint_System_t cs,
2523 ppl_const_Linear_Expression_t le,
2532 PPL_PROTO((ppl_MIP_Problem_t* pmip, ppl_const_MIP_Problem_t mip));
2539 PPL_PROTO((ppl_MIP_Problem_t dst, ppl_const_MIP_Problem_t src));
2558 PPL_PROTO((ppl_const_MIP_Problem_t mip, ppl_dimension_type* m));
2565 PPL_PROTO((ppl_const_MIP_Problem_t mip, ppl_dimension_type* m));
2574 PPL_PROTO((ppl_const_MIP_Problem_t mip, ppl_dimension_type ds[]));
2582 ppl_dimension_type* m));
2590 ppl_dimension_type i,
2591 ppl_const_Constraint_t* pc));
2599 PPL_PROTO((ppl_const_MIP_Problem_t mip, ppl_const_Linear_Expression_t* ple));
2632 PPL_PROTO((ppl_MIP_Problem_t mip, ppl_dimension_type d));
2641 PPL_PROTO((ppl_MIP_Problem_t mip, ppl_dimension_type ds[],
size_t n));
2649 ppl_const_Constraint_t c));
2657 ppl_const_Constraint_System_t cs));
2664 PPL_PROTO((ppl_MIP_Problem_t mip, ppl_const_Linear_Expression_t le));
2716 PPL_PROTO((ppl_const_MIP_Problem_t mip, ppl_const_Generator_t g,
2717 ppl_Coefficient_t num, ppl_Coefficient_t den));
2725 ppl_const_Generator_t* pg));
2733 ppl_const_Generator_t* pg));
2750 ppl_Coefficient_t num, ppl_Coefficient_t den));
2762 PPL_PROTO((ppl_const_MIP_Problem_t mip,
int name));
2776 PPL_PROTO((ppl_const_MIP_Problem_t mip,
size_t* sz));
2783 PPL_PROTO((ppl_const_MIP_Problem_t mip,
size_t* sz));
2797 ppl_dimension_type d));
2805 PPL_PROTO((ppl_PIP_Problem_t* ppip, ppl_const_PIP_Problem_t pip));
2812 PPL_PROTO((ppl_PIP_Problem_t dst, ppl_const_PIP_Problem_t src));
2823 ppl_dimension_type d,
2824 ppl_Constraint_System_const_iterator_t first,
2825 ppl_Constraint_System_const_iterator_t last,
2827 ppl_dimension_type ds[]));
2850 PPL_PROTO((ppl_const_PIP_Problem_t pip, ppl_dimension_type* m));
2857 PPL_PROTO((ppl_const_PIP_Problem_t pip, ppl_dimension_type* m));
2866 PPL_PROTO((ppl_const_PIP_Problem_t pip, ppl_dimension_type ds[]));
2873 PPL_PROTO((ppl_const_PIP_Problem_t pip, ppl_dimension_type* pd));
2881 ppl_dimension_type* m));
2889 ppl_dimension_type i,
2890 ppl_const_Constraint_t* pc));
2897 PPL_PROTO((ppl_const_PIP_Problem_t pip,
size_t* sz));
2904 PPL_PROTO((ppl_const_PIP_Problem_t pip,
size_t* sz));
2948 ppl_dimension_type pip_vars,
2949 ppl_dimension_type pip_params));
2958 PPL_PROTO((ppl_PIP_Problem_t pip, ppl_dimension_type ds[],
size_t n));
2965 PPL_PROTO((ppl_PIP_Problem_t pip, ppl_dimension_type d));
2973 ppl_const_Constraint_t c));
2981 ppl_const_Constraint_System_t cs));
3012 ppl_const_PIP_Tree_Node_t* pip_tree));
3020 ppl_const_PIP_Tree_Node_t* pip_tree));
3032 PPL_PROTO((ppl_const_PIP_Problem_t pip,
int name));
3050 PPL_PROTO((ppl_const_PIP_Tree_Node_t spip_tree,
3051 ppl_const_PIP_Solution_Node_t* dpip_tree));
3059 PPL_PROTO((ppl_const_PIP_Tree_Node_t spip_tree,
3060 ppl_const_PIP_Decision_Node_t* dpip_tree));
3068 PPL_PROTO((ppl_const_PIP_Tree_Node_t pip_tree,
3069 ppl_const_Constraint_System_t* pcs));
3085 PPL_PROTO((ppl_const_PIP_Tree_Node_t pip_tree,
3086 ppl_dimension_type* m));
3094 PPL_PROTO((ppl_const_PIP_Tree_Node_t pip_tree,
3095 ppl_Artificial_Parameter_Sequence_const_iterator_t pit));
3103 PPL_PROTO((ppl_const_PIP_Tree_Node_t pip_tree,
3104 ppl_Artificial_Parameter_Sequence_const_iterator_t pit));
3128 PPL_PROTO((ppl_const_PIP_Solution_Node_t pip_sol,
3129 ppl_dimension_type var,
3130 ppl_const_Linear_Expression_t* le));
3138 PPL_PROTO((ppl_const_PIP_Decision_Node_t pip_dec,
3140 ppl_const_PIP_Tree_Node_t* pip_tree));
3147 PPL_PROTO((ppl_const_Artificial_Parameter_t ap,
3148 ppl_Linear_Expression_t le));
3156 PPL_PROTO((ppl_const_Artificial_Parameter_t ap,
3157 ppl_dimension_type var,
3158 ppl_Coefficient_t n));
3166 PPL_PROTO((ppl_const_Artificial_Parameter_t ap,
3167 ppl_Coefficient_t n));
3174 PPL_PROTO((ppl_const_Artificial_Parameter_t ap,
3175 ppl_Coefficient_t n));
3186 PPL_PROTO((ppl_Artificial_Parameter_Sequence_const_iterator_t* papit));
3194 PPL_PROTO((ppl_Artificial_Parameter_Sequence_const_iterator_t* papit,
3195 ppl_const_Artificial_Parameter_Sequence_const_iterator_t apit));
3202 PPL_PROTO((ppl_Artificial_Parameter_Sequence_const_iterator_t dst,
3203 ppl_const_Artificial_Parameter_Sequence_const_iterator_t src));
3211 PPL_PROTO((ppl_const_Artificial_Parameter_Sequence_const_iterator_t apit));
3224 PPL_PROTO((ppl_const_Artificial_Parameter_Sequence_const_iterator_t apit,
3225 ppl_const_Artificial_Parameter_t* pap));
3232 PPL_PROTO((ppl_Artificial_Parameter_Sequence_const_iterator_t apit));
3240 PPL_PROTO((ppl_const_Artificial_Parameter_Sequence_const_iterator_t x,
3241 ppl_const_Artificial_Parameter_Sequence_const_iterator_t y));
3257 #include "ppl_c_domains.h"
3263 #undef PPL_TYPE_DECLARATION
3265 #undef PPL_DECLARE_PRINT_FUNCTIONS
3266 #undef PPL_DECLARE_ASCII_DUMP_LOAD_FUNCTIONS
3267 #undef PPL_DECLARE_IO_FUNCTIONS
3268 #undef PPL_DECLARE_AND_DOCUMENT_PRINT_FUNCTIONS
3269 #undef PPL_DECLARE_AND_DOCUMENT_ASCII_DUMP_LOAD_FUNCTIONS
3270 #undef PPL_DECLARE_AND_DOCUMENT_IO_FUNCTIONS
int ppl_Linear_Expression_all_homogeneous_terms_are_zero(ppl_const_Linear_Expression_t le)
Returns true if and only if all the homogeneous terms of *this are .
int ppl_Artificial_Parameter_get_inhomogeneous_term(ppl_const_Artificial_Parameter_t ap, ppl_Coefficient_t n)
Copies into n the inhomogeneous term of the artificial parameter ap.
char * ppl_io_wrap_string(const char *src, unsigned indent_depth, unsigned preferred_first_line_length, unsigned preferred_line_length)
Utility function for the wrapping of lines of text.
int ppl_delete_Constraint(ppl_const_Constraint_t c)
Invalidates the handle c: this makes sure the corresponding resources will eventually be released...
int PPL_MIP_PROBLEM_CONTROL_PARAMETER_PRICING_TEXTBOOK
Code of MIP problem's "textbook" pricing method.
int ppl_delete_Grid_Generator_System_const_iterator(ppl_const_Grid_Generator_System_const_iterator_t git)
Invalidates the handle git: this makes sure the corresponding resources will eventually be released...
int ppl_new_PIP_Problem_from_space_dimension(ppl_PIP_Problem_t *ppip, ppl_dimension_type d)
Builds a trivial PIP problem of dimension d and writes a handle to it at address ppip.
int ppl_Congruence_System_begin(ppl_const_Congruence_System_t cs, ppl_Congruence_System_const_iterator_t cit)
Assigns to cit a const iterator "pointing" to the beginning of the congruence system cs...
int ppl_Coefficient_max(mpz_t max)
Returns a positive integer if coefficients are bounded, in which case max is set to their maximum val...
int ppl_PIP_Tree_Node_begin(ppl_const_PIP_Tree_Node_t pip_tree, ppl_Artificial_Parameter_Sequence_const_iterator_t pit)
Assigns to pit a const iterator "pointing" to the beginning of the artificial parameter sequence in t...
ppl_enum_Bounded_Integer_Type_Representation
Representation of bounded integer types.
int ppl_set_rounding_for_PPL(void)
Sets the FPU rounding mode so that the PPL abstractions based on floating point numbers work correctl...
unsigned int PPL_POLY_CON_RELATION_IS_INCLUDED
Individual bit saying that the polyhedron is included in the set of points satisfying the constraint...
int ppl_Linear_Expression_space_dimension(ppl_const_Linear_Expression_t le, ppl_dimension_type *m)
Writes to m the space dimension of le.
int ppl_new_Generator_zero_dim_point(ppl_Generator_t *pg)
Creates the point that is the origin of the zero-dimensional space . Writes a handle for the new gene...
int ppl_Constraint_System_const_iterator_equal_test(ppl_const_Constraint_System_const_iterator_t x, ppl_const_Constraint_System_const_iterator_t y)
Returns a positive integer if the iterators corresponding to x and y are equal; returns 0 if they are...
unsigned int PPL_POLY_CON_RELATION_STRICTLY_INTERSECTS
Individual bit saying that the polyhedron intersects the set of points satisfying the constraint...
int ppl_Congruence_System_insert_Congruence(ppl_Congruence_System_t cs, ppl_const_Congruence_t c)
Inserts a copy of the congruence c into cs; the space dimension is increased, if necessary.
int PPL_MIP_PROBLEM_CONTROL_PARAMETER_PRICING_STEEPEST_EDGE_FLOAT
Code of MIP problem's "float steepest-edge" pricing method.
int ppl_Grid_Generator_OK(ppl_const_Grid_Generator_t g)
Returns a positive integer if g is well formed, i.e., if it satisfies all its implementation invarian...
int ppl_initialize(void)
Initializes the Parma Polyhedra Library. This function must be called before any other function...
int ppl_MIP_Problem_add_constraint(ppl_MIP_Problem_t mip, ppl_const_Constraint_t c)
Modifies the feasible region of the MIP problem mip by adding a copy of the constraint c...
int ppl_assign_Generator_System_const_iterator_from_Generator_System_const_iterator(ppl_Generator_System_const_iterator_t dst, ppl_const_Generator_System_const_iterator_t src)
Assigns a copy of the const iterator src to dst.
int ppl_PIP_Problem_space_dimension(ppl_const_PIP_Problem_t pip, ppl_dimension_type *m)
Writes to m the dimension of the vector space enclosing pip.
int ppl_Linear_Expression_OK(ppl_const_Linear_Expression_t le)
Returns a positive integer if le is well formed, i.e., if it satisfies all its implementation invaria...
int ppl_PIP_Problem_number_of_constraints(ppl_const_PIP_Problem_t pip, ppl_dimension_type *m)
Writes to m the number of constraints defining the feasible region of pip.
int ppl_assign_Coefficient_from_Coefficient(ppl_Coefficient_t dst, ppl_const_Coefficient_t src)
Assigns a copy of the coefficient src to dst.
int PPL_MIP_PROBLEM_STATUS_UNBOUNDED
Code of the "unbounded MIP problem" status.
int ppl_MIP_Problem_solve(ppl_const_MIP_Problem_t mip)
Solves the MIP problem mip, returning an exit status.
int ppl_new_Linear_Expression_from_Constraint(ppl_Linear_Expression_t *ple, ppl_const_Constraint_t c)
Builds a linear expression corresponding to constraint c; writes a handle for the newly created linea...
int ppl_delete_Generator_System(ppl_const_Generator_System_t gs)
Invalidates the handle gs: this makes sure the corresponding resources will eventually be released...
int ppl_new_Generator_zero_dim_closure_point(ppl_Generator_t *pg)
Creates, as a closure point, the point that is the origin of the zero-dimensional space ...
int ppl_Linear_Expression_add_to_inhomogeneous(ppl_Linear_Expression_t le, ppl_const_Coefficient_t n)
Adds n to the inhomogeneous term of the linear expression le.
int ppl_Constraint_System_has_strict_inequalities(ppl_const_Constraint_System_t cs)
Returns a positive integer if cs contains any (non-trivial) strict inequality; returns 0 otherwise...
int ppl_PIP_Problem_optimizing_solution(ppl_const_PIP_Problem_t pip, ppl_const_PIP_Tree_Node_t *pip_tree)
Writes to pip_tree an optimizing solution for pip, if it exists.
int ppl_PIP_Problem_add_constraints(ppl_PIP_Problem_t pip, ppl_const_Constraint_System_t cs)
Modifies the feasible region of the PIP problem pip by adding a copy of the constraints in cs...
int ppl_assign_MIP_Problem_from_MIP_Problem(ppl_MIP_Problem_t dst, ppl_const_MIP_Problem_t src)
Assigns a copy of the MIP problem src to dst.
int ppl_delete_Linear_Expression(ppl_const_Linear_Expression_t le)
Invalidates the handle le: this makes sure the corresponding resources will eventually be released...
int ppl_Congruence_modulus(ppl_const_Congruence_t c, ppl_Coefficient_t m)
Copies into m the modulus of congruence c.
int ppl_assign_Constraint_from_Constraint(ppl_Constraint_t dst, ppl_const_Constraint_t src)
Assigns a copy of the constraint src to dst.
int ppl_Generator_System_begin(ppl_const_Generator_System_t gs, ppl_Generator_System_const_iterator_t git)
Assigns to git a const iterator "pointing" to the beginning of the generator system gs...
int ppl_PIP_Problem_total_memory_in_bytes(ppl_const_PIP_Problem_t pip, size_t *sz)
Writes into *sz the size in bytes of the memory occupied by pip.
int ppl_PIP_Problem_number_of_parameter_space_dimensions(ppl_const_PIP_Problem_t pip, ppl_dimension_type *m)
Writes to m the number of parameter space dimensions of pip.
ppl_enum_error_code
Defines the error codes that any function may return.
size_t ppl_dimension_type
An unsigned integral type for representing space dimensions.
int ppl_PIP_Tree_Node_as_decision(ppl_const_PIP_Tree_Node_t spip_tree, ppl_const_PIP_Decision_Node_t *dpip_tree)
Writes to dpip_tree the decision node if spip_tree is a decision node, and 0 otherwise.
int ppl_Coefficient_min(mpz_t min)
Returns a positive integer if coefficients are bounded, in which case min is set to their minimum val...
int ppl_Generator_System_const_iterator_equal_test(ppl_const_Generator_System_const_iterator_t x, ppl_const_Generator_System_const_iterator_t y)
Returns a positive integer if the iterators corresponding to x and y are equal; returns 0 if they are...
int ppl_Generator_System_const_iterator_increment(ppl_Generator_System_const_iterator_t git)
Increment git so that it "points" to the next generator.
int ppl_assign_Generator_System_from_Generator_System(ppl_Generator_System_t dst, ppl_const_Generator_System_t src)
Assigns a copy of the generator system src to dst.
int ppl_MIP_Problem_constraint_at_index(ppl_const_MIP_Problem_t mip, ppl_dimension_type i, ppl_const_Constraint_t *pc)
Writes at address pc a const handle to the i-th constraint defining the feasible region of the MIP pr...
int ppl_PIP_Problem_external_memory_in_bytes(ppl_const_PIP_Problem_t pip, size_t *sz)
Writes into *sz the size in bytes of the memory managed by pip.
int ppl_new_Congruence_zero_dim_integrality(ppl_Congruence_t *pc)
Creates the true (zero-dimension space) congruence , also known as integrality congruence. A handle for the newly created congruence is written at address pc.
int ppl_PIP_Tree_Node_as_solution(ppl_const_PIP_Tree_Node_t spip_tree, ppl_const_PIP_Solution_Node_t *dpip_tree)
Writes to dpip_tree the solution node if spip_tree is a solution node, and 0 otherwise.
int ppl_MIP_Problem_set_control_parameter(ppl_MIP_Problem_t mip, int value)
Sets control parameter value in problem mip.
int ppl_new_Linear_Expression_from_Congruence(ppl_Linear_Expression_t *ple, ppl_const_Congruence_t c)
Builds a linear expression corresponding to congruence c; writes a handle for the newly created linea...
int ppl_MIP_Problem_objective_function(ppl_const_MIP_Problem_t mip, ppl_const_Linear_Expression_t *ple)
Writes a const handle to the linear expression defining the objective function of the MIP problem mip...
int ppl_Constraint_System_end(ppl_const_Constraint_System_t cs, ppl_Constraint_System_const_iterator_t cit)
Assigns to cit a const iterator "pointing" past the end of the constraint system cs.
int ppl_new_Generator_System_from_Generator(ppl_Generator_System_t *pgs, ppl_const_Generator_t g)
Builds the singleton generator system containing only a copy of generator g; writes a handle for the ...
int ppl_new_Linear_Expression_from_Linear_Expression(ppl_Linear_Expression_t *ple, ppl_const_Linear_Expression_t le)
Builds a linear expression that is a copy of le; writes a handle for the newly created linear express...
int ppl_delete_MIP_Problem(ppl_const_MIP_Problem_t mip)
Invalidates the handle mip: this makes sure the corresponding resources will eventually be released...
int ppl_Linear_Expression_coefficient(ppl_const_Linear_Expression_t le, ppl_dimension_type var, ppl_Coefficient_t n)
Copies into n the coefficient of variable var in the linear expression le.
int ppl_new_Constraint_zero_dim_false(ppl_Constraint_t *pc)
Creates the unsatisfiable (zero-dimension space) constraint and writes a handle for it at address pc...
int ppl_MIP_Problem_external_memory_in_bytes(ppl_const_MIP_Problem_t mip, size_t *sz)
Writes into *sz the size in bytes of the memory managed by mip.
int ppl_delete_Congruence_System_const_iterator(ppl_const_Congruence_System_const_iterator_t cit)
Invalidates the handle cit: this makes sure the corresponding resources will eventually be released...
int ppl_Generator_OK(ppl_const_Generator_t g)
Returns a positive integer if g is well formed, i.e., if it satisfies all its implementation invarian...
int ppl_PIP_Tree_Node_number_of_artificials(ppl_const_PIP_Tree_Node_t pip_tree, ppl_dimension_type *m)
Writes to m the number of elements in the artificial parameter sequence in the pip tree node pip_tree...
int ppl_Congruence_System_end(ppl_const_Congruence_System_t cs, ppl_Congruence_System_const_iterator_t cit)
Assigns to cit a const iterator "pointing" past the end of the congruence system cs.
int ppl_Coefficient_OK(ppl_const_Coefficient_t c)
Returns a positive integer if c is well formed, i.e., if it satisfies all its implementation invarian...
int ppl_MIP_Problem_OK(ppl_const_MIP_Problem_t mip)
Returns a positive integer if mip is well formed, i.e., if it satisfies all its implementation invari...
int ppl_new_Grid_Generator_System_const_iterator_from_Grid_Generator_System_const_iterator(ppl_Grid_Generator_System_const_iterator_t *pgit, ppl_const_Grid_Generator_System_const_iterator_t git)
Builds a const iterator that is a copy of git; writes a handle for the newly created const iterator a...
int ppl_delete_Grid_Generator(ppl_const_Grid_Generator_t g)
Invalidates the handle g: this makes sure the corresponding resources will eventually be released...
int ppl_Congruence_System_clear(ppl_Congruence_System_t cs)
Removes all the congruences from the congruence system cs and sets its space dimension to 0...
int ppl_MIP_Problem_space_dimension(ppl_const_MIP_Problem_t mip, ppl_dimension_type *m)
Writes to m the dimension of the vector space enclosing mip.
int ppl_io_asprint_variable(char **strp, ppl_dimension_type var)
Pretty-prints var to a malloc-allocated string, a pointer to which is returned via strp...
int ppl_banner(const char **p)
Writes to *p a pointer to a character string containing the PPL banner.
const char * ppl_io_variable_output_function_type(ppl_dimension_type var)
The type of output functions used for printing variables.
int ppl_Grid_Generator_System_OK(ppl_const_Grid_Generator_System_t gs)
Returns a positive integer if gs is well formed, i.e., if it satisfies all its implementation invaria...
int ppl_PIP_Problem_add_constraint(ppl_PIP_Problem_t pip, ppl_const_Constraint_t c)
Modifies the feasible region of the PIP problem pip by adding a copy of the constraint c...
int PPL_MIP_PROBLEM_CONTROL_PARAMETER_PRICING_STEEPEST_EDGE_EXACT
Code of MIP problem's "exact steepest-edge" pricing method.
int ppl_io_fprint_variable(FILE *stream, ppl_dimension_type var)
Pretty-prints var to the given output stream.
int ppl_new_Constraint_System_from_Constraint_System(ppl_Constraint_System_t *pcs, ppl_const_Constraint_System_t cs)
Builds a constraint system that is a copy of cs; writes a handle for the newly created system at addr...
int ppl_Generator_System_empty(ppl_const_Generator_System_t gs)
Returns a positive integer if gs contains no generators; returns 0 otherwise.
int ppl_PIP_Problem_is_satisfiable(ppl_const_PIP_Problem_t pip)
Returns a positive integer if pip is satisfiable and an optimal solution can be found; returns 0 othe...
int PPL_PIP_PROBLEM_CONTROL_PARAMETER_CUTTING_STRATEGY_FIRST
Code of PIP problem's "first" cutting strategy.
int ppl_assign_Grid_Generator_from_Grid_Generator(ppl_Grid_Generator_t dst, ppl_const_Grid_Generator_t src)
Assigns a copy of the grid generator src to dst.
int ppl_set_timeout(unsigned csecs)
Sets the timeout for computations whose completion could require an exponential amount of time...
int ppl_delete_Grid_Generator_System(ppl_const_Grid_Generator_System_t gs)
Invalidates the handle gs: this makes sure the corresponding resources will eventually be released...
unsigned int PPL_POLY_CON_RELATION_SATURATES
Individual bit saying that the polyhedron is included in the set of points saturating the constraint...
int ppl_new_Grid_Generator_System(ppl_Grid_Generator_System_t *pgs)
Builds an empty system of grid generators and writes a handle to it at address pgs.
ppl_enum_Constraint_Type
Describes the relations represented by a constraint.
int ppl_PIP_Problem_OK(ppl_const_PIP_Problem_t pip)
Returns a positive integer if pip is well formed, i.e., if it satisfies all its implementation invari...
int ppl_reset_timeout(void)
Resets the timeout time so that the computation is not interrupted.
int ppl_Generator_System_const_iterator_dereference(ppl_const_Generator_System_const_iterator_t git, ppl_const_Generator_t *pg)
Dereference git writing a const handle to the resulting generator at address pg.
int PPL_PIP_PROBLEM_CONTROL_PARAMETER_PIVOT_ROW_STRATEGY_FIRST
Code of PIP problem's "first" pivot row strategy.
int PPL_PIP_PROBLEM_CONTROL_PARAMETER_CUTTING_STRATEGY_DEEPEST
Code of PIP problem's "deepest" cutting strategy.
int PPL_PIP_PROBLEM_STATUS_OPTIMIZED
Code of the "optimized PIP problem" status.
int ppl_new_PIP_Problem_from_PIP_Problem(ppl_PIP_Problem_t *ppip, ppl_const_PIP_Problem_t pip)
Builds a PIP problem that is a copy of pip; writes a handle for the newly created problem at address ...
int ppl_Artificial_Parameter_Sequence_const_iterator_equal_test(ppl_const_Artificial_Parameter_Sequence_const_iterator_t x, ppl_const_Artificial_Parameter_Sequence_const_iterator_t y)
Returns a positive integer if the iterators corresponding to x and y are equal; returns 0 if they are...
int ppl_Grid_Generator_divisor(ppl_const_Grid_Generator_t g, ppl_Coefficient_t n)
If g is a point or a parameter assigns its divisor to n.
int ppl_Grid_Generator_System_space_dimension(ppl_const_Grid_Generator_System_t gs, ppl_dimension_type *m)
Writes to m the dimension of the vector space enclosing gs.
int ppl_assign_Linear_Expression_from_Linear_Expression(ppl_Linear_Expression_t dst, ppl_const_Linear_Expression_t src)
Assigns a copy of the linear expression src to dst.
On overflow, wrapping takes place.
int ppl_assign_Coefficient_from_mpz_t(ppl_Coefficient_t dst, mpz_t z)
Assign to dst the value given by the GMP integer z.
int ppl_new_Linear_Expression(ppl_Linear_Expression_t *ple)
Creates a new linear expression corresponding to the constant 0 in a zero-dimensional space; writes a...
int ppl_delete_Generator(ppl_const_Generator_t g)
Invalidates the handle g: this makes sure the corresponding resources will eventually be released...
int ppl_MIP_Problem_is_satisfiable(ppl_const_MIP_Problem_t mip)
Returns a positive integer if mip is satisfiable; returns 0 otherwise.
int ppl_version_revision(void)
Returns the revision number of the PPL version.
int ppl_MIP_Problem_add_to_integer_space_dimensions(ppl_MIP_Problem_t mip, ppl_dimension_type ds[], size_t n)
Sets the space dimensions that are specified in first n positions of the array ds to be integer dimen...
int ppl_max_space_dimension(ppl_dimension_type *m)
Writes to m the maximum space dimension this library can handle.
int ppl_PIP_Tree_Node_end(ppl_const_PIP_Tree_Node_t pip_tree, ppl_Artificial_Parameter_Sequence_const_iterator_t pit)
Assigns to pit a const iterator "pointing" to the end of the artificial parameter sequence in the pip...
unsigned int PPL_COMPLEXITY_CLASS_POLYNOMIAL
Code of the worst-case polynomial complexity class.
int ppl_new_Congruence_System_const_iterator(ppl_Congruence_System_const_iterator_t *pcit)
Builds a new `const iterator' and writes a handle to it at address pcit.
int ppl_assign_PIP_Problem_from_PIP_Problem(ppl_PIP_Problem_t dst, ppl_const_PIP_Problem_t src)
Assigns a copy of the PIP problem src to dst.
int ppl_restore_pre_PPL_rounding(void)
Sets the FPU rounding mode as it was before initialization of the PPL.
int ppl_new_Linear_Expression_from_Grid_Generator(ppl_Linear_Expression_t *ple, ppl_const_Grid_Generator_t g)
Builds a linear expression corresponding to grid generator g; writes a handle for the newly created l...
int ppl_Congruence_System_empty(ppl_const_Congruence_System_t cs)
Returns a positive integer if cs contains no (non-trivial) congruence; returns 0 otherwise.
int ppl_Generator_System_end(ppl_const_Generator_System_t gs, ppl_Generator_System_const_iterator_t git)
Assigns to git a const iterator "pointing" past the end of the generator system gs.
int ppl_Constraint_System_begin(ppl_const_Constraint_System_t cs, ppl_Constraint_System_const_iterator_t cit)
Assigns to cit a const iterator "pointing" to the beginning of the constraint system cs...
int ppl_PIP_Solution_Node_get_parametric_values(ppl_const_PIP_Solution_Node_t pip_sol, ppl_dimension_type var, ppl_const_Linear_Expression_t *le)
Writes to le a const pointer to the parametric expression of the values of variable var in solution n...
int ppl_MIP_Problem_integer_space_dimensions(ppl_const_MIP_Problem_t mip, ppl_dimension_type ds[])
Writes in the first positions of the array ds all the integer space dimensions of problem mip...
int ppl_Grid_Generator_type(ppl_const_Grid_Generator_t g)
Returns the type of grid generator g.
int ppl_finalize(void)
Finalizes the Parma Polyhedra Library. This function must be called after any other function...
int ppl_new_Constraint_System_zero_dim_empty(ppl_Constraint_System_t *pcs)
Builds a zero-dimensional, unsatisfiable constraint system and writes a handle to it at address pcs...
int ppl_MIP_Problem_set_optimization_mode(ppl_MIP_Problem_t mip, int mode)
Sets the optimization mode of the MIP problem mip to mode.
int ppl_MIP_Problem_add_constraints(ppl_MIP_Problem_t mip, ppl_const_Constraint_System_t cs)
Modifies the feasible region of the MIP problem mip by adding a copy of the constraints in cs...
ppl_enum_Grid_Generator_Type
Describes the different kinds of grid generators.
int ppl_Artificial_Parameter_Sequence_const_iterator_increment(ppl_Artificial_Parameter_Sequence_const_iterator_t apit)
Increment apit so that it "points" to the next artificial parameter.
int ppl_new_Grid_Generator_from_Grid_Generator(ppl_Grid_Generator_t *pg, ppl_const_Grid_Generator_t g)
Builds a grid generator that is a copy of g; writes a handle for the newly created grid generator at ...
int ppl_delete_Congruence(ppl_const_Congruence_t c)
Invalidates the handle c: this makes sure the corresponding resources will eventually be released...
int ppl_Congruence_System_const_iterator_equal_test(ppl_const_Congruence_System_const_iterator_t x, ppl_const_Congruence_System_const_iterator_t y)
Returns a positive integer if the iterators corresponding to x and y are equal; returns 0 if they are...
int ppl_irrational_precision(unsigned *p)
Writes to p the precision parameter used for irrational calculations.
int ppl_MIP_Problem_optimization_mode(ppl_const_MIP_Problem_t mip)
Returns the optimization mode of the MIP problem mip.
int PPL_PIP_PROBLEM_CONTROL_PARAMETER_NAME_CUTTING_STRATEGY
Code for the PIP problem's "cutting strategy" control parameter name.
int ppl_Congruence_System_const_iterator_increment(ppl_Congruence_System_const_iterator_t cit)
Increment cit so that it "points" to the next congruence.
int PPL_PIP_PROBLEM_CONTROL_PARAMETER_CUTTING_STRATEGY_ALL
Code of PIP problem's "all" cutting strategy.
On overflow, the result is undefined.
int ppl_Congruence_space_dimension(ppl_const_Congruence_t c, ppl_dimension_type *m)
Writes to m the space dimension of c.
int ppl_multiply_Linear_Expression_by_Coefficient(ppl_Linear_Expression_t le, ppl_const_Coefficient_t n)
Multiply the linear expression dst by n.
int ppl_Grid_Generator_System_const_iterator_dereference(ppl_const_Grid_Generator_System_const_iterator_t git, ppl_const_Grid_Generator_t *pg)
Dereference git writing a const handle to the resulting grid generator at address pg...
int ppl_PIP_Problem_set_control_parameter(ppl_PIP_Problem_t pip, int value)
Sets control parameter value in problem pip.
int ppl_set_error_handler(void(*h)(enum ppl_enum_error_code code, const char *description))
Installs the user-defined error handler pointed at by h.
int ppl_new_Congruence_System_zero_dim_empty(ppl_Congruence_System_t *pcs)
Builds a zero-dimensional, unsatisfiable congruence system and writes a handle to it at address pcs...
int ppl_assign_Grid_Generator_System_const_iterator_from_Grid_Generator_System_const_iterator(ppl_Grid_Generator_System_const_iterator_t dst, ppl_const_Grid_Generator_System_const_iterator_t src)
Assigns a copy of the const iterator src to dst.
int ppl_Artificial_Parameter_get_Linear_Expression(ppl_const_Artificial_Parameter_t ap, ppl_Linear_Expression_t le)
Copies into le the linear expression in artificial parameter ap.
int ppl_Grid_Generator_System_empty(ppl_const_Grid_Generator_System_t gs)
Returns a positive integer if gs contains no generator; returns 0 otherwise.
int ppl_new_MIP_Problem_from_space_dimension(ppl_MIP_Problem_t *pmip, ppl_dimension_type d)
Builds a trivial MIP problem of dimension d and writes a handle to it at address pmip.
int ppl_Linear_Expression_inhomogeneous_term(ppl_const_Linear_Expression_t le, ppl_Coefficient_t n)
Copies into n the inhomogeneous term of linear expression le.
int ppl_assign_Constraint_System_const_iterator_from_Constraint_System_const_iterator(ppl_Constraint_System_const_iterator_t dst, ppl_const_Constraint_System_const_iterator_t src)
Assigns a copy of the const iterator src to dst.
int ppl_version_major(void)
Returns the major number of the PPL version.
int ppl_new_Generator_from_Generator(ppl_Generator_t *pg, ppl_const_Generator_t g)
Builds a generator that is a copy of g; writes a handle for the newly created generator at address pg...
int ppl_version(const char **p)
Writes to *p a pointer to a character string containing the PPL version.
int ppl_Generator_System_insert_Generator(ppl_Generator_System_t gs, ppl_const_Generator_t g)
Inserts a copy of the generator g into gs; the space dimension is increased, if necessary.
int ppl_Generator_space_dimension(ppl_const_Generator_t g, ppl_dimension_type *m)
Writes to m the space dimension of g.
int ppl_new_Artificial_Parameter_Sequence_const_iterator_from_Artificial_Parameter_Sequence_const_iterator(ppl_Artificial_Parameter_Sequence_const_iterator_t *papit, ppl_const_Artificial_Parameter_Sequence_const_iterator_t apit)
Builds a const iterator that is a copy of apit; writes a handle for the newly created const iterator ...
int ppl_new_Constraint_from_Constraint(ppl_Constraint_t *pc, ppl_const_Constraint_t c)
Builds a constraint that is a copy of c; writes a handle for the newly created constraint at address ...
int ppl_PIP_Problem_solution(ppl_const_PIP_Problem_t pip, ppl_const_PIP_Tree_Node_t *pip_tree)
Writes to pip_tree a solution for pip, if it exists.
int ppl_new_Generator_System_const_iterator(ppl_Generator_System_const_iterator_t *pgit)
Builds a new `const iterator' and writes a handle to it at address pgit.
int ppl_MIP_Problem_evaluate_objective_function(ppl_const_MIP_Problem_t mip, ppl_const_Generator_t g, ppl_Coefficient_t num, ppl_Coefficient_t den)
Evaluates the objective function of mip on point g.
int ppl_PIP_Problem_solve(ppl_const_PIP_Problem_t pip)
Solves the PIP problem pip, returning an exit status.
int ppl_new_Constraint(ppl_Constraint_t *pc, ppl_const_Linear_Expression_t le, enum ppl_enum_Constraint_Type rel)
Creates the new constraint `le rel 0' and writes a handle for it at address pc. The space dimension o...
int ppl_new_MIP_Problem_from_MIP_Problem(ppl_MIP_Problem_t *pmip, ppl_const_MIP_Problem_t mip)
Builds a MIP problem that is a copy of mip; writes a handle for the newly created system at address p...
int ppl_PIP_Problem_clear(ppl_PIP_Problem_t pip)
Resets the PIP problem to be a trivial problem of space dimension 0.
PPL_COEFFICIENT_TYPE Coefficient
int ppl_PIP_Tree_Node_OK(ppl_const_PIP_Tree_Node_t pip)
Returns a positive integer if pip_tree is well formed, i.e., if it satisfies all its implementation i...
int ppl_Congruence_System_const_iterator_dereference(ppl_const_Congruence_System_const_iterator_t cit, ppl_const_Congruence_t *pc)
Dereference cit writing a const handle to the resulting congruence at address pc. ...
int ppl_PIP_Problem_add_to_parameter_space_dimensions(ppl_PIP_Problem_t pip, ppl_dimension_type ds[], size_t n)
Sets the space dimensions that are specified in first n positions of the array ds to be parameter dim...
int ppl_assign_Generator_from_Generator(ppl_Generator_t dst, ppl_const_Generator_t src)
Assigns a copy of the generator src to dst.
int ppl_Constraint_type(ppl_const_Constraint_t c)
Returns the type of constraint c.
int ppl_MIP_Problem_optimal_value(ppl_const_MIP_Problem_t mip, ppl_Coefficient_t num, ppl_Coefficient_t den)
Returns the optimal value for mip.
int ppl_Artificial_Parameter_denominator(ppl_const_Artificial_Parameter_t ap, ppl_Coefficient_t n)
Copies into n the denominator in artificial parameter ap.
int ppl_reset_deterministic_timeout(void)
Resets the deterministic timeout so that the computation is not interrupted.
int ppl_new_Artificial_Parameter_Sequence_const_iterator(ppl_Artificial_Parameter_Sequence_const_iterator_t *papit)
Builds a new `const iterator' and writes a handle to it at address papit.
int ppl_set_deterministic_timeout(unsigned long unscaled_weight, unsigned scale)
Sets a threshold for computations whose completion could require an exponential amount of time...
int ppl_not_a_dimension(ppl_dimension_type *m)
Writes to m a value that does not designate a valid dimension.
int ppl_io_get_variable_output_function(ppl_io_variable_output_function_type **pp)
Writes a pointer to the current variable output function to pp.
int PPL_PIP_PROBLEM_STATUS_UNFEASIBLE
Code of the "unfeasible PIP problem" status.
int ppl_Generator_System_space_dimension(ppl_const_Generator_System_t gs, ppl_dimension_type *m)
Writes to m the dimension of the vector space enclosing gs.
int ppl_new_Coefficient_from_Coefficient(ppl_Coefficient_t *pc, ppl_const_Coefficient_t c)
Builds a coefficient that is a copy of c; writes a handle for the newly created coefficient at addres...
int ppl_new_Grid_Generator_zero_dim_point(ppl_Grid_Generator_t *pg)
Creates the point that is the origin of the zero-dimensional space . Writes a handle for the new grid...
int ppl_Grid_Generator_coefficient(ppl_const_Grid_Generator_t g, ppl_dimension_type var, ppl_Coefficient_t n)
Copies into n the coefficient of variable var in grid generator g.
int ppl_assign_Congruence_from_Congruence(ppl_Congruence_t dst, ppl_const_Congruence_t src)
Assigns a copy of the congruence src to dst.
int PPL_MIP_PROBLEM_STATUS_UNFEASIBLE
Code of the "unfeasible MIP problem" status.
int ppl_new_Constraint_System_from_Constraint(ppl_Constraint_System_t *pcs, ppl_const_Constraint_t c)
Builds the singleton constraint system containing only a copy of constraint c; writes a handle for th...
int ppl_Congruence_OK(ppl_const_Congruence_t c)
Returns a positive integer if c is well formed, i.e., if it satisfies all its implementation invarian...
int ppl_new_Generator(ppl_Generator_t *pg, ppl_const_Linear_Expression_t le, enum ppl_enum_Generator_Type t, ppl_const_Coefficient_t d)
Creates a new generator of direction le and type t. If the generator to be created is a point or a cl...
int ppl_io_print_variable(ppl_dimension_type var)
Pretty-prints var to stdout.
int ppl_Generator_System_OK(ppl_const_Generator_System_t gs)
Returns a positive integer if gs is well formed, i.e., if it satisfies all its implementation invaria...
unsigned int PPL_POLY_GEN_RELATION_SUBSUMES
Individual bit saying that adding the generator would not change the polyhedron.
int ppl_delete_Constraint_System(ppl_const_Constraint_System_t cs)
Invalidates the handle cs: this makes sure the corresponding resources will eventually be released...
int ppl_new_Congruence_from_Congruence(ppl_Congruence_t *pc, ppl_const_Congruence_t c)
Builds a congruence that is a copy of c; writes a handle for the newly created congruence at address ...
ppl_enum_Bounded_Integer_Type_Width
Widths of bounded integer types.
int ppl_PIP_Problem_set_big_parameter_dimension(ppl_PIP_Problem_t pip, ppl_dimension_type d)
Sets the big parameter dimension of PIP problem pip to d.
ppl_enum_Bounded_Integer_Type_Overflow
Overflow behavior of bounded integer types.
int ppl_Linear_Expression_is_zero(ppl_const_Linear_Expression_t le)
Returns true if and only if *this is .
int ppl_MIP_Problem_optimizing_point(ppl_const_MIP_Problem_t mip, ppl_const_Generator_t *pg)
Writes a const handle to an optimizing point for the MIP problem mip at address pg.
int ppl_MIP_Problem_set_objective_function(ppl_MIP_Problem_t mip, ppl_const_Linear_Expression_t le)
Sets the objective function of the MIP problem mip to a copy of le.
int ppl_add_Linear_Expression_to_Linear_Expression(ppl_Linear_Expression_t dst, ppl_const_Linear_Expression_t src)
Adds the linear expression src to dst.
int ppl_MIP_Problem_add_space_dimensions_and_embed(ppl_MIP_Problem_t mip, ppl_dimension_type d)
Adds d new dimensions to the space enclosing the MIP problem mip and to mip itself.
int ppl_assign_Congruence_System_from_Congruence_System(ppl_Congruence_System_t dst, ppl_const_Congruence_System_t src)
Assigns a copy of the congruence system src to dst.
int ppl_MIP_Problem_number_of_integer_space_dimensions(ppl_const_MIP_Problem_t mip, ppl_dimension_type *m)
Writes to m the number of integer space dimensions of mip.
int ppl_Coefficient_to_mpz_t(ppl_const_Coefficient_t c, mpz_t z)
Sets the value of the GMP integer z to the value of c.
int ppl_PIP_Problem_get_big_parameter_dimension(ppl_const_PIP_Problem_t pip, ppl_dimension_type *pd)
Writes into *pd the big parameter dimension of PIP problem pip.
int ppl_Constraint_space_dimension(ppl_const_Constraint_t c, ppl_dimension_type *m)
Writes to m the space dimension of c.
int ppl_assign_Artificial_Parameter_Sequence_const_iterator_from_Artificial_Parameter_Sequence_const_iterator(ppl_Artificial_Parameter_Sequence_const_iterator_t dst, ppl_const_Artificial_Parameter_Sequence_const_iterator_t src)
Assigns a copy of the const iterator src to dst.
unsigned int PPL_COMPLEXITY_CLASS_ANY
Code of the universal complexity class.
int ppl_new_Constraint_System_const_iterator_from_Constraint_System_const_iterator(ppl_Constraint_System_const_iterator_t *pcit, ppl_const_Constraint_System_const_iterator_t cit)
Builds a const iterator that is a copy of cit; writes a handle for the newly created const iterator a...
int ppl_Constraint_inhomogeneous_term(ppl_const_Constraint_t c, ppl_Coefficient_t n)
Copies into n the inhomogeneous term of constraint c.
int ppl_Congruence_System_OK(ppl_const_Congruence_System_t cs)
Returns a positive integer if cs is well formed, i.e., if it satisfies all its implementation invaria...
int ppl_Artificial_Parameter_coefficient(ppl_const_Artificial_Parameter_t ap, ppl_dimension_type var, ppl_Coefficient_t n)
Copies into n the coefficient of variable var in the artificial parameter ap.
int ppl_Grid_Generator_System_begin(ppl_const_Grid_Generator_System_t gs, ppl_Grid_Generator_System_const_iterator_t git)
Assigns to git a const iterator "pointing" to the beginning of the grid generator system gs...
int ppl_new_PIP_Problem_from_constraints(ppl_PIP_Problem_t *ppip, ppl_dimension_type d, ppl_Constraint_System_const_iterator_t first, ppl_Constraint_System_const_iterator_t last, size_t n, ppl_dimension_type ds[])
Builds a PIP problem having space dimension d from the sequence of constraints in the range ; the n d...
int ppl_version_beta(void)
Returns the beta number of the PPL version.
int ppl_Grid_Generator_System_const_iterator_increment(ppl_Grid_Generator_System_const_iterator_t git)
Increment git so that it "points" to the next grid generator.
int ppl_new_Congruence_System(ppl_Congruence_System_t *pcs)
Builds an empty system of congruences and writes a handle to it at address pcs.
int PPL_MIP_PROBLEM_STATUS_OPTIMIZED
Code of the "optimized MIP problem" status.
int ppl_version_minor(void)
Returns the minor number of the PPL version.
int ppl_delete_Artificial_Parameter_Sequence_const_iterator(ppl_const_Artificial_Parameter_Sequence_const_iterator_t apit)
Invalidates the handle apit: this makes sure the corresponding resources will eventually be released...
int ppl_io_set_variable_output_function(ppl_io_variable_output_function_type *p)
Sets the output function to be used for printing variables to p.
int ppl_assign_Congruence_System_const_iterator_from_Congruence_System_const_iterator(ppl_Congruence_System_const_iterator_t dst, ppl_const_Congruence_System_const_iterator_t src)
Assigns a copy of the const iterator src to dst.
int ppl_Constraint_System_insert_Constraint(ppl_Constraint_System_t cs, ppl_const_Constraint_t c)
Inserts a copy of the constraint c into cs; the space dimension is increased, if necessary.
int ppl_assign_Grid_Generator_System_from_Grid_Generator_System(ppl_Grid_Generator_System_t dst, ppl_const_Grid_Generator_System_t src)
Assigns a copy of the grid generator system src to dst.
int ppl_new_Grid_Generator(ppl_Grid_Generator_t *pg, ppl_const_Linear_Expression_t le, enum ppl_enum_Grid_Generator_Type t, ppl_const_Coefficient_t d)
Creates a new grid generator of direction le and type t. If the grid generator to be created is a poi...
int ppl_new_Congruence_System_const_iterator_from_Congruence_System_const_iterator(ppl_Congruence_System_const_iterator_t *pcit, ppl_const_Congruence_System_const_iterator_t cit)
Builds a const iterator that is a copy of cit; writes a handle for the newly created const iterator a...
int ppl_Generator_type(ppl_const_Generator_t g)
Returns the type of generator g.
int ppl_new_Constraint_zero_dim_positivity(ppl_Constraint_t *pc)
Creates the true (zero-dimension space) constraint , also known as positivity constraint. A handle for the newly created constraint is written at address pc.
int ppl_Generator_coefficient(ppl_const_Generator_t g, ppl_dimension_type var, ppl_Coefficient_t n)
Copies into n the coefficient of variable var in generator g.
int ppl_Congruence_coefficient(ppl_const_Congruence_t c, ppl_dimension_type var, ppl_Coefficient_t n)
Copies into n the coefficient of variable var in congruence c.
int PPL_PIP_PROBLEM_CONTROL_PARAMETER_NAME_PIVOT_ROW_STRATEGY
Code for the PIP problem's "pivot row strategy" control parameter name.
int ppl_PIP_Tree_Node_get_constraints(ppl_const_PIP_Tree_Node_t pip_tree, ppl_const_Constraint_System_t *pcs)
Writes to pcs the local system of parameter constraints at the pip tree node pip_tree.
unsigned int PPL_POLY_CON_RELATION_IS_DISJOINT
Individual bit saying that the polyhedron and the set of points satisfying the constraint are disjoin...
int ppl_delete_PIP_Problem(ppl_const_PIP_Problem_t pip)
Invalidates the handle pip: this makes sure the corresponding resources will eventually be released...
int ppl_new_Congruence_System_from_Congruence_System(ppl_Congruence_System_t *pcs, ppl_const_Congruence_System_t cs)
Builds a congruence system that is a copy of cs; writes a handle for the newly created system at addr...
int ppl_new_Grid_Generator_System_from_Grid_Generator(ppl_Grid_Generator_System_t *pgs, ppl_const_Grid_Generator_t g)
Builds the singleton grid generator system containing only a copy of generator g; writes a handle for...
int ppl_Coefficient_is_bounded(void)
Returns a positive integer if coefficients are bounded; returns 0 otherwise.
int ppl_Grid_Generator_System_end(ppl_const_Grid_Generator_System_t gs, ppl_Grid_Generator_System_const_iterator_t git)
Assigns to git a const iterator "pointing" past the end of the grid generator system gs...
int ppl_new_Linear_Expression_with_dimension(ppl_Linear_Expression_t *ple, ppl_dimension_type d)
Creates a new linear expression corresponding to the constant 0 in a d-dimensional space; writes a ha...
int ppl_new_Congruence_zero_dim_false(ppl_Congruence_t *pc)
Creates the unsatisfiable (zero-dimension space) congruence and writes a handle for it at address pc...
int PPL_OPTIMIZATION_MODE_MAXIMIZATION
Code of the "maximization" optimization mode.
int ppl_delete_Congruence_System(ppl_const_Congruence_System_t cs)
Invalidates the handle cs: this makes sure the corresponding resources will eventually be released...
int ppl_delete_Coefficient(ppl_const_Coefficient_t c)
Invalidates the handle c: this makes sure the corresponding resources will eventually be released...
ppl_enum_Generator_Type
Describes the different kinds of generators.
int ppl_set_irrational_precision(unsigned p)
Sets the precision parameter used for irrational calculations.
int ppl_Constraint_OK(ppl_const_Constraint_t c)
Returns a positive integer if c is well formed, i.e., if it satisfies all its implementation invarian...
int ppl_Constraint_System_const_iterator_dereference(ppl_const_Constraint_System_const_iterator_t cit, ppl_const_Constraint_t *pc)
Dereference cit writing a const handle to the resulting constraint at address pc. ...
int ppl_Constraint_System_clear(ppl_Constraint_System_t cs)
Removes all the constraints from the constraint system cs and sets its space dimension to 0...
int ppl_new_Constraint_System_const_iterator(ppl_Constraint_System_const_iterator_t *pcit)
Builds a new `const iterator' and writes a handle to it at address pcit.
int ppl_Congruence_System_space_dimension(ppl_const_Congruence_System_t cs, ppl_dimension_type *m)
Writes to m the dimension of the vector space enclosing cs.
int ppl_MIP_Problem_clear(ppl_MIP_Problem_t mip)
Resets the MIP problem to be a trivial problem of space dimension 0.
int PPL_PIP_PROBLEM_CONTROL_PARAMETER_PIVOT_ROW_STRATEGY_MAX_COLUMN
Code of PIP problem's "max column" pivot row strategy.
int ppl_PIP_Problem_constraint_at_index(ppl_const_PIP_Problem_t pip, ppl_dimension_type i, ppl_const_Constraint_t *pc)
Writes at address pc a const handle to the i-th constraint defining the feasible region of the PIP pr...
int ppl_new_Constraint_System(ppl_Constraint_System_t *pcs)
Builds an empty system of constraints and writes a handle to it at address pcs.
int ppl_new_MIP_Problem(ppl_MIP_Problem_t *pmip, ppl_dimension_type d, ppl_const_Constraint_System_t cs, ppl_const_Linear_Expression_t le, int m)
Builds a MIP problem of space dimension d having feasible region cs, objective function le and optimi...
int ppl_new_Coefficient_from_mpz_t(ppl_Coefficient_t *pc, mpz_t z)
Creates a new coefficient with the value given by the GMP integer z and writes a handle for the newly...
int ppl_new_Generator_System_const_iterator_from_Generator_System_const_iterator(ppl_Generator_System_const_iterator_t *pgit, ppl_const_Generator_System_const_iterator_t git)
Builds a const iterator that is a copy of git; writes a handle for the newly created const iterator a...
int ppl_Grid_Generator_System_const_iterator_equal_test(ppl_const_Grid_Generator_System_const_iterator_t x, ppl_const_Grid_Generator_System_const_iterator_t y)
Returns a positive integer if the iterators corresponding to x and y are equal; returns 0 if they are...
int PPL_OPTIMIZATION_MODE_MINIMIZATION
Code of the "minimization" optimization mode.
int ppl_Linear_Expression_add_to_coefficient(ppl_Linear_Expression_t le, ppl_dimension_type var, ppl_const_Coefficient_t n)
Adds n to the coefficient of variable var in the linear expression le. The space dimension is set to ...
int ppl_new_Linear_Expression_from_Generator(ppl_Linear_Expression_t *ple, ppl_const_Generator_t g)
Builds a linear expression corresponding to generator g; writes a handle for the newly created linear...
int ppl_Grid_Generator_System_insert_Grid_Generator(ppl_Grid_Generator_System_t gs, ppl_const_Grid_Generator_t g)
Inserts a copy of the grid generator g into gs; the space dimension is increased, if necessary...
Signed binary where negative values are represented by the two's complement of the absolute value...
int ppl_Grid_Generator_space_dimension(ppl_const_Grid_Generator_t g, ppl_dimension_type *m)
Writes to m the space dimension of g.
int ppl_Generator_System_clear(ppl_Generator_System_t gs)
Removes all the generators from the generator system gs and sets its space dimension to 0...
int ppl_new_Generator_System_from_Generator_System(ppl_Generator_System_t *pgs, ppl_const_Generator_System_t gs)
Builds a generator system that is a copy of gs; writes a handle for the newly created system at addre...
int ppl_PIP_Problem_parameter_space_dimensions(ppl_const_PIP_Problem_t pip, ppl_dimension_type ds[])
Writes in the first positions of the array ds all the parameter space dimensions of problem pip...
int ppl_Constraint_System_empty(ppl_const_Constraint_System_t cs)
Returns a positive integer if cs contains no (non-trivial) constraint; returns 0 otherwise.
int ppl_Constraint_System_const_iterator_increment(ppl_Constraint_System_const_iterator_t cit)
Increment cit so that it "points" to the next constraint.
int ppl_Constraint_System_space_dimension(ppl_const_Constraint_System_t cs, ppl_dimension_type *m)
Writes to m the dimension of the vector space enclosing cs.
int ppl_Generator_divisor(ppl_const_Generator_t g, ppl_Coefficient_t n)
If g is a point or a closure point assigns its divisor to n.
int ppl_new_Congruence(ppl_Congruence_t *pc, ppl_const_Linear_Expression_t le, ppl_const_Coefficient_t m)
Creates the new congruence and writes a handle for it at address pc. The space dimension of the new ...
int ppl_MIP_Problem_total_memory_in_bytes(ppl_const_MIP_Problem_t mip, size_t *sz)
Writes into *sz the size in bytes of the memory occupied by mip.
int ppl_Grid_Generator_System_clear(ppl_Grid_Generator_System_t gs)
Removes all the generators from the grid generator system gs and sets its space dimension to 0...
int ppl_subtract_Linear_Expression_from_Linear_Expression(ppl_Linear_Expression_t dst, ppl_const_Linear_Expression_t src)
Subtracts the linear expression src from dst.
int ppl_MIP_Problem_feasible_point(ppl_const_MIP_Problem_t mip, ppl_const_Generator_t *pg)
Writes a const handle to a feasible point for the MIP problem mip at address pg.
unsigned int PPL_COMPLEXITY_CLASS_SIMPLEX
Code of the worst-case exponential but typically polynomial complexity class.
int ppl_assign_Constraint_System_from_Constraint_System(ppl_Constraint_System_t dst, ppl_const_Constraint_System_t src)
Assigns a copy of the constraint system src to dst.
int ppl_PIP_Problem_add_space_dimensions_and_embed(ppl_PIP_Problem_t pip, ppl_dimension_type pip_vars, ppl_dimension_type pip_params)
Adds pip_vars + pip_params new space dimensions and embeds the PIP problem pip in the new vector spac...
int ppl_new_Congruence_System_from_Congruence(ppl_Congruence_System_t *pcs, ppl_const_Congruence_t c)
Builds the singleton congruence system containing only a copy of congruence c; writes a handle for th...
int ppl_new_Grid_Generator_System_const_iterator(ppl_Grid_Generator_System_const_iterator_t *pgit)
Builds a new `const iterator' and writes a handle to it at address pgit.
int ppl_new_Grid_Generator_System_from_Grid_Generator_System(ppl_Grid_Generator_System_t *pgs, ppl_const_Grid_Generator_System_t gs)
Builds a grid generator system that is a copy of gs; writes a handle for the newly created system at ...
int ppl_Artificial_Parameter_Sequence_const_iterator_dereference(ppl_const_Artificial_Parameter_Sequence_const_iterator_t apit, ppl_const_Artificial_Parameter_t *pap)
Dereference apit writing a const handle to the resulting artificial parameter at address pap...
int ppl_new_Coefficient(ppl_Coefficient_t *pc)
Creates a new coefficient with value 0 and writes a handle for the newly created coefficient at addre...
int ppl_delete_Generator_System_const_iterator(ppl_const_Generator_System_const_iterator_t git)
Invalidates the handle git: this makes sure the corresponding resources will eventually be released...
int ppl_new_Generator_System(ppl_Generator_System_t *pgs)
Builds an empty system of generators and writes a handle to it at address pgs.
int ppl_delete_Constraint_System_const_iterator(ppl_const_Constraint_System_const_iterator_t cit)
Invalidates the handle cit: this makes sure the corresponding resources will eventually be released...
int PPL_MIP_PROBLEM_CONTROL_PARAMETER_NAME_PRICING
Code for the MIP problem's "pricing" control parameter name.
int ppl_PIP_Decision_Node_get_child_node(ppl_const_PIP_Decision_Node_t pip_dec, int b, ppl_const_PIP_Tree_Node_t *pip_tree)
Writes to pip_tree a const pointer to either the true branch (if b is not zero) or the false branch (...
int ppl_Constraint_coefficient(ppl_const_Constraint_t c, ppl_dimension_type var, ppl_Coefficient_t n)
Copies into n the coefficient of variable var in constraint c.
int ppl_PIP_Problem_get_control_parameter(ppl_const_PIP_Problem_t pip, int name)
Returns the value of control parameter name in problem pip.
int ppl_MIP_Problem_number_of_constraints(ppl_const_MIP_Problem_t mip, ppl_dimension_type *m)
Writes to m the number of constraints defining the feasible region of mip.
int ppl_MIP_Problem_get_control_parameter(ppl_const_MIP_Problem_t mip, int name)
Returns the value of control parameter name in problem mip.
int ppl_Congruence_inhomogeneous_term(ppl_const_Congruence_t c, ppl_Coefficient_t n)
Copies into n the inhomogeneous term of congruence c.
int ppl_Constraint_System_OK(ppl_const_Constraint_System_t cs)
Returns a positive integer if cs is well formed, i.e., if it satisfies all its implementation invaria...