Copyright | (c) Alexey Kuleshevich 2016-2018 |
---|---|
License | BSD3 |
Maintainer | Alexey Kuleshevich <lehins@yandex.ru> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
- data Complex a :: * -> * = !a :+ !a
- (+:) :: ColorSpace cs e => Pixel cs e -> Pixel cs e -> Pixel cs (Complex e)
- realPart :: (ColorSpace cs e, RealFloat e) => Pixel cs (Complex e) -> Pixel cs e
- imagPart :: (ColorSpace cs e, RealFloat e) => Pixel cs (Complex e) -> Pixel cs e
- mkPolar :: (ColorSpace cs e, RealFloat e) => Pixel cs e -> Pixel cs e -> Pixel cs (Complex e)
- cis :: (ColorSpace cs e, RealFloat e) => Pixel cs e -> Pixel cs (Complex e)
- polar :: (ColorSpace cs e, RealFloat e) => Pixel cs (Complex e) -> (Pixel cs e, Pixel cs e)
- magnitude :: (ColorSpace cs e, RealFloat e) => Pixel cs (Complex e) -> Pixel cs e
- phase :: (ColorSpace cs e, RealFloat e) => Pixel cs (Complex e) -> Pixel cs e
- conjugate :: (ColorSpace cs e, RealFloat e) => Pixel cs (Complex e) -> Pixel cs (Complex e)
Rectangular form
Complex numbers are an algebraic type.
For a complex number z
,
is a number with the magnitude of abs
zz
,
but oriented in the positive real direction, whereas
has the phase of signum
zz
, but unit magnitude.
The Foldable
and Traversable
instances traverse the real part first.
!a :+ !a infix 6 | forms a complex number from its real and imaginary rectangular components. |
Monad Complex | Since: 4.9.0.0 |
Functor Complex | |
Applicative Complex | Since: 4.9.0.0 |
Foldable Complex | |
Traversable Complex | |
Unbox a => Vector Vector (Complex a) | |
Unbox a => MVector MVector (Complex a) | |
Eq a => Eq (Complex a) | |
RealFloat a => Floating (Complex a) | Since: 2.1 |
RealFloat a => Fractional (Complex a) | Since: 2.1 |
Data a => Data (Complex a) | |
RealFloat a => Num (Complex a) | Since: 2.1 |
Read a => Read (Complex a) | |
Show a => Show (Complex a) | |
Generic (Complex a) | |
Storable a => Storable (Complex a) | Since: 4.8.0.0 |
(Default a, RealFloat a) => Default (Complex a) | |
NFData a => NFData (Complex a) | |
Unbox a => Unbox (Complex a) | |
(Num e, Elevator e, RealFloat e) => Elevator (Complex e) Source # | Discards imaginary part and changes precision of real part. |
Generic1 * Complex | |
data MVector s (Complex a) | |
type Rep (Complex a) | |
data Vector (Complex a) | |
type Rep1 * Complex | |
realPart :: (ColorSpace cs e, RealFloat e) => Pixel cs (Complex e) -> Pixel cs e Source #
Extracts the real part of a complex pixel.
imagPart :: (ColorSpace cs e, RealFloat e) => Pixel cs (Complex e) -> Pixel cs e Source #
Extracts the imaginary part of a complex pixel.
Polar form
mkPolar :: (ColorSpace cs e, RealFloat e) => Pixel cs e -> Pixel cs e -> Pixel cs (Complex e) Source #
Form a complex pixel from polar components of magnitude and phase.
polar :: (ColorSpace cs e, RealFloat e) => Pixel cs (Complex e) -> (Pixel cs e, Pixel cs e) Source #
magnitude :: (ColorSpace cs e, RealFloat e) => Pixel cs (Complex e) -> Pixel cs e Source #
The nonnegative magnitude of a complex pixel.