aboutsummaryrefslogtreecommitdiff
path: root/src/ring_buffer.rs
Commit message (Collapse)AuthorAgeFilesLines
* Add day 6 solutions. Both, naive and more elaborate.Andreas Grois2021-12-111-0/+121
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.