The current implementation of ts::table_collection::sort_edges uses an offset value to minimize the amount of sorting to do. However, this approach is only correct when all individuals are replaced at each time step.
The best solution is probably to deprecate the current API and replace with a more general standalone function.
The current implementation of
ts::table_collection::sort_edges
uses an offset value to minimize the amount of sorting to do. However, this approach is only correct when all individuals are replaced at each time step.The best solution is probably to deprecate the current API and replace with a more general standalone function.