somehow fix normal select

This commit is contained in:
jacekpoz 2024-05-06 23:05:06 +02:00
parent f450688cfb
commit ac37939823
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8

View file

@ -53,8 +53,8 @@ impl NormalSelect {
let mut chunks = list.chunks(5)
.collect::<Vec<_>>();
for chunk in chunks.iter_mut() {
let chunk = self.insertion.sort(&chunk.to_vec());
for mut chunk in chunks.iter_mut().map(|c| c.to_vec()) {
self.insertion.sort_mut(&mut chunk);
medians.push(chunk[chunk.len() / 2]);
}