The current implementation of fwdpp::ts::make_mut_queue is O(NlogN), but it can be O(N). The sorting step is unnecessary. Instead, we can simply use the input data to mark the mindexes vector with a value like UINT_MAX, and we can then add all value != UINT_MAX to the output.
The current implementation of
fwdpp::ts::make_mut_queue
isO(NlogN)
, but it can beO(N)
. The sorting step is unnecessary. Instead, we can simply use the input data to mark themindexes
vector with a value like UINT_MAX, and we can then add all value != UINT_MAX to the output.