pub struct Day21 { /* private fields */ }
Expand description
2017 Day 21: Iteratively applying pixel transformations.
The key optimization is that every three iterations a 3x3 square splits into nine independent 3x3 squares. Therefore, we can store counts for each of the 512 unique 3x3 squares and simulate three iterations at a time for each square to find the counts for the following three iterations
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Day21
impl RefUnwindSafe for Day21
impl Send for Day21
impl Sync for Day21
impl Unpin for Day21
impl UnwindSafe for Day21
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)