Struct timely_sort::LSBRadixSorter
[−]
[src]
pub struct LSBRadixSorter<T> { /* fields omitted */ }
A few buffers capable of radix sorting by least significant byte.
The sorter allows the use of multiple different key bytes, determined by a type U: Unsigned
.
Currently, one is allowed to mix and match these as records are pushed, which may be a design
bug.
Trait Implementations
impl<T, U: Unsigned> RadixSorter<T, U> for Sorter<T>
[src]
fn push<F: Fn(&T) -> U>(&mut self, element: T, function: &F)
Pushes a single element using the supplied radix key function.
fn push_batch<F: Fn(&T) -> U>(&mut self, batch: Vec<T>, function: &F)
Pushes a batch of elements using the supplied radix key function.
fn finish_into<F: Fn(&T) -> U>(
&mut self,
target: &mut Vec<Vec<T>>,
function: &F
)
&mut self,
target: &mut Vec<Vec<T>>,
function: &F
)
Completes the sorting session and puts the sorted results into target
.
fn extend<F: Fn(&T) -> U, I: Iterator<Item = T>>(
&mut self,
iterator: I,
key: &F
)
&mut self,
iterator: I,
key: &F
)
Pushes a sequence of elements using the supplied radix key function.
fn finish<F: Fn(&T) -> U>(&mut self, key: &F) -> Vec<Vec<T>>
Completes the sorting session and returns the sorted results.
fn sort<F: Fn(&T) -> U>(&mut self, batches: &mut Vec<Vec<T>>, key: &F)
Sorts batched data using the supplied radix key function.
impl<T> RadixSorterBase<T> for Sorter<T>
[src]
fn new() -> Self
Allocates a new instance of the radix sorter.
fn rebalance(&mut self, buffers: &mut Vec<Vec<T>>, intended: usize)
Provides empty buffers for the radix sorter to use, with the intent that it should own at most intended
.
fn recycle(&mut self, buffers: &mut Vec<Vec<T>>)
Provides empty buffers for the radix sorter to use.