úÎ!l`es      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQ 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 r None,-.456=>?@AHMUVXkÁ1 None,-.456=>?@AHMUVXkÚNone,-.456=>?@AHMUVXkUgridsPRepresents valid dimensionalities. All non empty lists of Nats have an instance gridsGet the total size of a Grid of the given dimensions gridSize (Proxy @'[2, 2]) == 4 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%&',-.1456=>?@AHMUVXgkgridsThe 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] NothinggridsGet the first index from a grids Append two s  None,-.456=>?@AHMUVXk\%&%&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]]0grids5Build a grid by selecting an element for each element1gridsTTurn 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]]2gridsyTurn 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) Nothing3gridsPartial variant of 2 which errors on malformed input4gridsRConvert 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) Nothing5gridsPartial variant of 4 which errors on malformed input6gridsUpdate elements of a grid7gridsThe inverse of 8[, 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] a8gridsThe inverse of 7, 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) *+,-./012345678,-./ 0123456*+78None,-.456=>?@AHMSUVXk0ŋJgridsFocus an element of a , given its GHIJHGIJNone%*,-.456;<=>?@AHMUVXkPrKgridsÁ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 :: (IsGrid 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)Lgrids#This is a fully generic version of K˜ 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.Mgrids+Given a coordinate generate a grid of size MM filled with coordinates surrounding the given coord. Mostly used internallyNgrids Use with KA; Clamp out-of-bounds coordinates to the nearest in-bounds coord.Ogrids Use with KL; Wrap out-of-bounds coordinates pac-man style to the other side of the gridPgrids Use with K; Out of bounds coords become sKgrids4Restrict out of bounds coordinates in some way. Use  clampWindow,  wrapWindow or  safeWindowgrids$Collapse the context down to a valuegrids Starting gridLgridsCBuild a neighboring context within a functor from the current coordgrids&Collapse the context to a single valuegrids Starting grid*KLMNOPKLNOPM* None%,-.456;<=>?@AHMUVXkQ QRSSRQ None,-.456=>?@ACHMUVXk_ËVgrids9Get the inverse of a permutation pattern, used internallyYgridsPermute dimensions of a ,/. This is similar to MatLab's permute functionYi 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 [ †ģ> 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]]ZgridsPPermute the dimensions of a coordinate according to a permutation pattern. see Y regarding permutation patterns[grids0Transpose a 2 dimensional matrix. Equivalent to: permute @[1, 0]VWXYZ[XWYZ[VNone,-.456=>?@AHMUVXk`Ņ) *,-./012345678JKLMNOPRSWXYZ[),-.0234516JKLMSRNOP[YZ78/ *WX None,-.456=>?@AHMUVXkbī\]^_`abcdefghijk\]^_`abcdefghijk None %,-.456=>?@AHMUVXkdUlmnopqrlmnopqrNone,-.456=>?@AHMUVXkektuvwxyz{| !"##$%&'()*+,-./0123456789:;<=>>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`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.5.0.0-2AVBSUlP0cCDhsQTWZLmAYData.Grid.Internal.Errors Data.GridData.Grid.Internal.NestedListsData.Grid.Internal.CoordData.Grid.Internal.PrettyData.Grid.Internal.GridData.Grid.Internal.LensData.Grid.Internal.ConvolutionData.Grid.Internal.ShapesData.Grid.Internal.TransposeData.Grid.Examples.IntroData.Grid.Examples.ConwayData.Grid.Internal.Nest Paths_gridsbase GHC.TypeLitsText:<>::$$:ShowType&adjunctions-4.4-J8nZ5egZ0xU2d8YwbV1sWVData.Functor.Repindextabulate ErrorMessage?!Sizable nestLists unNestListsgridSize NestedLists chunkVector $fSizable: $fSizable:0CoordunCoord:#coordunconsCappendC highestIndexclamp clampCoord wrapCoordcoerceCoordDims coordInBounds $fEnumCoord $fEnumCoord0$fBoundedCoord$fBoundedCoord0 $fNumCoord $fIsListCoord $fEqCoord $fShowCoord PrettyList prettyList$fPrettyList[]$fPrettyList[]0$fPrettyList[]1 NeighboringneighborCoordsGridtoVectorIsGridgenerate toNestedListsfromNestedListsfromNestedLists'fromList fromList'//joinGrid splitGrid$fNeighboring:$fNeighboring:0 $fNumGrid$fRepresentableGrid$fDistributiveGrid$fApplicativeGrid $fMonoidGrid$fSemigroupGrid $fShowGrid$fEqGrid $fFunctorGrid$fFoldableGrid$fTraversableGrid $fNFDataGridLens'Lenslenscell autoConvolute convolutewindow clampBounds wrapBounds omitBoundsCentered centerCoordpartitionFocus $fCentered: $fCentered:0 InvertKeyValidPermutationPermutedpermute permuteCoord transpose simpleGrid coordGridavgmx verySmallsmallsmall'medbiggauss clampGaussseeNeighboringcoords doubleGrid simpleGauss pacmanGaussrule'stepgliderstartsimulateshowBoolshowGrid GHC.MaybeNothingversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName