Skip to content

Commit

Permalink
Remove final rotation in mzeng
Browse files Browse the repository at this point in the history
  • Loading branch information
andrews05 committed Apr 3, 2024
1 parent 3a387b3 commit 5b7cb88
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/reduction/palette.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ fn mzeng_reindex(num_colors: usize, edges: Vec<(usize, usize)>, matrix: &[Vec<u3
sums.push(sum);
}

let mut shift = 0;
while !sums.is_empty() {
let best_index = best_sum.0;
// Compute delta to know if we need to prepend or append the best index.
Expand All @@ -330,7 +329,6 @@ fn mzeng_reindex(num_colors: usize, edges: Vec<(usize, usize)>, matrix: &[Vec<u3
}
if delta > 0 {
remapping.insert(0, best_index);
shift += 1;
} else {
remapping.push(best_index);
}
Expand All @@ -349,8 +347,6 @@ fn mzeng_reindex(num_colors: usize, edges: Vec<(usize, usize)>, matrix: &[Vec<u3
}
}
}
// Keep the original best index first
remapping.rotate_left(shift);

// Return the completed remapping
remapping
Expand Down

0 comments on commit 5b7cb88

Please sign in to comment.