pub trait Slowsort<T: PartialEq + PartialOrd + Clone + Copy> {
// Required methods
fn slowsort(&mut self);
fn slowsort_timed(&mut self) -> Duration;
fn slowsort_stepped(&mut self) -> Vec<Vec<T>>;
fn slowsort_stepped_and_timed(&mut self) -> (Vec<Vec<T>>, Duration);
}Expand description
A trait providing the slowsort algorithm.
Required Methods§
Sourcefn slowsort_timed(&mut self) -> Duration
fn slowsort_timed(&mut self) -> Duration
The slowsort algorithm but timed.
Sorts the Vec it is called on and returns the Duration of the process.
Sourcefn slowsort_stepped(&mut self) -> Vec<Vec<T>>
fn slowsort_stepped(&mut self) -> Vec<Vec<T>>
The slowsort algorithm but stepped.
Sorts the Vec it is called on and returns a Vec containing each step of the process.
Sourcefn slowsort_stepped_and_timed(&mut self) -> (Vec<Vec<T>>, Duration)
fn slowsort_stepped_and_timed(&mut self) -> (Vec<Vec<T>>, Duration)
The slowsort algorithm but stepped and timed.
Sorts the Vec it is called on and returns a Vec containing each step of the process,
including the Duration of the entire process.