Struct self_compare::Comparer
[−]
[src]
pub struct Comparer<'a, T: 'a> { /* fields omitted */ }A structure for comparing the elements of a slice with themselves
Methods
impl<'a, T: 'a> Comparer<'a, T>[src]
fn new(list: &'a mut [T]) -> Self[src]
Returns a Comparer
fn indices(&self) -> (usize, usize)[src]
Returns the indices of the next two elements to be compared
fn next(&mut self) -> Option<(&mut T, &mut T)>[src]
Optionally returns mutable reference to two elements until all elements have been compared
fn next_enumerated(&mut self) -> Option<((usize, &mut T), (usize, &mut T))>[src]
Same as next() but also returns the indices of the elements