summaryrefslogtreecommitdiff
path: root/src/Lattice.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Lattice.hs')
-rw-r--r--src/Lattice.hs23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/Lattice.hs b/src/Lattice.hs
deleted file mode 100644
index b69aa41..0000000
--- a/src/Lattice.hs
+++ /dev/null
@@ -1,23 +0,0 @@
-module Lattice
- ( LatticeCell (..)
- , Lattice
- , LatticeRule
- , updateLattice
- ) where
-
-
-data LatticeCell a b = LatticeCell { kind :: a, flags :: b } deriving (Show, Eq)
-type Lattice a b = [[LatticeCell a b]]
-type LatticeRule a b = Lattice a b -> Int -> Int -> LatticeCell a b
-
-
-updateLattice :: (Enum a) => Lattice a b -> [LatticeRule a b] -> Lattice a b
-updateLattice lattice rules =
- let
- mapRow = \(row, y) -> map
- (\((LatticeCell k _), x) ->
- let rule = rules !! (fromEnum k)
- in rule lattice x y
- )
- (zip row [0..])
- in map mapRow (zip lattice [0..])