úÎlïi*      !"#$%&'()portable experimentalamy@nualeargais.ie Safe-Inferred0A parallelogramatical grid with hexagonal tiles G The grid and its indexing scheme are illustrated in the user guide,  available at  %https://github.com/mhwombat/grid/wiki. &A hexagonal grid with hexagonal tiles G The grid and its indexing scheme are illustrated in the user guide,  available at  %https://github.com/mhwombat/grid/wiki. #A toroidal grid with square tiles. G The grid and its indexing scheme are illustrated in the user guide,  available at  %https://github.com/mhwombat/grid/wiki. &A rectangular grid with square tiles. G The grid and its indexing scheme are illustrated in the user guide,  available at  %https://github.com/mhwombat/grid/wiki. 3A Parallelogrammatical grid with triangular tiles. G The grid and its indexing scheme are illustrated in the user guide,  available at  %https://github.com/mhwombat/grid/wiki. )A triangular grid with triangular tiles. G The grid and its indexing scheme are illustrated in the user guide,  available at  %https://github.com/mhwombat/grid/wiki.  A regular arrangement of tiles.  Minimal complete definition: indices, distance, and size. ,Returns the indices of all tiles in a grid.  a b5 returns the minimum number of moves required to get  from a to b9, moving between adjacent tiles at each step. (Two tiles + are adjacent if they share an edge.) If a or b are not contained  within g, the result is undefined. %Returns the dimensions of the grid.  For example, if g is a 4x3 rectangular grid,   g would return  (4, 3), while   g would return 12.   x g. returns the indices of the tiles in the grid g % which are adjacent to the tile at x. x   g returns true if the index x is contained within g,  otherwise it returns false.   x g7 returns a list of pairs associating the index of each  tile in g* with its distance to the tile with index x. If x is not  contained within g, the result is undefined. 4Returns the number of tiles in a grid. Compare with  . Returns True+ if the number of tiles in a grid is zero, False  otherwise. Returns False+ if the number of tiles in a grid is zero, True  otherwise. DA list of all edges in a Grid, where the edges are represented by a  pair of adjacent tiles.  a b+ returns a list of all minimal paths from  a to b8. A path is a sequence of tiles, where each tile in the E sequence is adjacent to the previous one. (Two tiles are adjacent  if they share an edge.) If a or b are not contained  within g, the result is undefined. *FFor triangular tiles, it is convenient to define a third component z.  s* returns a triangular grid with sides of  length s, using triangular tiles. If s is nonnegative, the resulting  grid will have s^25 tiles. Otherwise, the resulting grid will be empty ) and the list of indices will be null.  r c# returns a grid in the shape of a  parallelogram with r rows and c# columns, using triangular tiles.  If r and c4 are both nonnegative, the resulting grid will have 2*r*c N tiles. Otherwise, the resulting grid will be empty and the list of indices  will be null.  r c" produces a rectangular grid with r rows and c # columns, using square tiles. If r and c are both nonnegative, the  resulting grid will have r*c, tiles. Otherwise, the resulting grid will 2 be empty and the list of indices will be null.  r c returns a toroidal grid with r  rows and c! columns, using square tiles. If r and c are 2 both nonnegative, the resulting grid will have r*c tiles. Otherwise, J the resulting grid will be empty and the list of indices will be null.  s) returns a grid of hexagonal shape, with  sides of length s, using hexagonal tiles. If s is nonnegative, the  resulting grid will have  3*s*(s-1) + 1" tiles. Otherwise, the resulting < grid will be empty and the list of indices will be null.  r c# returns a grid in the shape of a  parallelogram with r rows and c% columns, using hexagonal tiles. If  r and c4 are both nonnegative, the resulting grid will have r*c tiles. M Otherwise, the resulting grid will be empty and the list of indices will  be null. 1+,-./0 12*3456789:;<=>?@AB   +,-./0  12*3456789:;<=>?@ABportable experimentalamy@nualeargais.ie Safe-Inferred  portable experimentalamy@nualeargais.ie Safe-Inferred0A Map from tile positions in a grid to values. GConstruct a grid map which is strict in the keys (tile positions), but  lazy in the values.  O(min(n,W))1. Find the value at a tile position in the grid.  Calls C$ when the element can not be found.  O(min(n,W))7. Lookup the value at a tile position in the grid map.  O(min(n,W))<. Adjust a value at a specific tile position. When the tile D is not within the bounds of the grid map, the original grid map is  returned.  O(min(n,W))2. Adjust a value at a specific key. When the tile D is not within the bounds of the grid map, the original grid map is  returned.  O(min(n,W)). The expression ( def k map) $ returns the value at tile position k or returns def when the tile + is not within the bounds of the grid map. O(n)2. Map a function over all values in the grid map. O(n)2. Map a function over all values in the grid map. !O(n). The function ! threads an accumulating  argument through the grid map. K WARNING: The order in which the elements are processed is not guaranteed. "O(n). The function " threads an accumulating  argument through the grid map. K WARNING: The order in which the elements are processed is not guaranteed. #O(n)C. Fold the values in the grid map using the given left-associative  binary operator. K WARNING: The order in which the elements are processed is not guaranteed. $O(n)<. Fold the keys and values in the grid map using the given # left-associative binary operator. K WARNING: The order in which the elements are processed is not guaranteed. %O(n). A strict version of #. &O(n). A strict version of $. 'O(n). C Return all elements of the grid map. The order is not guaranteed. ( O(n*min(n,W))1. The set of all tile positions in the grid map. )O(n)!. Returns all key (tile position)/value pairs in the grid map. DEFGH !"#$%&'()IJ  !"#$%&'()  !"#$%&'()DEFGH !"#$%&'()IJK      !"#$%&'()*+,-. /0123456789:;<=>?@ABCDEFGHIJK grid-2.1.1Math.Geometry.GridInternalMath.Geometry.GridMapMath.Geometry.Grid ParaHexGrid HexHexGrid TorSquareGridRectSquareGrid ParaTriGrid TriTriGridGridindicesdistancesize neighboursinGrid viewpoint tileCountemptynonEmptyedges minimalPaths triTriGrid paraTriGridrectSquareGrid torSquareGrid hexHexGrid paraHexGridGridMap lazyGridMap!lookupadjust adjustWithKeyfindWithDefaultmap mapWithKeymapAccummapAccumWithKeyfold foldWithKeyfold' foldWithKey'elemskeysSettoListtriZsameEdge adjacentEdges triDistance triNeighbours inTriGrid hexDistance$fGridParaHexGrid(,)(,)$fShowParaHexGrid$fGridHexHexGridInt(,)$fShowHexHexGrid$fGridTorSquareGrid(,)(,)$fShowTorSquareGrid$fGridRectSquareGrid(,)(,)$fShowRectSquareGrid$fGridParaTriGrid(,)(,)$fShowParaTriGrid$fGridTriTriGridInt(,)$fShowTriTriGridbaseGHC.ErrerrorLGridMaptoGridtoMap modifyMap applyToMap$fGridGridMapsk $fShowGridMap