repa-3.4.1.4: High performance, regular, shape polymorphic parallel arrays.

Safe Haskell | None
Language | Haskell98

Data.Array.Repa.Arbitrary

Contents

- Arbitrary Unboxed Arrays
- Arbitrary Boxed Arrays
- Orphan instances

Synopsis

- arbitraryUShaped :: (Shape sh, Unbox a, Arbitrary a) => sh -> Gen (Array U sh a)
- forAllUShaped :: (Show sh, Show a, Unbox a, Testable prop, Shape sh, Arbitrary a) => sh -> (Array U sh a -> prop) -> Property
- forAll2UShaped :: (Show sh, Show a, Unbox a, Testable prop, Shape sh, Arbitrary a) => sh -> ((Array U sh a, Array U sh a) -> prop) -> Property
- forAll3UShaped :: (Show sh, Show a, Unbox a, Testable prop, Shape sh, Arbitrary a) => sh -> ((Array U sh a, Array U sh a, Array U sh a) -> prop) -> Property
- forAll4UShaped :: (Show sh, Show a, Unbox a, Testable prop, Shape sh, Arbitrary a) => sh -> ((Array U sh a, Array U sh a, Array U sh a, Array U sh a) -> prop) -> Property
- forAll5UShaped :: (Show sh, Show a, Unbox a, Testable prop, Shape sh, Arbitrary a) => sh -> ((Array U sh a, Array U sh a, Array U sh a, Array U sh a, Array U sh a) -> prop) -> Property
- arbitraryVShaped :: (Shape sh, Arbitrary a) => sh -> Gen (Array V sh a)
- forAllVShaped :: (Show sh, Show a, Testable prop, Shape sh, Arbitrary a) => sh -> (Array V sh a -> prop) -> Property
- forAll2VShaped :: (Show sh, Show a, Testable prop, Shape sh, Arbitrary a) => sh -> ((Array V sh a, Array V sh a) -> prop) -> Property
- forAll3VShaped :: (Show sh, Show a, Testable prop, Shape sh, Arbitrary a) => sh -> ((Array V sh a, Array V sh a, Array V sh a) -> prop) -> Property
- forAll4VShaped :: (Show sh, Show a, Testable prop, Shape sh, Arbitrary a) => sh -> ((Array V sh a, Array V sh a, Array V sh a, Array V sh a) -> prop) -> Property
- forAll5VShaped :: (Show sh, Show a, Testable prop, Shape sh, Arbitrary a) => sh -> ((Array V sh a, Array V sh a, Array V sh a, Array V sh a, Array V sh a) -> prop) -> Property

# Arbitrary Unboxed Arrays

arbitraryUShaped :: (Shape sh, Unbox a, Arbitrary a) => sh -> Gen (Array U sh a) Source #

Generates a random unboxed array of a given shape

forAllUShaped :: (Show sh, Show a, Unbox a, Testable prop, Shape sh, Arbitrary a) => sh -> (Array U sh a -> prop) -> Property Source #

Property tested for unboxed random arrays with a given shape.

forAll2UShaped :: (Show sh, Show a, Unbox a, Testable prop, Shape sh, Arbitrary a) => sh -> ((Array U sh a, Array U sh a) -> prop) -> Property Source #

Property tested for pair of unboxed random arrays with a given shape.

forAll3UShaped :: (Show sh, Show a, Unbox a, Testable prop, Shape sh, Arbitrary a) => sh -> ((Array U sh a, Array U sh a, Array U sh a) -> prop) -> Property Source #

Property tested for triple of unboxed random arrays with a given shape.

forAll4UShaped :: (Show sh, Show a, Unbox a, Testable prop, Shape sh, Arbitrary a) => sh -> ((Array U sh a, Array U sh a, Array U sh a, Array U sh a) -> prop) -> Property Source #

Property tested for quadruple of unboxed random arrays with a given shape.

forAll5UShaped :: (Show sh, Show a, Unbox a, Testable prop, Shape sh, Arbitrary a) => sh -> ((Array U sh a, Array U sh a, Array U sh a, Array U sh a, Array U sh a) -> prop) -> Property Source #

Property tested for 5-tuple of unboxed random arrays with a given shape.

# Arbitrary Boxed Arrays

arbitraryVShaped :: (Shape sh, Arbitrary a) => sh -> Gen (Array V sh a) Source #

Generates a random boxed array of a given shape

forAllVShaped :: (Show sh, Show a, Testable prop, Shape sh, Arbitrary a) => sh -> (Array V sh a -> prop) -> Property Source #

Property tested for unboxed random arrays with a given shape.

forAll2VShaped :: (Show sh, Show a, Testable prop, Shape sh, Arbitrary a) => sh -> ((Array V sh a, Array V sh a) -> prop) -> Property Source #

Property tested for pair of unboxed random arrays with a given shape.

forAll3VShaped :: (Show sh, Show a, Testable prop, Shape sh, Arbitrary a) => sh -> ((Array V sh a, Array V sh a, Array V sh a) -> prop) -> Property Source #

Property tested for triple of unboxed random arrays with a given shape.

forAll4VShaped :: (Show sh, Show a, Testable prop, Shape sh, Arbitrary a) => sh -> ((Array V sh a, Array V sh a, Array V sh a, Array V sh a) -> prop) -> Property Source #

Property tested for quadruple of unboxed random arrays with a given shape.

forAll5VShaped :: (Show sh, Show a, Testable prop, Shape sh, Arbitrary a) => sh -> ((Array V sh a, Array V sh a, Array V sh a, Array V sh a, Array V sh a) -> prop) -> Property Source #

Property tested for 5-tuple of unboxed random arrays with a given shape.

# Orphan instances

Arbitrary Z Source # | This module exports instances of `Arbitrary` and `CoArbitrary` for unboxed Repa arrays.
Instance details Methods arbitrary :: Gen Z Source # shrink :: Z -> [Z] Source #
CoArbitrary Z Source # |
Instance details Methods coarbitrary :: Z -> Gen b -> Gen b Source #
Arbitrary a => Arbitrary (a :. Int) Source # |
Instance details Methods arbitrary :: Gen (a :. Int) Source # shrink :: (a :. Int) -> [a :. Int] Source #
CoArbitrary a => CoArbitrary (a :. Int) Source # |
Instance details Methods coarbitrary :: (a :. Int) -> Gen b -> Gen b Source #
(Arbitrary sh, Arbitrary a, Shape sh) => Arbitrary (Array V sh a) Source # |
Instance details Methods arbitrary :: Gen (Array V sh a) Source # shrink :: Array V sh a -> [Array V sh a] Source #
(Arbitrary sh, Arbitrary a, Unbox a, Shape sh) => Arbitrary (Array U sh a) Source # |
Instance details Methods arbitrary :: Gen (Array U sh a) Source # shrink :: Array U sh a -> [Array U sh a] Source #
(CoArbitrary sh, CoArbitrary a, Source r a, Shape sh) => CoArbitrary (Array r sh a) Source # |
Instance details Methods coarbitrary :: Array r sh a -> Gen b -> Gen b Source #