Function tskit::bindings::tsk_table_sorter_init
source · pub unsafe extern "C" fn tsk_table_sorter_init(
self_: *mut _tsk_table_sorter_t,
tables: *mut tsk_table_collection_t,
options: tsk_flags_t
) -> c_int
Expand description
@brief Initialises the memory for the sorter object.
@rst
This must be called before any operations are performed on the
table sorter and initialises all fields. The edge_sort
function
is set to the default method using qsort. The user_data
field is set to NULL.
This method supports the same options as
:c:func:tsk_table_collection_sort
.
@endrst
@param self A pointer to an uninitialised tsk_table_sorter_t object. @param tables The table collection to sort. @param options Sorting options. @return Return 0 on success or a negative value on failure.