Given an altering sequence of labels and values terminated by NULL
, returns the labelling of the corresponding mapping.
size_t cuex_labelling_card | ( | cuex_t | L | ) |
Returns the cardinality of L. Note that the complexity is linear.
cu_ptr_sinktor_t cuex_labelling_comm_build_sinktor | ( | void | ) |
A sinktor for construction a new labelling by unordered insertion of CUEX_O2_METAPAIR
nodes and labellings.
cu_ptr_source_t cuex_labelling_comm_iter_source | ( | cuex_t | L | ) |
Returns an iteration source for the unordered sequence. The implied sequence are CUEX_O2_METAPAIR
nodes.
cu_ptr_sinktor_t cuex_labelling_comm_union_sinktor | ( | cuex_t | L | ) |
A sinktor for extending a labelling by unordered insertion of CUEX_O2_METAPAIR
nodes and labellings.
Call f with each label and value of L as long as it returns true, and return false iff an invocation of f returned false.
cuex_t cuex_labelling_deep_insert | ( | cu_clop(merge, cuex_t, cuex_t, cuex_t) | , | |
cuex_t | L, | |||
cuex_t | l, | |||
cuex_t | e | |||
) |
Returns L with an extra mapping from l to e. If l is already present in L, the existing value v is replaced with merge(v, e)
.
cuex_t cuex_labelling_deep_isecn | ( | cu_clop(merge, cuex_t, cuex_t e0, cuex_t e1) | , | |
cuex_t | L0, | |||
cuex_t | L1 | |||
) |
Forms the intersection of L0 and L1, merging the value part of the elements with merge.
cuex_t cuex_labelling_deep_union | ( | cu_clop(merge, cuex_t, cuex_t e0, cuex_t e1) | , | |
cuex_t | L0, | |||
cuex_t | L1 | |||
) |
Forms the union of L0 and L1, merging the value part of common elements with merge.
Returns the union of L0 and L1 if the labellings are disjoint, NULL
otherwise.
cuex_t cuex_labelling_empty | ( | void | ) |
The empty labelling.
Returns the result of erasing the mapping from l in L if present, otherwise returns L.
If l has a mapping if *L,
updates *L
by erasing it, and returns the value of the mapping, otherwise returns NULL
.
Returns the index of l in L, or (size_t)-1 if not found. Note that the complexity of this call is linear in the cardinality of L.
Return the labelling where each value of L is transformed by f, which receives the old value and should return the new value. If the label is needed for the transform, see cuex_labelling_image_kv.
Return the labelling where each value of L is transformed by f, which receives the label and the old value and should return the new value.
The labelling L with the additional mapping from l to e. If L already contains the key l, then L is returned.
The variable arguments shall be an altering sequence of labels and values terminated by NULL
, and this function returns the result of inserting a mapping for each (label, value) pair into L.
Assuming va refers to an argument list which contains a altering sequence of pairs of labels and values terminated by NULL
, returns the result of inserting a mapping for each pair into L.
Forms the intersection of L0 and L1 considering elements equal if they have the same label. The elements of L0 are used in the result.
Forms the union of L0 and L1 considering elements equal if they have the same label. For elements present in both labellings, those from L0 are used in the result.
cu_ptr_junctor_t cuex_labelling_ncomm_image_junctor | ( | cuex_t | L | ) |
A junctor for constructing the image of L, using the ordered view corresponding to cuex_labelling_comm_iter_source. For each element popped from the junctor, at most one must be put back. The labels of the resulting labelling is taken from the original.
cu_ptr_source_t cuex_labelling_ncomm_iter_source | ( | cuex_t | L | ) |
Returns an iteration source for an ordered sequence of all values mapped by L. The ordering is given by arbitrary fixing the ordering of the labels. The labels are not exposed.