124 size_t *num_children_ret);
164 size_t position_size,
166 size_t *position_size_ret);
192 size_t *num_values_ret);
219 size_t position_size,
220 const size_t *position,
245 size_t position_size,
246 const size_t *position,
double ccs_float_t
A CCS floating point type.
Definition base.h:29
struct _ccs_tree_s * ccs_tree_t
An opaque type defining a CCS tree.
Definition base.h:159
enum ccs_result_e ccs_result_t
A commodity type to represent CCS errors and returned by most functions.
Definition base.h:247
struct _ccs_rng_s * ccs_rng_t
An opaque type defining a CCS random generator.
Definition base.h:87
A Structure containing a CCS datum.
Definition base.h:494
ccs_result_t ccs_tree_get_node_at_position(ccs_tree_t tree, size_t position_size, const size_t *position, ccs_tree_t *tree_ret)
Get the node at a given position from a tree node.
ccs_result_t ccs_tree_set_child(ccs_tree_t tree, size_t index, ccs_tree_t child)
Set an unset child in a tree node at the given index.
ccs_result_t ccs_tree_set_weight(ccs_tree_t tree, ccs_float_t weight)
Set the weight of a tree node.
ccs_result_t ccs_tree_get_values(ccs_tree_t tree, size_t num_values, ccs_datum_t *values, size_t *num_values_ret)
Get the values along the path leading to a node in it's tree.
ccs_result_t ccs_tree_get_value(ccs_tree_t tree, ccs_datum_t *value_ret)
Get the value of a tree node.
ccs_result_t ccs_tree_set_bias(ccs_tree_t tree, ccs_float_t bias)
Set the bias of a tree node.
ccs_result_t ccs_tree_samples(ccs_tree_t tree, ccs_rng_t rng, size_t num_indices, size_t *indices)
Sample the child index space of a tree node.
ccs_result_t ccs_tree_get_values_at_position(ccs_tree_t tree, size_t position_size, const size_t *position, size_t num_values, ccs_datum_t *values)
Get the values along the path to a given position from a tree node.
ccs_result_t ccs_tree_get_position(ccs_tree_t tree, size_t position_size, size_t *position, size_t *position_size_ret)
Get the position of a node in it's tree.
ccs_result_t ccs_tree_get_parent(ccs_tree_t tree, ccs_tree_t *parent_ret, size_t *index_ret)
Get the parent node of a tree node.
ccs_result_t ccs_tree_get_bias(ccs_tree_t tree, ccs_float_t *bias_ret)
Get the bias of a subtree.
ccs_result_t ccs_tree_get_child(ccs_tree_t tree, size_t index, ccs_tree_t *child_ret)
Query a tree node for the child at the given index.
ccs_result_t ccs_tree_get_arity(ccs_tree_t tree, size_t *arity_ret)
Get the arity of a tree node.
ccs_result_t ccs_tree_get_children(ccs_tree_t tree, size_t num_children, ccs_tree_t *children, size_t *num_children_ret)
Query all the children of a tree node.
ccs_result_t ccs_create_tree(size_t arity, ccs_datum_t value, ccs_tree_t *tree_ret)
Create new tree node.
ccs_result_t ccs_tree_sample(ccs_tree_t tree, ccs_rng_t rng, size_t *index_ret)
Sample the child index space of a a tree node.
ccs_result_t ccs_tree_get_weight(ccs_tree_t tree, ccs_float_t *weight_ret)
Get the weight of a tree node.