pub struct KolakoskiData { /* private fields */ }Expand description
Use this if you want to efficiently create several iterators starting at different values of n, or if you want more control over the initialisation of the iterator.
Implementations§
Source§impl KolakoskiData
impl KolakoskiData
Sourcepub fn new(d_max: usize) -> Self
pub fn new(d_max: usize) -> Self
Creates the lookup tables used in the initialisation of the main iterator. It takes time and space exponential in d_max, but provides exponential speedup for the iterator initialisation, as compared to the default case d_max = 0, i.e. when no lookup tables are generated. Meaningful values of d_max are usually in the range 15–32. See Brent’s slides for the details. The function panics if d_max is 64 or more.
Kolakoski::new uses this under the hood, while Kolakoski::new_from explicitly takes a reference to a structure created by this method.
Trait Implementations§
Source§impl Clone for KolakoskiData
impl Clone for KolakoskiData
Source§fn clone(&self) -> KolakoskiData
fn clone(&self) -> KolakoskiData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KolakoskiData
impl Debug for KolakoskiData
Auto Trait Implementations§
impl Freeze for KolakoskiData
impl RefUnwindSafe for KolakoskiData
impl Send for KolakoskiData
impl Sync for KolakoskiData
impl Unpin for KolakoskiData
impl UnwindSafe for KolakoskiData
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