pub unsafe extern "C" fn tsk_table_sorter_run(
    self_: *mut _tsk_table_sorter_t,
    start: *const tsk_bookmark_t
) -> c_int
Expand description

@brief Runs the sort using the configured functions.

@rst Runs the sorting process:

  1. Drop the table indexes.
  2. If the sort_edges function 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 value start.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.
  3. Sort the site table, building the mapping between site IDs in the current and sorted tables.
  4. Sort the mutation table, using the sort_mutations pointer.

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.