aboutsummaryrefslogtreecommitdiff
path: root/src/day6.rs
Commit message (Collapse)AuthorAgeFilesLines
* Pre-Multiply conversion back to fish-space and sum-up operation.Andreas Grois2021-12-111-108/+14
| | | | This saves 72 complex constants.
* Add day 6 solutions. Both, naive and more elaborate.Andreas Grois2021-12-111-0/+693
The naive implementation uses simple ring buffers and scales linearly with the number of days needed. The matrix based implementation uses matrix multiplication (implemented in a brain-dead way inline here) and has the same scaling behaviour, however implementing it showed that the matrix is correct. The closed form is, well, a closed form based on the matrix based solution, but working in the matrix' Eigenspace.