Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Grid compression
- type Length = Int
- type CompressedGrid = [CompressedRow]
- type CompressedRow = (BoxRow, CompressedCols)
- type CompressedCols = [CompressedCol]
- type CompressedCol = (BoxCol, Length)
- compressGrid :: Grid -> CompressedGrid
- compressRow :: Row -> CompressedGrid
- compressBoxes :: [Box] -> CompressedGrid
- compressGroupedRows :: GroupedByRow -> CompressedGrid
- compressGroupedRow :: GroupedRow -> CompressedRow
- compressCols :: [BoxCol] -> CompressedCols
- fromCols :: [BoxCol] -> CompressedCols
- mergeCols :: CompressedCols -> CompressedCols
Documentation
type CompressedGrid = [CompressedRow] Source #
Compressed grid
type CompressedRow = (BoxRow, CompressedCols) Source #
Compressed row
type CompressedCols = [CompressedCol] Source #
Compressed cols
type CompressedCol = (BoxCol, Length) Source #
Compressed col
compressGrid :: Grid -> CompressedGrid Source #
Compress grid
compressRow :: Row -> CompressedGrid Source #
Compress row
compressBoxes :: [Box] -> CompressedGrid Source #
Compress boxes
compressGroupedRows :: GroupedByRow -> CompressedGrid Source #
Compress grouped rows
compressGroupedRow :: GroupedRow -> CompressedRow Source #
Compress grouped row
compressCols :: [BoxCol] -> CompressedCols Source #
Compress cols
fromCols :: [BoxCol] -> CompressedCols Source #
Convert list of box cols to compressed cols with length = 1
mergeCols :: CompressedCols -> CompressedCols Source #
Merge cols that have neighbours. Each col a and b is merged to c. The index of c is the index of a and the length of c is the sum of length a and b.