blas-0.7.2: Bindings to the BLAS library

Stabilityexperimental
MaintainerPatrick Perry <patperry@stanford.edu>

Test.QuickCheck.BLAS

Contents

Description

Test generators for BLAS types.

Synopsis

Testable element types

class (BLAS3 e, Arbitrary e) => TestElem e whereSource

Element types that can be tested with QuickCheck properties.

Methods

isTestElemElem :: e -> BoolSource

Inicates whether or not the value should be used in tests. For Doubles, isTestElemElem e is defined as not (isNaN e || isInfinite e || isDenormalized e).

Generating random objects

Elements

elements :: TestElem e => Int -> Gen [e]Source

Generate a list of elements suitable for testing with.

realElements :: TestElem e => Int -> Gen [e]Source

Generate a list of elements for testing that have no imaginary part.

Vectors

dim :: Gen IntSource

Get an appropriate dimension for a random vector

vector :: TestElem e => Int -> Gen (Vector n e)Source

Generate a random vector of the given size.

Dense matrices

shape :: Gen (Int, Int)Source

Generate an appropriate shape for a random matrix.

matrix :: TestElem e => (Int, Int) -> Gen (Matrix (m, n) e)Source

Generate a random matrix of the given shape.

Banded matrices

bandwidths :: (Int, Int) -> Gen (Int, Int)Source

Generate valid bandwidths for the given matrix shape.

banded :: TestElem e => (Int, Int) -> (Int, Int) -> Gen (Banded (m, n) e)Source

Generate a random banded matrix.