| License | BSD-3-Clause |
|---|---|
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Swarm.Game.Scenario.Topography.Structure.Recognition.Symmetry
Description
Symmetry analysis for structure recognizer.
Synopsis
- checkSymmetry :: (MonadFail m, Eq a) => NamedGrid a -> m (SymmetryAnnotatedGrid (NamedGrid a))
Documentation
checkSymmetry :: (MonadFail m, Eq a) => NamedGrid a -> m (SymmetryAnnotatedGrid (NamedGrid a)) Source #
Warns if any recognition orientations are redundant by rotational symmetry. We can accomplish this by testing only two rotations:
- Rotate 90 degrees. If identical to the original orientation, then has 4-fold symmetry and we don't need to check any other orientations. Warn if more than one recognition orientation was supplied.
- Rotate 180 degrees. At best, we may now have 2-fold symmetry. Warn if two opposite orientations were supplied.