pub struct Treerder<T>where
T: Orderable,{ /* private fields */ }Expand description
Treerder is coupled with Orderable. Enables ordering of any impl Orderable type by
its char sequence representation.
For details see fn order.
Implementations§
Source§impl<T> Treerder<T>where
T: Orderable,
impl<T> Treerder<T>where
T: Orderable,
Sourcepub fn new() -> Self
pub fn new() -> Self
Constructs default version of Treerder, i.e. via
fn new_with() with english_letters::ALPHABET_LEN and english_letters::ix.
Sourcepub fn new_with(ix: Ix, ab_len: usize) -> Self
pub fn new_with(ix: Ix, ab_len: usize) -> Self
Allows to use custom alphabet different from default alphabet. See fn new().
For details see module english_letters.
Sourcepub fn order(&mut self, ts: &mut [T])
pub fn order(&mut self, ts: &mut [T])
Stable ordering.
⚠️ impl Orderable recreations made out of Orderable::Shadow replace
originals in input without dropping them.
For details see Orderable.
- TC: Ο(s) where s is sum of all
chars iterated over. - SC: Θ(q) where q is number of unique nodes, i.e.
chars in respective branches.
Auto Trait Implementations§
impl<T> Freeze for Treerder<T>
impl<T> RefUnwindSafe for Treerder<T>
impl<T> Send for Treerder<T>
impl<T> Sync for Treerder<T>
impl<T> Unpin for Treerder<T>
impl<T> UnwindSafe for Treerder<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more