[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Tree constraints of level 1 (‘ap_tcons1.h’)

Tree constraints are constraints built on tree expressions.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Datatypes for tree constraints of level 1

datatype: ap_tcons1_t

Datatype for constraints.

For information:

 
typedef struct ap_tcons1_t {
  ap_tcons0_t tcons0;
  ap_environment_t* env;
} ap_tcons1_t;
datatype: ap_tcons1_array_t
 
typedef struct ap_tcons1_array_t {
  ap_tcons0_array_t tcons0_array;
  ap_environment_t* env;
} ap_tcons1_array_t;

Datatype for arrays of constraints.

Arrays at level 1 cannot be accessed directly, for example by writing array->p[i], but should instead be accessed with functions ap_tcons1_array_get and ap_tcons1_array_set.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Constructors/Destructors for tree constraints of level 1

Function: ap_tcons1_t ap_tcons1_make (ap_constyp_t constyp, ap_texpr1_t* expr, ap_scalar_t* scalar)

Create a constraint of given type with the given expression. The expression and the optional coefficient are not duplicated, just pointed to.

Function: ap_tcons1_t ap_tcons1_from_lincons1 (ap_tcons1_t* cons)

Create a tree constraint from a linear constraint.

Function: ap_tcons1_t ap_tcons1_copy (ap_tcons1_t* cons)

Duplication.

Function: void ap_tcons1_clear (ap_tcons1_t* cons)

Clear the constraint and set pointers to NULL.

Function: void ap_tcons1_fprint (FILE* stream, ap_tcons1_t* cons)
Function: void ap_tcons1_print (ap_tcons1_t* cons)

Printing

Function: ap_environment_t* ap_tcons1_envref (ap_tcons1_t* cons)

Get a reference to the environment. Do not free it.

Function: ap_constyp_t* ap_tcons1_constypref (ap_tcons1_t* cons)

Get a reference to the type of constraint.

Function: ap_scalar_t* ap_tcons1_scalarref (ap_tcons1_t* cons)

Get a reference to the auxiliary coefficient of the constraint.

Function: ap_texpr1_t ap_tcons1_texpr1ref (ap_tcons1_t* cons)

Get a reference to the underlying expression of the constraint. Do not free it: nothing is duplicated. Modifying the argument or the result is equivalent, except for change of dimensions/environment.

Function: ap_tcons0_t* ap_tcons1_tcons0ref (ap_tcons1_t* cons)

Return underlying constraint of level 0. Do not free it: nothing is duplicated. Modifying the argument or the result is equivalent, except for change of dimensions/envionment.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Operations on tree constraints of level 1

Function: bool ap_tcons1_extend_environment (ap_tcons1_t* ncons, ap_tcons1_t* cons, ap_environment_t* nenv)
Function: bool ap_tcons1_extend_environment_with (ap_tcons1_t* cons, ap_environment_t* nenv)

Change current environment with a super-environment. Return true if nenv is not a superenvironment of e->env.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Arrays of tree constraints of level 1

Function: ap_tcons1_array_t ap_tcons1_array_make (ap_environment_t* env, size_t size)

Allocate an array of size constraints. The constraints are initialized with NULL pointers, so that ap_tcons1_array_free may be safely called.

Function: void ap_tcons1_array_clear (ap_tcons1_array_t* array)

Clear the constraints of the array, and then the array itself.

Function: void ap_tcons1_array_fprint (FILE* stream, ap_tcons1_array_t* array)
Function: void ap_tcons1_array_print (ap_tcons1_array_t* array)

Printing.

Function: size_t ap_tcons1_array_size (ap_tcons1_array_t* array)

Return the size of the array.

Function: ap_environment_t* ap_tcons1_array_envref (ap_tcons1_array_t* array)

Return a reference to the environment of the array. Do not free it.

Function: void ap_tcons1_array_clear_index (ap_tcons1_array_t* array, size_t index)

Clear the constraint at index index and set pointers to NULL.

Function: ap_tcons1_t ap_tcons1_array_get (ap_tcons1_array_t* array, size_t index)

Return the linear constraint of the given index Nothing is duplicated, and the result should never be cleared. Modifying the argument or the result is equivalent, except for change of environments.

Function: bool ap_tcons1_array_set (ap_tcons1_array_t* array, size_t index, ap_tcons1_t* cons)

Fill the index of the array with the constraint. Assumes ap_environment_is_eq(array->env,cons->env). Nothing is duplicated. The argument should never be cleared (its environment is dereferenced). If a constraint was already stored, it is first cleared. Return true iff problem (index or array->env!=cons->env)

Function: bool ap_tcons1_array_extend_environment_with (ap_tcons1_array_t* array, ap_environment_t* nenv)
Function: bool ap_tcons1_array_extend_environment (ap_tcons1_array_t* narray, ap_tcons1_array_t* array, ap_environment_t* nenv)

Change current environment with a super-environment. Return true if nenv is not a superenvironment of array->env.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by root on September 20, 2019 using texi2html 1.82.