Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- type Cube a = Vector (Vector (Vector a))
- pretty :: Show a => String -> Cube a -> IO ()
- isNull :: Matrix a -> Bool
- size :: Cube a -> (Int, Int, Int)
- wellFormed :: Cube a -> Cube a
- cube :: Int -> Int -> Int -> [a] -> Cube a
- fromCube :: Cube a -> [a]
- unit :: a -> Cube a
- fanout :: a -> Cube a
- indexes :: Cube (Int, Int, Int)
- transpose :: Cube a -> Cube a
- transpose' :: Cube a -> Cube a
- farm11 :: (a -> b) -> Cube a -> Cube b
- farm21 :: (a -> b -> c) -> Cube a -> Cube b -> Cube c
- farm31 :: (a -> b -> c -> d) -> Cube a -> Cube b -> Cube c -> Cube d
- reduce :: (a -> a -> a) -> Cube a -> a
- get :: Int -> Int -> Int -> Cube a -> Maybe a
- take :: Int -> Int -> Int -> Cube a -> Cube a
- drop :: Int -> Int -> Int -> Cube a -> Cube a
Documentation
Prints out to the terminal a cube in a readable format, where all elements are right-aligned and separated by a custom separator.
>>>
let m = cube 2 2 2 [1,2,3,3,100,4,12,32]
>>>
pretty "|" m
-------- 1|2 3|3 -------- 100| 4 12|32 --------
wellFormed :: Cube a -> Cube a Source #
See wellFormed
.
:: Int | number of columns (X dimension) |
-> Int | number of rows (Y dimension) |
-> Int | depth (Z dimension) |
-> [a] | list of values; length = |
-> Cube a |
|
See cube
.
:: (a -> b -> c) | |
-> Cube a | size = |
-> Cube b | size = |
-> Cube c | size = |
See farm21
.
:: (a -> b -> c -> d) | |
-> Cube a | size = |
-> Cube b | size = |
-> Cube c | size = |
-> Cube d | size = |
See farm31
.
:: Int | X index starting from zero |
-> Int | Y index starting from zero |
-> Int | Z index starting from zero |
-> Cube a | |
-> Maybe a |
See get
.