|typedef struct cuex_intf_compound *||cuex_intf_compound_t|
|cuex_intf_compound_t||cuex_type_compound (cuoo_type_t type)|
|void||cuex_intf_compound_finish (cuex_intf_compound_t impl)|
|size_t||cuex_compound_size (cuex_intf_compound_t impl, cuex_t C)|
|cu_ptr_source_t||cuex_compound_pref_iter_source (cuex_intf_compound_t impl, cuex_t C)|
|cu_ptr_source_t||cuex_compound_comm_iter_source (cuex_intf_compound_t impl, cuex_t C)|
|cu_ptr_junctor_t||cuex_compound_pref_image_junctor (cuex_intf_compound_t impl, cuex_t C)|
|cu_ptr_junctor_t||cuex_compound_comm_image_junctor (cuex_intf_compound_t impl, cuex_t C)|
|cu_ptr_source_t||cuex_ncomm_source (cuex_t e)|
|cu_ptr_source_t||cuex_comm_source (cuex_t e)|
|cu_ptr_source_t||cuex_pref_source (cuex_t e)|
Compound expressions, or compounds for short, are containers of expressions (dynamic objects and operations). Compounds are also themselves expressions. One thing you can do an compounds without knowing more about their structure is to iterate over their subexpressions. Further, compounds may support creation of their image under a function or iterable construction.
The following terminology will reflect that compounds are geared towards representing associative binary operations, though it is just as useful for containers. We distinguish between non-commutative and commutative views. A compound may bind one or both views. For example, a map may be an commutative compound of key-value pairs, or a non-commutative compound of just the values where the keys are treated inertly. Conversely, a vector may have a commutative iterator where the values are index-value pairs.
|#define CUEX_COMPOUNDFLAG_COMM_EXPANSIVE_IMAGE 128|
|#define CUEX_COMPOUNDFLAG_COMM_FILTERABLE_IMAGE 32|
|#define CUEX_COMPOUNDFLAG_COMM_IDEMPOTENT 8|
Set iff equal elements reduces to a single occurrence for the commutative interface.
|#define CUEX_COMPOUNDFLAG_NCOMM_EXPANSIVE_IMAGE 64|
|#define CUEX_COMPOUNDFLAG_NCOMM_FILTERABLE_IMAGE 16|
|#define CUEX_COMPOUNDFLAG_NCOMM_IDEMPOTENT 4|
Set iff successive elements which are equal reduces to a single occurrence for the non-commutative interface.
|#define CUEX_COMPOUNDFLAG_PREFER_COMM 2|
Set if the commutative interface is preferable when an algorithm supports both. This flag must be set if the non-commutative interface is unbound.
|#define CUEX_COMPOUNDFLAG_PREFER_NCOMM 1|
Set if the non-commutative interface is preferable when an algorithm supports both. This flag must be set if the commutative interface is unbound.
Returns an unordered sequence over immediate subexpressions of e. For operations, a sequence of cuex_o2_metapair are returned, where the first operand is an cudyn_int of the position, and the second is the original operand. For compounds, the (possibly synthesised) commutative view is returned. Returns the empty iterator for atomic expressions.
Returns a junctor for constructing an image of C using the commutative view.
Returns a source for iterating through C using the commutative view.
Returns a junctor for constructing an image of C using either non-commutative or commutative view as preferred by the compound.
Returns a source for iterating through C using either non-commutative or commutative view as preferred by the compound.
Returns the number of elements in C.
Verifies that impl has been correctly initialised, and may synthesise some missing fields as indicated in cuex_intf_compound.
Returns an ordered sequence over immediate subexpressions of e. For operations, yields the opreands in order (as returned by cuex_opn_at). For compounds, returns the non-commutative source of the compound, or
NULL if the compound only has a commutative view. Returns the empty interator for atomic expressions.