* "depth": the total number of levels of the tree, including leaves
* "depth": the total number of levels of the tree, including leaves
* "arity": An array of size (depth-1). For each level, the number of children attached to a node. Leaves have no children, hence last level arity is ignored. Arities are organized from root to leaves.
* "arity": An array of size (depth-1). For each level, the number of children attached to a node.
* Leaves have no children. Arities are organized from root to leaves.
* "index": NULL or an array of depth excit_t to re-index levels.
* It is intended to prune node of certain levels while keeping index of the initial structure.
* Ownership of index is not taken. The iterator allocates a copy of index and manage it internally.
* "policy": A policy for iteration on leaves.
* "policy": A policy for iteration on leaves.
* "user_policy": If policy is TLEAF_POLICY_USER, then this argument must be an array of size (depth-1) providing the order (from 0 to (depth-2)) in wich levels are walked.
* "user_policy": If policy is TLEAF_POLICY_USER, then this argument must be an array of size (depth-1) providing the
* when resolving indexes. Underneath, a product iterator of range iterator returns indexes on last levels upon iterator queries. This set of indexes is then
* order (from 0 to (depth-2)) in which levels are walked.
* computed to a single leaf index. For instance TLEAF_POLICY_ROUND_ROBIN is obtained from walking from leaves to root whereas TLEAF_POLICY_SCATTER is
* when resolving indexes. Underneath, a product iterator of range iterator returns indexes on last
* levels upon iterator queries. This set of indexes is then
* computed to a single leaf index. For instance TLEAF_POLICY_ROUND_ROBIN is obtained from walking
* from leaves to root whereas TLEAF_POLICY_SCATTER is
* obtained from walking from root to leaves.
* obtained from walking from root to leaves.
*/
*/
intexcit_tleaf_init(excit_tit,
intexcit_tleaf_init(excit_tit,
constssize_tdepth,
constssize_tdepth,
constssize_t*arities,
constssize_t*arities,
constexcit_t*index,
constenumtleaf_it_policy_epolicy,
constenumtleaf_it_policy_epolicy,
constssize_t*user_policy);
constssize_t*user_policy);
/*
/*
* Split a tree at a given level. The behaviour is different from the generic function excit_split for the split might be sparse.
* Split a tree at a given level. The behaviour is different from the generic function excit_split for the
* split might be sparse, depending on the tree level where the split occures and the number of parts.
* "it": a tleaf iterator.
* "it": a tleaf iterator.
* "level": The level to split.
* "level": The level to split.
* "n": The number of slices. n must divide the target level arity.
* "n": The number of parts. n must divide the target level arity.