Portability | MultiParamTypeClasses, FunctionalDependencies |
---|---|
Stability | unstable |
Maintainer | claude@mathr.co.uk |
Safe Haskell | Safe-Inferred |
Classes for complex number operations.
- class ComplexRect c r | c -> r where
- (/.) :: (Fractional r, ComplexRect c r) => c -> r -> c
- (.+) :: ComplexRect c r => r -> r -> c
- class ComplexPolar c r | c -> r where
Documentation
class ComplexRect c r | c -> r whereSource
Rectangular form.
:: r | real |
-> r | imaginary |
-> c |
Construction.
:: r | real |
-> c |
Construction with imagPart 0.
:: r | imaginary |
-> c |
Construction with realPart 0.
Deconstruction.
Get the real part.
Get the imaginary part.
Conjugation.
magnitudeSquared :: c -> rSource
Squared magnitude.
Complex square.
Real-complex multiplication.
Complex-real multiplication.
ComplexRect (Complex Double) Double | |
ComplexRect (Complex Float) Float | |
ComplexRect (Complex Int) Int | |
ComplexRect (Complex Int8) Int8 | |
ComplexRect (Complex Int16) Int16 | |
ComplexRect (Complex Int32) Int32 | |
ComplexRect (Complex Int64) Int64 | |
ComplexRect (Complex Integer) Integer | |
ComplexRect (Complex Word) Word | |
ComplexRect (Complex Word8) Word8 | |
ComplexRect (Complex Word16) Word16 | |
ComplexRect (Complex Word32) Word32 | |
ComplexRect (Complex Word64) Word64 | |
ComplexRect (Complex CFloat) CFloat | |
ComplexRect (Complex CDouble) CDouble | |
Integral t => ComplexRect (Complex (Ratio t)) (Ratio t) | |
HasResolution t => ComplexRect (Complex (Fixed t)) (Fixed t) |
(/.) :: (Fractional r, ComplexRect c r) => c -> r -> cSource
Complex-real division.
(.+) :: ComplexRect c r => r -> r -> cSource
A synonym for mkRect
.