PPL C Language Interface 2.0
ppl_PIP_Tree_Node_tag Interface Reference

Types and functions for generic PIP tree nodes. More...

#include <ppl_c_header.h>

(Note that these are not member symbols.)

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_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_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.
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 invariants; returns 0 and perhaps makes some noise if pip_tree is broken. Useful for debugging purposes.
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_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 the pip tree node pip_tree.
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 tree node pip_tree.
int ppl_io_print_PIP_Tree_Node (ppl_const_PIP_Tree_Node_t x)
 Prints x to stdout.
int ppl_io_fprint_PIP_Tree_Node (FILE *stream, ppl_const_PIP_Tree_Node_t x)
 Prints x to the given output stream.
int ppl_io_asprint_PIP_Tree_Node (char **strp, ppl_const_PIP_Tree_Node_t x)
 Prints x to a malloc-allocated string, a pointer to which is returned via strp.
int ppl_PIP_Tree_Node_ascii_dump (ppl_const_PIP_Tree_Node_t x, FILE *stream)
 Dumps an ascii representation of x on stream.
int ppl_PIP_Tree_Node_ascii_load (ppl_PIP_Tree_Node_t x, FILE *stream)
 Loads an ascii representation of x from stream.

Detailed Description

Types and functions for generic PIP tree nodes.

The types and functions for tree nodes provide an interface towards PIP_Tree_Node.

◆ ppl_PIP_Tree_Node_as_solution()

int ppl_PIP_Tree_Node_as_solution ( ppl_const_PIP_Tree_Node_t spip_tree,
ppl_const_PIP_Solution_Node_t * dpip_tree )
related

Writes to dpip_tree the solution node if spip_tree is a solution node, and 0 otherwise.

The input must be non-null. A non-null output aliases the input node and is borrowed from the same PIP problem, without extending its lifetime; see Borrowed PIP Problem Data and Solution Trees. This conversion does not invalidate other borrowed tree handles. On failure, *dpip_tree is unchanged.

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

◆ ppl_PIP_Tree_Node_as_decision()

int ppl_PIP_Tree_Node_as_decision ( ppl_const_PIP_Tree_Node_t spip_tree,
ppl_const_PIP_Decision_Node_t * dpip_tree )
related

Writes to dpip_tree the decision node if spip_tree is a decision node, and 0 otherwise.

The input must be non-null. A non-null output aliases the input node and is borrowed from the same PIP problem, without extending its lifetime; see Borrowed PIP Problem Data and Solution Trees. This conversion does not invalidate other borrowed tree handles. On failure, *dpip_tree is unchanged.

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

◆ ppl_PIP_Tree_Node_get_constraints()

int ppl_PIP_Tree_Node_get_constraints ( ppl_const_PIP_Tree_Node_t pip_tree,
ppl_const_Constraint_System_t * pcs )
related

Writes to pcs the local system of parameter constraints at the pip tree node pip_tree.

The non-null result is borrowed from pip_tree and ultimately from its PIP problem. It must not be modified or deleted; read-only inspection and iteration are permitted. See Borrowed PIP Problem Data and Solution Trees for invalidation rules. On failure, *pcs is unchanged.

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

◆ ppl_PIP_Tree_Node_OK()

int ppl_PIP_Tree_Node_OK ( ppl_const_PIP_Tree_Node_t pip)
related

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

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

◆ ppl_PIP_Tree_Node_number_of_artificials()

int ppl_PIP_Tree_Node_number_of_artificials ( ppl_const_PIP_Tree_Node_t pip_tree,
ppl_dimension_type * m )
related

Writes to m the number of elements in the artificial parameter sequence in the pip tree node pip_tree.

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

◆ ppl_PIP_Tree_Node_begin()

int ppl_PIP_Tree_Node_begin ( ppl_const_PIP_Tree_Node_t pip_tree,
ppl_Artificial_Parameter_Sequence_const_iterator_t pit )
related

Assigns to pit a const iterator "pointing" to the beginning of the artificial parameter sequence in the pip tree node pip_tree.

The iterator object must already have been constructed. Its position borrows from pip_tree without extending its lifetime. Obtaining begin/end iterators does not invalidate other tree views or iterators; see Borrowed PIP Problem Data and Solution Trees and System Iterators and Elements.

Parameters
pip_treeThe borrowed handle to the input object.
pitThe iterator handle selecting the current element.
Returns
Zero on success; a negative error code on failure.

◆ ppl_PIP_Tree_Node_end()

int ppl_PIP_Tree_Node_end ( ppl_const_PIP_Tree_Node_t pip_tree,
ppl_Artificial_Parameter_Sequence_const_iterator_t pit )
related

Assigns to pit a const iterator "pointing" to the end of the artificial parameter sequence in the pip tree node pip_tree.

The iterator object must already have been constructed. Its position borrows from pip_tree without extending its lifetime. Obtaining begin/end iterators does not invalidate other tree views or iterators; see Borrowed PIP Problem Data and Solution Trees and System Iterators and Elements.

Parameters
pip_treeThe borrowed handle to the input object.
pitThe iterator handle selecting the current element.
Returns
Zero on success; a negative error code on failure.

◆ ppl_io_print_PIP_Tree_Node()

int ppl_io_print_PIP_Tree_Node ( ppl_const_PIP_Tree_Node_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_PIP_Tree_Node()

int ppl_io_fprint_PIP_Tree_Node ( FILE * stream,
ppl_const_PIP_Tree_Node_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_PIP_Tree_Node()

int ppl_io_asprint_PIP_Tree_Node ( char ** strp,
ppl_const_PIP_Tree_Node_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_PIP_Tree_Node_ascii_dump()

int ppl_PIP_Tree_Node_ascii_dump ( ppl_const_PIP_Tree_Node_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_PIP_Tree_Node_ascii_load()

int ppl_PIP_Tree_Node_ascii_load ( ppl_PIP_Tree_Node_t x,
FILE * stream )
related

Loads an ascii representation of x from stream.

Parameters
xThe solution-tree node 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: