PPL C Language Interface 2.0
ppl_Generator_tag Interface Reference

Types and functions for generators. More...

#include <ppl_c_header.h>

(Note that these are not member symbols.)

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 closure point, the divisor d is applied to le. For other types of generators d is simply disregarded. A handle for the new generator is written at address pg. The space dimension of the new generator is equal to 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 $\Rset^0$. Writes a handle for the new generator at address pg.
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 $\Rset^0$. Writes a handle for the new generator at address pg.
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_assign_Generator_from_Generator (ppl_Generator_t dst, ppl_const_Generator_t src)
 Assigns a copy of the generator src to dst.
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_Generator_space_dimension (ppl_const_Generator_t g, ppl_dimension_type *m)
 Writes to m the space dimension of g.
int ppl_Generator_type (ppl_const_Generator_t g)
 Returns the type of generator g.
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_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_Generator_OK (ppl_const_Generator_t g)
 Returns a positive integer if g is well formed, i.e., if it satisfies all its implementation invariants; returns 0 and perhaps makes some noise if g is broken. Useful for debugging purposes.
int ppl_io_print_Generator (ppl_const_Generator_t x)
 Prints x to stdout.
int ppl_io_fprint_Generator (FILE *stream, ppl_const_Generator_t x)
 Prints x to the given output stream.
int ppl_io_asprint_Generator (char **strp, ppl_const_Generator_t x)
 Prints x to a malloc-allocated string, a pointer to which is returned via strp.
int ppl_Generator_ascii_dump (ppl_const_Generator_t x, FILE *stream)
 Dumps an ascii representation of x on stream.
int ppl_Generator_ascii_load (ppl_Generator_t x, FILE *stream)
 Loads an ascii representation of x from stream.

Detailed Description

Types and functions for generators.

The types and functions for generators provide an interface towards Generator.

◆ ppl_new_Generator()

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 )
related

Creates a new generator of direction le and type t. If the generator to be created is a point or a closure point, the divisor d is applied to le. For other types of generators d is simply disregarded. A handle for the new generator is written at address pg. The space dimension of the new generator is equal to the space dimension of le.

Parameters
pgReceives the newly allocated object handle; release it with the matching deletion function.
leThe borrowed handle to the input object.
tThe geometric generator kind to construct.
dThe divisor interpreting the expression coefficients as rational coordinates.
Returns
Zero on success; a negative error code on failure.

◆ ppl_new_Generator_zero_dim_point()

int ppl_new_Generator_zero_dim_point ( ppl_Generator_t * pg)
related

Creates the point that is the origin of the zero-dimensional space $\Rset^0$. Writes a handle for the new generator at address pg.

Parameters
pgReceives the newly allocated object handle; release it with the matching deletion function.
Returns
Zero on success; a negative error code on failure.

◆ ppl_new_Generator_zero_dim_closure_point()

int ppl_new_Generator_zero_dim_closure_point ( ppl_Generator_t * pg)
related

Creates, as a closure point, the point that is the origin of the zero-dimensional space $\Rset^0$. Writes a handle for the new generator at address pg.

Parameters
pgReceives the newly allocated object handle; release it with the matching deletion function.
Returns
Zero on success; a negative error code on failure.

◆ ppl_new_Generator_from_Generator()

int ppl_new_Generator_from_Generator ( ppl_Generator_t * pg,
ppl_const_Generator_t g )
related

Builds a generator that is a copy of g; writes a handle for the newly created generator at address pg.

Parameters
pgReceives the newly allocated object handle; release it with the matching deletion function.
gThe borrowed handle to the input object.
Returns
Zero on success; a negative error code on failure.

◆ ppl_assign_Generator_from_Generator()

int ppl_assign_Generator_from_Generator ( ppl_Generator_t dst,
ppl_const_Generator_t src )
related

Assigns a copy of the generator src to dst.

Parameters
dstThe destination object handle.
srcThe source object handle.
Returns
Zero on success; a negative error code on failure.

◆ ppl_delete_Generator()

int ppl_delete_Generator ( ppl_const_Generator_t g)
related

Invalidates the handle g: this makes sure the corresponding resources will eventually be released.

Parameters
gThe borrowed handle to the input object.
Returns
Zero on success; a negative error code on failure.

◆ ppl_Generator_space_dimension()

int ppl_Generator_space_dimension ( ppl_const_Generator_t g,
ppl_dimension_type * m )
related

Writes to m the space dimension of g.

Parameters
gThe borrowed handle to the input object.
mThe number of space dimensions to add.
Returns
Zero on success; a negative error code on failure.

◆ ppl_Generator_type()

int ppl_Generator_type ( ppl_const_Generator_t g)
related

Returns the type of generator g.

Parameters
gThe borrowed handle to the input object.
Returns
The type of generator g.

◆ ppl_Generator_coefficient()

int ppl_Generator_coefficient ( ppl_const_Generator_t g,
ppl_dimension_type var,
ppl_Coefficient_t n )
related

Copies into n the coefficient of variable var in generator g.

Parameters
gThe borrowed handle to the input object.
varThe index of the selected space dimension.
nThe coefficient handle receiving the requested value.
Returns
Zero on success; a negative error code on failure.

◆ ppl_Generator_divisor()

int ppl_Generator_divisor ( ppl_const_Generator_t g,
ppl_Coefficient_t n )
related

If g is a point or a closure point assigns its divisor to n.

Parameters
gThe borrowed handle to the input object.
nThe coefficient handle receiving the requested value.
Returns
Zero on success; a negative error code on failure.

◆ ppl_Generator_OK()

int ppl_Generator_OK ( ppl_const_Generator_t g)
related

Returns a positive integer if g is well formed, i.e., if it satisfies all its implementation invariants; returns 0 and perhaps makes some noise if g is broken. Useful for debugging purposes.

Parameters
gThe borrowed handle to the input object.
Returns
A positive integer if g is well formed, i.e., if it satisfies all its implementation invariants; returns 0 and perhaps makes some noise if g is broken. Useful for debugging purposes.

◆ ppl_io_print_Generator()

int ppl_io_print_Generator ( ppl_const_Generator_t x)
related

Prints x to stdout.

Parameters
xThe borrowed handle to the input object.
Returns
Zero on success; a negative error code on failure.

◆ ppl_io_fprint_Generator()

int ppl_io_fprint_Generator ( FILE * stream,
ppl_const_Generator_t x )
related

Prints x to the given output stream.

Parameters
streamThe file stream to which output is written.
xThe borrowed handle to the input object.
Returns
Zero on success; a negative error code on failure.

◆ ppl_io_asprint_Generator()

int ppl_io_asprint_Generator ( char ** strp,
ppl_const_Generator_t x )
related

Prints x to a malloc-allocated string, a pointer to which is returned via strp.

Parameters
strpReceives the newly malloc-allocated string; the caller must release it with free().
xThe borrowed handle to the input object.
Returns
Prints x to a malloc-allocated string, a pointer to which is returned via strp.

◆ ppl_Generator_ascii_dump()

int ppl_Generator_ascii_dump ( ppl_const_Generator_t x,
FILE * stream )
related

Dumps an ascii representation of x on stream.

Parameters
xThe borrowed handle to the input object.
streamThe file stream to which output is written.
Returns
Zero on success; a negative error code on failure.

◆ ppl_Generator_ascii_load()

int ppl_Generator_ascii_load ( ppl_Generator_t x,
FILE * stream )
related

Loads an ascii representation of x from stream.

Parameters
xThe generator operand.
streamThe file stream from which input is read.
Returns
Zero on success; a negative error code on failure.

The documentation for this interface was generated from the following file: