Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype DimIx ix = DimIx Dim
- newtype SzNE ix = SzNE {}
- data SzIx ix = SzIx (Sz ix) ix
- newtype SzTiny ix = SzTiny {}
- ixToList :: Index ix => ix -> [Int]
- arbitraryIx1 :: Gen Int
- toIx :: forall ix' ix. (Dimensions ix' ~ Dimensions ix, Index ix', Index ix) => ix -> ix'
- specIx1 :: Spec
- ixSpec :: forall ix. (Typeable (Lower ix), Arbitrary (Lower ix), Typeable ix, Index ix, Arbitrary ix, IsIndexDimension ix (Dimensions ix)) => Spec
- ix2UpSpec :: forall ix. (Index ix, Index (Lower ix), Arbitrary ix, Arbitrary (Lower ix), Typeable (Lower ix)) => Spec
- ixNumSpec :: forall ix. (Typeable ix, Num ix, Index ix, Arbitrary ix) => Spec
- szNumSpec :: forall ix. (Typeable ix, Num ix, Index ix, Arbitrary ix) => Spec
- szSpec :: forall ix. (Index ix, Arbitrary ix) => Spec
- module Data.Massiv.Core.Index
Documentation
Dimension that is always within bounds of an index
Instances
Size that will result in a non-empty array.
prop > (neSz :: Sz1) -> totalElem (unSzNE neSz) > 0 prop > (neSz :: Sz2) -> totalElem (unSzNE neSz) > 0 prop > (neSz :: Sz3) -> totalElem (unSzNE neSz) > 0 prop > (neSz :: Sz4) -> totalElem (unSzNE neSz) > 0 prop > (neSz :: Sz5) -> totalElem (unSzNE neSz) > 0
Non-empty size together with an index that is within bounds of that index.
arbitraryIx1 :: Gen Int Source #
Generators are quadratic in QuickCheck. Unlike built-in Arbitrary instance for Int
,
this one generates smaller integers
Since: 0.1.0
toIx :: forall ix' ix. (Dimensions ix' ~ Dimensions ix, Index ix', Index ix) => ix -> ix' Source #
A fairly slow way to convert from one arbitrary index to another of the same dimension
Since: 0.1.0
Specs
Index
ixSpec :: forall ix. (Typeable (Lower ix), Arbitrary (Lower ix), Typeable ix, Index ix, Arbitrary ix, IsIndexDimension ix (Dimensions ix)) => Spec Source #
ix2UpSpec :: forall ix. (Index ix, Index (Lower ix), Arbitrary ix, Arbitrary (Lower ix), Typeable (Lower ix)) => Spec Source #
ixNumSpec :: forall ix. (Typeable ix, Num ix, Index ix, Arbitrary ix) => Spec Source #
Spec that validates the Num instance for any `Index ix => ix`
Size
szNumSpec :: forall ix. (Typeable ix, Num ix, Index ix, Arbitrary ix) => Spec Source #
Spec that validates the Num instance for any `Index ix => Sz ix`
Re-exports
module Data.Massiv.Core.Index
Orphan instances
Function Ix2 Source # | |
Function Ix3 Source # | |
Function Ix4 Source # | |
Function Ix5 Source # | |
Arbitrary Ix2 Source # | |
Arbitrary Ix3 Source # | |
Arbitrary Ix4 Source # | |
Arbitrary Ix5 Source # | |
Arbitrary Dim Source # | |
Arbitrary Ix0 Source # | |
CoArbitrary Ix2 Source # | |
coarbitrary :: Ix2 -> Gen b -> Gen b # | |
CoArbitrary Ix3 Source # | |
coarbitrary :: Ix3 -> Gen b -> Gen b # | |
CoArbitrary Ix4 Source # | |
coarbitrary :: Ix4 -> Gen b -> Gen b # | |
CoArbitrary Ix5 Source # | |
coarbitrary :: Ix5 -> Gen b -> Gen b # | |
Arbitrary e => Arbitrary (Border e) Source # | |
(Index ix, Arbitrary ix) => Arbitrary (Stride ix) Source # | |
(Index ix, Arbitrary ix) => Arbitrary (Sz ix) Source # | |