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

Safe HaskellNone
LanguageHaskell98

Data.Array.Repa.Arbitrary

Contents

Synopsis

Arbitrary Unboxed Arrays

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

Generates a random unboxed array of a given shape

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

Property tested for unboxed random arrays with a given shape.

forAll2UShaped :: (Shape sh, Arbitrary a, Unbox a, Show a, Show sh, Testable prop) => 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 :: (Shape sh, Arbitrary a, Unbox a, Show a, Show sh, Testable prop) => 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 :: (Shape sh, Arbitrary a, Unbox a, Show a, Show sh, Testable prop) => 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 :: (Shape sh, Arbitrary a, Unbox a, Show a, Show sh, Testable prop) => 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 :: (Arbitrary a, Shape sh) => sh -> Gen (Array V sh a) Source #

Generates a random boxed array of a given shape

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

Property tested for unboxed random arrays with a given shape.

forAll2VShaped :: (Shape sh, Arbitrary a, Show a, Show sh, Testable prop) => 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 :: (Shape sh, Arbitrary a, Show a, Show sh, Testable prop) => 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 :: (Shape sh, Arbitrary a, Show a, Show sh, Testable prop) => 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 :: (Shape sh, Arbitrary a, Show a, Show sh, Testable prop) => 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.

Methods

arbitrary :: Gen Z #

shrink :: Z -> [Z] #

CoArbitrary Z Source # 

Methods

coarbitrary :: Z -> Gen b -> Gen b #

Arbitrary a => Arbitrary ((:.) a Int) Source # 

Methods

arbitrary :: Gen (a :. Int) #

shrink :: (a :. Int) -> [a :. Int] #

CoArbitrary a => CoArbitrary ((:.) a Int) Source # 

Methods

coarbitrary :: (a :. Int) -> Gen b -> Gen b #

(Arbitrary sh, Arbitrary a, Unbox a, Shape sh) => Arbitrary (Array U sh a) Source # 

Methods

arbitrary :: Gen (Array U sh a) #

shrink :: Array U sh a -> [Array U sh a] #

(Arbitrary sh, Arbitrary a, Shape sh) => Arbitrary (Array V sh a) Source # 

Methods

arbitrary :: Gen (Array V sh a) #

shrink :: Array V sh a -> [Array V sh a] #

(CoArbitrary sh, CoArbitrary a, Source r a, Shape sh) => CoArbitrary (Array r sh a) Source # 

Methods

coarbitrary :: Array r sh a -> Gen b -> Gen b #