Index types.
- data Z = Z
- data tail :. head = tail :. head
- type DIM0 = Z
- type DIM1 = DIM0 :. Int
- type DIM2 = DIM1 :. Int
- type DIM3 = DIM2 :. Int
- type DIM4 = DIM3 :. Int
- type DIM5 = DIM4 :. Int
- arbitraryShape :: (Shape sh, Arbitrary sh) => Gen (sh :. Int)
- arbitrarySmallShape :: (Shape sh, Arbitrary sh) => Int -> Gen (sh :. Int)
- props_DataArrayRepaIndex :: [(String, Property)]
Index types
Our index type, used for both shapes and indices.
tail :. head |
(Eq tail, Eq head) => Eq (:. tail head) | |
(Ord tail, Ord head) => Ord (:. tail head) | |
(Show tail, Show head) => Show (:. tail head) | |
(Shape sh, Arbitrary sh) => Arbitrary (:. sh Int) | Generate an arbitrary index, which may have 0's for some components. |
Shape sh => Shape (:. sh Int) | |
Slice sl => Slice (:. sl All) | |
Slice sl => Slice (:. sl Int) |
Common dimensions.
Testing
arbitraryShape :: (Shape sh, Arbitrary sh) => Gen (sh :. Int)Source
Generate an aribrary shape that does not have 0's for any component.
arbitrarySmallShape :: (Shape sh, Arbitrary sh) => Int -> Gen (sh :. Int)Source
Generate an arbitrary shape where each dimension is more than zero, but less than a specific value.
props_DataArrayRepaIndex :: [(String, Property)]Source
QuickCheck properties for this module.