PPL C Language Interface
1.2
|
Types and functions for linear expressions. More...
#include <ppl_c_header.h>
Related Functions | |
(Note that these are not member functions.) | |
Constructors, Assignment and Destructor | |
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 handle for the new linear expression at address ple . | |
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 handle for the new linear expression at address ple . | |
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 expression at address ple . | |
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 linear expression at address ple . | |
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 expression at address ple . | |
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 linear expression at address ple . | |
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 linear expression at address ple . | |
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 . | |
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. | |
Functions that Do Not Modify the Linear Expression | |
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_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_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_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 invariants; returns 0 and perhaps makes some noise if le is broken. Useful for debugging purposes. | |
int | ppl_Linear_Expression_is_zero (ppl_const_Linear_Expression_t le) |
Returns true if and only if *this is ![]() | |
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 ![]() | |
Functions that May Modify the Linear Expression | |
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 be the maximum between var + 1 and the old space dimension. | |
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_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_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_multiply_Linear_Expression_by_Coefficient (ppl_Linear_Expression_t le, ppl_const_Coefficient_t n) |
Multiply the linear expression dst by n . | |
Input/Output Functions | |
int | ppl_io_print_Linear_Expression (ppl_const_Linear_Expression_t x) |
Prints x to stdout . | |
int | ppl_io_fprint_Linear_Expression (FILE *stream, ppl_const_Linear_Expression_t x) |
Prints x to the given output stream . | |
int | ppl_io_asprint_Linear_Expression (char **strp, ppl_const_Linear_Expression_t x) |
Prints x to a malloc-allocated string, a pointer to which is returned via strp . | |
int | ppl_Linear_Expression_ascii_dump (ppl_const_Linear_Expression_t x, FILE *stream) |
Dumps an ascii representation of x on stream . | |
int | ppl_Linear_Expression_ascii_load (ppl_Linear_Expression_t x, FILE *stream) |
Loads an ascii representation of x from stream . | |
Types and functions for linear expressions.
The types and functions for linear expression provide an interface towards Linear_Expression.