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

Safe Haskell | None
Language | Haskell98

Data.Array.Repa.Arbitrary

Contents

- Arbitrary Unboxed Arrays
- Arbitrary Boxed Arrays

Synopsis

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

Generates a random unboxed array of a given shape

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

Property tested for unboxed random arrays with a given shape.

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

Property tested for unboxed random arrays with a given shape.

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