Copyright | (c) Eric Mertens 2021 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
https://adventofcode.com/2021/day/19
To correlate all the scanner readings this program selects the first scanner to be "correct". All other scanners will be oriented relative to the first scanner. As each scanner's location is fixed it will be queued to be compared to all the uncorrelated scanner outputs. Scanning in this order ensures no pair of scanners is compared more than once.
Synopsis
- main :: IO ()
- start :: [[Coord3]] -> [(Coord3, Set Coord3)]
- assemble :: [[Coord3]] -> [(Coord3, Set Coord3)] -> [(Coord3, Set Coord3)]
- match :: Set Coord3 -> [Coord3] -> Maybe (Coord3, Set Coord3)
- prefilter :: [Coord3] -> [Coord3]
- reorient :: [Coord3] -> [[Coord3]]
- faces :: Coord3 -> [Coord3]
- rotations :: Coord3 -> [Coord3]
Documentation
:: [[Coord3]] | uncorrelated scanner readings |
-> [(Coord3, Set Coord3)] | correlated scanner locations and readings |
Starts the scanner reading correlation algorithm.
:: [[Coord3]] | uncorrelated scanner readings |
-> [(Coord3, Set Coord3)] | recently correlated scanners |
-> [(Coord3, Set Coord3)] | completed correlated locations and readings |
Worker for start
.