Function tskit::bindings::tsk_tree_prev

source ·
pub unsafe extern "C" fn tsk_tree_prev(
    self_: *mut tsk_tree_t
) -> c_int
Expand description

@brief Seek to the previous tree in the sequence.

@rst Set the state of this tree to reflect the previous 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_prev a tree in the :ref:null state<sec_c_api_trees_null> is equivalent to calling :c:func:tsk_tree_last.

Calling :c:func:tsk_tree_prev on the first 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.