pub trait Bogosort<T: PartialEq + PartialOrd + Clone + Copy> {
    fn bogosort(&mut self);
fn bogosort_timed(&mut self) -> Duration;
fn bogosort_stepped(&mut self) -> Vec<Vec<T>>;
fn bogosort_stepped_and_timed(&mut self) -> (Vec<Vec<T>>, Duration); }
Expand description

A trait providing the bogosort method.

Required methods

The bogosort algorithm.

Sorts the Vec it is called on – or dies trying.

The bogosort algorithm but timed.

Sorts the Vec it is called on and returns the Duration of the process – or dies trying.

The bogosort algorithm but stepped.

Sorts the Vec it is called on and returns a Vec containing each step of the process – or dies trying.

The bogosort 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 – or dies trying.

Implementations on Foreign Types

The trait implementation of the bogosort algorithm.

Implementors