clif-0.1.1.0: A Clifford algebra number type for Haskell

Copyright(c) Matti A. Eskelinen 2016-2017
LicenseMIT
Maintainermatti.a.eskelinen@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

Clif.Arbitrary

Contents

Description

This module provides (orphan) Arbitrary instances and various other generators for creating random Clifs and Basis elements using Test.QuickCheck.

Synopsis

Generators

ascList :: (Ord a, Arbitrary a) => Gen [a] Source #

orderedList with only unique elements. Useful for generating blades with e.g.

blade <$> ascList

ascLists :: (Ord a, Arbitrary a) => Gen ([a], [a]) Source #

 An ascending list split into two at a random point. Useful for generating a pair of blades without common vectors.

kBlade :: (Eq a, Basis b a, Arbitrary a, Arbitrary b) => Int -> Gen (Clif b a) Source #

Given k, returns a generator for k-blades (Clifs containing only a single blade of grade k).

Orphan instances

Arbitrary a => Arbitrary (Lorentzian a) Source #

Arbitrary Instance for Lorentzian

Arbitrary a => Arbitrary (Euclidean a) Source #

Arbitrary instance for Euclidean

Methods

arbitrary :: Gen (Euclidean a) #

shrink :: Euclidean a -> [Euclidean a] #

(Ord b, Arbitrary a, Arbitrary b) => Arbitrary (Clif b a) Source # 

Methods

arbitrary :: Gen (Clif b a) #

shrink :: Clif b a -> [Clif b a] #