synthesizer-llvm-0.8.2: Efficient signal processing using runtime compilation

Synthesizer.LLVM.Complex

Synopsis

# Documentation

data T a

Complex numbers are an algebraic type.

Instances

 Functor T C T (Show v, C v, C v, C a v) => C a (T v) (C a, C a v) => C a (T v) (Ord a, C a v) => C a (T v) Sqr a b => Sqr a (T b) (C a, Sqr a b) => C a (T b) C a b => C a (T b) C a b => C a (T b) The '(*>)' method can't replace `scale` because it requires the Algebra.Module constraint Eq a => Eq (T a) (Floating a, Eq a) => Fractional (T a) (Floating a, Eq a) => Num (T a) Read a => Read (T a) Show a => Show (T a) Arbitrary a => Arbitrary (T a) Storable a => Storable (T a) C l => C (T l) Undefined a => Undefined (T a) Phi a => Phi (T a) (C a, C a, C a, Power a) => C (T a) (C a, C a, Power a) => C (T a) C a => C (T a) (C a, C a, C a) => C (T a) (Ord a, C a, C a) => C (T a) (Ord a, C a) => C (T a) C a => C (T a) C a => C (T a) C a => C (T a) C a => C (T a) C a => C (T a) Flatten a => Flatten (T a)

type Struct a = Struct (a, (a, ()))Source

(+:) :: a -> a -> T a

Construct a complex number from real and imaginary part.

cis :: C a => a -> T a

`cis t` is a complex value with magnitude `1` and phase `t` (modulo `2*pi`).

scale :: C a => a -> T a -> T a

Scale a complex number by a real number.

unfold :: Value (Struct a) -> T (T (Value a))Source