Function tskit::bindings::tsk_tree_init
source · pub unsafe extern "C" fn tsk_tree_init(
self_: *mut tsk_tree_t,
tree_sequence: *const tsk_treeseq_t,
options: tsk_flags_t
) -> c_int
Expand description
@brief Initialises the tree by allocating internal memory and associating with the specified tree sequence.
@rst This must be called before any operations are performed on the tree.
The specified tree sequence object must be initialised, and must be valid for the full lifetime of this tree.
See the :ref:sec_c_api_overview_structure
for details on how objects
are initialised and freed.
The options
parameter is provided to support future expansions
of the API. A number of undocumented internal features are controlled
via this parameter, and it must be set to 0 to ensure that operations
work as expected and for compatibility with future versions of tskit.
@endrst
@param self A pointer to an uninitialised tsk_tree_t object. @param tree_sequence A pointer to an initialised tsk_treeseq_t object. @param options Allocation time options. Must be 0, or behaviour is undefined. @return Return 0 on success or a negative value on failure.