[−][src]Trait toodee::SortOps
Provides sorting capabilities to two-dimensional arrays. Sorting of the rows and columns is performed in-place, and care is taken to reduce row/col swaps. This is achieved by sorting with the original indices, then repositioning the rows/columns once the new sort order has been determined.
Provided methods
fn sort_row_ord<F>(&mut self, row: usize) where
T: Ord,
T: Ord,
Sort the entire two-dimensional array by comparing elements on a specific row, using the natural ordering. This sort is stable.
fn sort_unstable_row_ord<F>(&mut self, row: usize) where
T: Ord,
T: Ord,
Sort the entire two-dimensional array by comparing elements on a specific row, using the natural ordering. This sort is unstable.
fn sort_by_row<F>(&mut self, row: usize, compare: F) where
F: FnMut(&T, &T) -> Ordering,
F: FnMut(&T, &T) -> Ordering,
Sort the entire two-dimensional array by comparing elements on a specific row using the provided compare function. This sort is stable.
fn sort_unstable_by_row<F>(&mut self, row: usize, compare: F) where
F: FnMut(&T, &T) -> Ordering,
F: FnMut(&T, &T) -> Ordering,
Sort the entire two-dimensional array by comparing elements on a specific row using the provided compare function. This sort is unstable.
fn sort_by_row_key<B, F>(&mut self, row: usize, f: F) where
B: Ord,
F: FnMut(&T) -> B,
B: Ord,
F: FnMut(&T) -> B,
Sort the entire two-dimensional array by comparing elements on a specific row using a key extraction function. This sort is stable.
fn sort_unstable_by_row_key<B, F>(&mut self, row: usize, f: F) where
B: Ord,
F: FnMut(&T) -> B,
B: Ord,
F: FnMut(&T) -> B,
Sort the entire two-dimensional array by comparing elements on a specific row using a key extraction function. This sort is unstable.
fn sort_col_ord<F>(&mut self, col: usize) where
T: Ord,
T: Ord,
Sort the entire two-dimensional array by comparing elements on a specific column using the natural ordering. This sort is stable.
fn sort_by_col<F>(&mut self, col: usize, compare: F) where
F: FnMut(&T, &T) -> Ordering,
F: FnMut(&T, &T) -> Ordering,
Sort the entire two-dimensional array by comparing elements on in a specific column. This sort is stable.
fn sort_unstable_by_col<F>(&mut self, col: usize, compare: F) where
F: FnMut(&T, &T) -> Ordering,
F: FnMut(&T, &T) -> Ordering,
Sort the entire two-dimensional array by comparing elements on in a specific column. This sort is unstable.
fn sort_by_col_key<B, F>(&mut self, col: usize, f: F) where
B: Ord,
F: FnMut(&T) -> B,
B: Ord,
F: FnMut(&T) -> B,
Sort the entire two-dimensional array by comparing elements on a specific column using a key extraction function. This sort is stable.
fn sort_unstable_by_col_key<B, F>(&mut self, col: usize, f: F) where
B: Ord,
F: FnMut(&T) -> B,
B: Ord,
F: FnMut(&T) -> B,
Sort the entire two-dimensional array by comparing elements on a specific column using a key extraction function. This sort is unstable.