pub unsafe extern "C" fn tsk_table_sorter_run(
self_: *mut _tsk_table_sorter_t,
start: *const tsk_bookmark_t,
) -> c_intAvailable on crate feature
bindings only.Expand description
@brief Runs the sort using the configured functions.
@rst Runs the sorting process:
- Drop the table indexes.
- If the
sort_edgesfunction pointer is not NULL, run it. The first parameter to the called function will be a pointer to this table_sorter_t object. The second parameter will be the valuestart.edges. This specifies the offset at which sorting should start in the edge table. This offset is guaranteed to be within the bounds of the edge table. - Sort the site table, building the mapping between site IDs in the current and sorted tables.
- Sort the mutation table, using the
sort_mutationspointer.
If an error occurs during the execution of a user-supplied
sorting function a non-zero value must be returned. This value
will then be returned by tsk_table_sorter_run. The error
return value should be chosen to avoid conflicts with tskit error
codes.
See :c:func:tsk_table_collection_sort for details on the start parameter.
@endrst
@param self A pointer to a tsk_table_sorter_t object. @param start The position in the tables at which sorting starts. @return Return 0 on success or a negative value on failure.