PPL C Language Interface 2.0
ppl_PIP_Decision_Node_tag Interface Reference

Types and functions for PIP decision nodes. More...

#include <ppl_c_header.h>

(Note that these are not member symbols.)

int ppl_PIP_Decision_Node_OK (ppl_const_PIP_Decision_Node_t pip_dec)
 Returns a positive integer if pip_dec is well formed, i.e., if it satisfies all its implementation invariants; returns 0 and perhaps makes some noise if pip_dec is broken. Useful for debugging purposes.
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 (if b is zero) of pip_dec.
int ppl_io_print_PIP_Decision_Node (ppl_const_PIP_Decision_Node_t x)
 Prints x to stdout.
int ppl_io_fprint_PIP_Decision_Node (FILE *stream, ppl_const_PIP_Decision_Node_t x)
 Prints x to the given output stream.
int ppl_io_asprint_PIP_Decision_Node (char **strp, ppl_const_PIP_Decision_Node_t x)
 Prints x to a malloc-allocated string, a pointer to which is returned via strp.
int ppl_PIP_Decision_Node_ascii_dump (ppl_const_PIP_Decision_Node_t x, FILE *stream)
 Dumps an ascii representation of x on stream.
int ppl_PIP_Decision_Node_ascii_load (ppl_PIP_Decision_Node_t x, FILE *stream)
 Loads an ascii representation of x from stream.

Detailed Description

Types and functions for PIP decision nodes.

The types and functions for decision nodes provide an interface towards PIP_Decision_Node.

◆ ppl_PIP_Decision_Node_OK()

int ppl_PIP_Decision_Node_OK ( ppl_const_PIP_Decision_Node_t pip_dec)
related

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

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

◆ ppl_PIP_Decision_Node_get_child_node()

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

Writes to pip_tree a const pointer to either the true branch (if b is not zero) or the false branch (if b is zero) of pip_dec.

Writes a null handle if the branch is absent. A non-null result is borrowed from the same PIP problem as pip_dec, and must not be modified or deleted. This access does not invalidate other tree views; see Borrowed PIP Problem Data and Solution Trees. On failure, *pip_tree is unchanged.

Parameters
pip_decThe borrowed handle to the input object.
bNonzero to select the true branch; zero to select the false branch.
pip_treeThe borrowed handle to the input object.
Returns
Zero on success; a negative error code on failure.

◆ ppl_io_print_PIP_Decision_Node()

int ppl_io_print_PIP_Decision_Node ( ppl_const_PIP_Decision_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_Decision_Node()

int ppl_io_fprint_PIP_Decision_Node ( FILE * stream,
ppl_const_PIP_Decision_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_Decision_Node()

int ppl_io_asprint_PIP_Decision_Node ( char ** strp,
ppl_const_PIP_Decision_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_Decision_Node_ascii_dump()

int ppl_PIP_Decision_Node_ascii_dump ( ppl_const_PIP_Decision_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_Decision_Node_ascii_load()

int ppl_PIP_Decision_Node_ascii_load ( ppl_PIP_Decision_Node_t x,
FILE * stream )
related

Loads an ascii representation of x from stream.

Parameters
xThe decision 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: