úÎ!l%ecr      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q None%&',-.1456=>?@AHMUVXgk ÀgridsThe index type for Grids. gridsSafely construct a ? for a given grid size, checking that all indexes are in range h»> coord @[3, 3] [1, 2] Just [1, 2] »> coord @[3, 3] [3, 3] Nothing »> coord @[3, 3] [1, 2, 3] Nothing gridsGet the first index from a  grids Append two sgridsGet the total size of a Grid of the given dimensions gridSize @'[2, 2] == 4  None,-.456=>?@AHMUVXk1None,-.456=>?@AHMUVXk[gridsPRepresents valid dimensionalities. All non empty lists of Nats have an instance!gridsaComputes the level of nesting requried to represent a given grid dimensionality as a nested list HNestedLists [2, 3] Int == [[Int]] NestedLists [2, 3, 4] Int == [[[Int]]] !"#"!# None,-.456=>?@AHMUVXka&'&'None,-.456=>?@AHMUVXk%Ü+grids An grid of arbitrary dimensions.e.g. a Grid [2, 3] Int might look like: Rgenerate id :: Grid [2, 3] Int fromNestedLists [[0,1,2], [3,4,5]].grids5Build a grid by selecting an element for each element/gridsTTurn a grid into a nested list structure. List nesting increases for each dimension BtoNestedLists (G.generate id :: Grid [2, 3] Int) [[0,1,2],[3,4,5]]0gridsyTurn a nested list structure into a Grid if the list is well formed. Required list nesting increases for each dimension ™fromNestedLists [[0,1,2],[3,4,5]] :: Maybe (Grid [2, 3] Int) Just (Grid [[0,1,2],[3,4,5]]) fromNestedLists [[0],[1,2]] :: Maybe (Grid [2, 3] Int) Nothing1gridsPartial variant of 0 which errors on malformed input2gridsRConvert a list into a Grid or fail if not provided the correct number of elements ‘G.fromList [0, 1, 2, 3, 4, 5] :: Maybe (Grid [2, 3] Int) Just (Grid [[0,1,2],[3,4,5]]) G.fromList [0, 1, 2, 3] :: Maybe (Grid [2, 3] Int) Nothing3gridsPartial variant of 2 which errors on malformed input4gridsUpdate elements of a grid !+,-./01234+,- !./01234None,-.456=>?@AHMUVXk.ûAgridsThe inverse of B[, joinGrid will nest a grid from: > Grid outer (Grid inner a) -> Grid (outer ++ inner) aIFor example, you can nest a simple 3x3 from smaller [3] grids as follows: <joinGrid (myGrid :: Grid [3] (Grid [3] a)) :: Grid '[3, 3] aBgridsThe inverse of A, splitGrid  outerDims [innerDims will un-nest a grid from: > Grid (outer ++ inner) a -> Grid outer (Grid inner a)4For example, you can unnest a simple 3x3 as follows: 6splitGrid @'[3] @'[3] myGrid :: Grid '[3] (Grid [3] a)ABABNone,-.456=>?@AHMSUVXk0šFgridsFocus an element of a + given its CDEFDCEF None%*,-.456;<=>?@AHMUVXkP]HgridsÁPerform a computation based on the context surrounding a cell Good for doing things like Linear Image Filters (e.g. gaussian blur) or simulating Cellular Automata (e.g. Conway's game of life)BThis function accepts a function which indicates what to do with 'out-of-bounds' indexes,  clampWindow,  wrapWindow and  safeWindow are examples.¯It also acccepts a transformation function which operates over the functor created by the first parameter and collapses it down to a new value for the cell at that position.ÅThis function is best used with Type Applications to denote the desired window size; the Grid passed to the given function contains the current cell (in the middle) and all the surrounding cells.–Here's an example of computing the average of all neighboring cells, repeating values at the edge of the grid when indexes are out of bounds (using  clampWindow) Ægaussian :: (Dimensions dims) => Grid dims Double -> Grid dims Double gaussian = autoConvolute clampBounds avg where avg :: Grid '[3, 3] Double -> Double avg g = sum g / fromIntegral (length g)Igrids#This is a fully generic version of H˜ which allows the user to provide a function which builds a context from the current coord, then provides a collapsing function over the same functor.Jgrids+Given a coordinate generate a grid of size JM filled with coordinates surrounding the given coord. Mostly used internallyKgrids Use with HA; Clamp out-of-bounds coordinates to the nearest in-bounds coord.Lgrids Use with HL; Wrap out-of-bounds coordinates pac-man style to the other side of the gridMgrids Use with H; Out of bounds coords become rHgrids4Restrict out of bounds coordinates in some way. Use  clampWindow,  wrapWindow or  safeWindowgrids$Collapse the context down to a valuegrids Starting gridIgridsCBuild a neighboring context within a functor from the current coordgrids&Collapse the context to a single valuegrids Starting gridGHIJKLMHIKLMJG None%,-.456;<=>?@AHMUVXkQ‹PQRRQP None,-.456=>?@ACHMUVXk_¶Ugrids9Get the inverse of a permutation pattern, used internallyXgridsPermute dimensions of a +/. This is similar to MatLab's permute functionXi requires a type application containing a permutation pattern; The pattern is a re-ordering of the list [0..n]P which represents the new dimension order. For example the permutation pattern  [1, 2, 0]! when applied to the dimensions  [4, 5, 6] results in the dimensions  [5, 6, 4].0For 2 dimensional matrixes, a permutation using [1, 0] is simply a matrix Z †»> small fromNestedLists [[0,1,2] ,[3,4,5] ,[6,7,8]] »> permute @[1, 0] small fromNestedLists [[0,3,6] ,[1,4,7] ,[2,5,8]]YgridsPPermute the dimensions of a coordinate according to a permutation pattern. see X regarding permutation patternsZgrids0Transpose a 2 dimensional matrix. Equivalent to: permute @[1, 0]UVWXYZWVXYZUNone,-.456=>?@AHMUVXk`¼& !+,-./01234ABFGHIJKLMQRVWXYZ&+,-.0123/ 4FHIJRQKLMZXYAB!GVW None,-.456=>?@AHMUVXkbÂ[\]^_`abcdefghij[\]^_`abcdefghij None %,-.456=>?@AHMUVXkd(klmnopqklmnopqNone,-.456=>?@AHMUVXke>stuvwxyz{ !"#$%&'()*+,-./0123456789:;<==>?@ABCDEFGHIJKLMNOPQRSTUVW X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~  € ‚ƒ„…†‡ˆ‰Š‹Œ$grids-0.4.0.0-IB9V3f9Lz9TEjslLuvKqxVData.Grid.Internal.Errors Data.GridData.Grid.Internal.CoordData.Grid.Internal.NestedListsData.Grid.Internal.PrettyData.Grid.Internal.GridData.Grid.Internal.NestData.Grid.Internal.LensData.Grid.Internal.ConvolutionData.Grid.Internal.ShapesData.Grid.Internal.TransposeData.Grid.Examples.IntroData.Grid.Examples.Conway Paths_gridsbase GHC.TypeLitsText:<>::$$:ShowType&adjunctions-4.4-J8nZ5egZ0xU2d8YwbV1sWVData.Functor.Repindextabulate ErrorMessageCoordunCoord:#coordunconsCappendC highestIndexclamp clampCoord wrapCoordgridSizecoerceCoordDims coordInBounds $fEnumCoord $fEnumCoord0$fBoundedCoord$fBoundedCoord0 $fNumCoord $fIsListCoord $fEqCoord $fShowCoord?! Dimensions nestLists unNestLists NestedListsAllC chunkVector $fDimensions:$fDimensions:0 PrettyList prettyList$fPrettyList[]$fPrettyList[]0$fPrettyList[]1GridtoVectorgenerate toNestedListsfromNestedListsfromNestedLists'fromList fromList'// $fNumGrid$fRepresentableGrid$fDistributiveGrid$fApplicativeGrid $fMonoidGrid$fSemigroupGrid $fShowGrid$fEqGrid $fFunctorGrid$fFoldableGrid$fTraversableGrid $fNFDataGridjoinGrid splitGridLens'Lenslenscell Neighboring autoConvolute convolutewindow clampBounds wrapBounds omitBounds$fNeighboring:$fNeighboring:0Centered centerCoordpartitionFocus $fCentered: $fCentered:0 InvertKeyValidPermutationPermutedpermute permuteCoord transpose simpleGrid coordGridavgmx verySmallsmallsmall'medbiggauss clampGaussseeNeighboringcoords doubleGrid simpleGauss pacmanGaussrule'stepgliderstartsimulateshowBoolshowGrid GHC.MaybeNothingversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName