Copyright | (c) Claude Heiland-Allen 2012 |
---|---|
License | BSD3 |
Maintainer | claude@mathr.co.uk |
Stability | unstable |
Portability | MultiParamTypeClasses, FunctionalDependencies |
Safe Haskell | Safe |
Language | Haskell98 |
Data.Complex.Generic.Class
Description
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 where Source #
Rectangular form.
Minimal complete definition
mkRect, real, imag, rect, realPart, imagPart, conjugate, magnitudeSquared, sqr, (.*), (*.)
Methods
mkRect :: r -> r -> c Source #
Construction.
Construction with imagPart 0.
Construction with realPart 0.
Deconstruction.
Get the real part.
Get the imaginary part.
Conjugation.
magnitudeSquared :: c -> r Source #
Squared magnitude.
Complex square.
(.*) :: r -> c -> c infixl 7 Source #
Real-complex multiplication.
(*.) :: c -> r -> c infixl 7 Source #
Complex-real multiplication.
Instances
ComplexRect (Complex Double) Double Source # | |
ComplexRect (Complex Float) Float Source # | |
ComplexRect (Complex Int) Int Source # | |
ComplexRect (Complex Int8) Int8 Source # | |
ComplexRect (Complex Int16) Int16 Source # | |
ComplexRect (Complex Int32) Int32 Source # | |
ComplexRect (Complex Int64) Int64 Source # | |
ComplexRect (Complex Integer) Integer Source # | |
ComplexRect (Complex Word) Word Source # | |
ComplexRect (Complex Word8) Word8 Source # | |
ComplexRect (Complex Word16) Word16 Source # | |
ComplexRect (Complex Word32) Word32 Source # | |
ComplexRect (Complex Word64) Word64 Source # | |
ComplexRect (Complex CFloat) CFloat Source # | |
ComplexRect (Complex CDouble) CDouble Source # | |
Integral t => ComplexRect (Complex (Ratio t)) (Ratio t) Source # | |
HasResolution t => ComplexRect (Complex (Fixed t)) (Fixed t) Source # | |
(/.) :: (Fractional r, ComplexRect c r) => c -> r -> c infixl 6 Source #
Complex-real division.
(.+) :: ComplexRect c r => r -> r -> c infix 6 Source #
A synonym for mkRect
.