Function tskit::bindings::tsk_tree_next
source · pub unsafe extern "C" fn tsk_tree_next(
self_: *mut tsk_tree_t
) -> c_int
Expand description
@brief Seek to the next tree in the sequence.
@rst
Set the state of this tree to reflect the next tree in parent
tree sequence. If the index of the current tree is j
,
then the after this operation the index will be j + 1
.
Calling :c:func:tsk_tree_next
a tree in the
:ref:null state<sec_c_api_trees_null>
is equivalent to calling
:c:func:tsk_tree_first
.
Calling :c:func:tsk_tree_next
on the last tree in the
sequence will transform it into the
:ref:null state<sec_c_api_trees_null>
(equivalent to
calling :c:func:tsk_tree_clear
).
Please see the :ref:sec_c_api_examples_tree_iteration
examples for
recommended usage.
@endrst
@param self A pointer to an initialised tsk_tree_t object. @return Return TSK_TREE_OK on successfully transforming to a non-null tree; 0 on successfully transforming into the null tree; or a negative value if an error occurs.