Trait toodee::SortOps[][src]

pub trait SortOps<T>: TooDeeOpsMut<T> {
    fn sort_row_ord<F>(&mut self, row: usize)
    where
        T: Ord
, { ... }
fn sort_unstable_row_ord<F>(&mut self, row: usize)
    where
        T: Ord
, { ... }
fn sort_by_row<F>(&mut self, row: usize, compare: F)
    where
        F: FnMut(&T, &T) -> Ordering
, { ... }
fn sort_unstable_by_row<F>(&mut self, row: usize, compare: F)
    where
        F: FnMut(&T, &T) -> Ordering
, { ... }
fn sort_by_row_key<B, F>(&mut self, row: usize, f: F)
    where
        B: Ord,
        F: FnMut(&T) -> B
, { ... }
fn sort_unstable_by_row_key<B, F>(&mut self, row: usize, f: F)
    where
        B: Ord,
        F: FnMut(&T) -> B
, { ... }
fn sort_col_ord<F>(&mut self, col: usize)
    where
        T: Ord
, { ... }
fn sort_by_col<F>(&mut self, col: usize, compare: F)
    where
        F: FnMut(&T, &T) -> Ordering
, { ... }
fn sort_unstable_by_col<F>(&mut self, col: usize, compare: F)
    where
        F: FnMut(&T, &T) -> Ordering
, { ... }
fn sort_by_col_key<B, F>(&mut self, col: usize, f: F)
    where
        B: Ord,
        F: FnMut(&T) -> B
, { ... }
fn sort_unstable_by_col_key<B, F>(&mut self, col: usize, f: F)
    where
        B: Ord,
        F: FnMut(&T) -> B
, { ... } }

Provides sorting capabilities to two-dimensional arrays. Sorting of the rows and columns is performed in-place, and care is taken to minimise row/col swaps. This is achieved by sorting the row/col and original index pair, then repositioning the rows/columns once the new ordering has been determined.

Provided methods

fn sort_row_ord<F>(&mut self, row: usize) where
    T: Ord
[src]

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
[src]

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
[src]

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
[src]

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, 
[src]

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, 
[src]

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
[src]

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
[src]

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
[src]

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, 
[src]

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, 
[src]

Sort the entire two-dimensional array by comparing elements on a specific column using a key extraction function. This sort is unstable.

Loading content...

Implementors

impl<T, O> SortOps<T> for O where
    O: TooDeeOpsMut<T>, 
[src]

Loading content...