Safe Haskell | None |
---|---|

Language | Haskell98 |

Compute transforms on real data based on complex-valued transforms.

- toSpectrum :: (Shape sh, Slice sh, RealFloat a, FromIntegral Int a) => Transform (sh :. Int) (Complex a) -> Acc (Array (sh :. Int) a) -> Acc (Array (sh :. Int) (Complex a))
- fromSpectrum :: (Shape sh, Slice sh, RealFloat a, FromIntegral Int a) => Transform (sh :. Int) (Complex a) -> Acc (Array (sh :. Int) (Complex a)) -> Acc (Array (sh :. Int) a)
- twoToSpectrum :: (Shape sh, Slice sh, RealFloat a) => Transform (sh :. Int) (Complex a) -> Acc (Array (sh :. Int) (a, a)) -> Acc (Array (sh :. Int) (Complex a, Complex a))
- twoToSpectrum2d :: (Shape sh, Slice sh, RealFloat a) => Transform ((sh :. Int) :. Int) (Complex a) -> Acc (Array ((sh :. Int) :. Int) (a, a)) -> Acc (Array ((sh :. Int) :. Int) (Complex a, Complex a))
- untangleSpectra :: (Shape sh, Slice sh, RealFloat a) => Acc (Array (sh :. Int) (Complex a)) -> Acc (Array (sh :. Int) (Complex a, Complex a))
- untangleSpectra2d :: (Shape sh, Slice sh, RealFloat a) => Acc (Array ((sh :. Int) :. Int) (Complex a)) -> Acc (Array ((sh :. Int) :. Int) (Complex a, Complex a))
- untangleCoefficient :: RealFloat a => Exp (Complex a) -> Exp (Complex a) -> Exp (Complex a, Complex a)
- twoFromSpectrum :: (Shape sh, Slice sh, RealFloat a) => Transform (sh :. Int) (Complex a) -> Acc (Array (sh :. Int) (Complex a, Complex a)) -> Acc (Array (sh :. Int) (a, a))
- twoFromSpectrum2d :: (Shape sh, Slice sh, RealFloat a) => Transform ((sh :. Int) :. Int) (Complex a) -> Acc (Array ((sh :. Int) :. Int) (Complex a, Complex a)) -> Acc (Array ((sh :. Int) :. Int) (a, a))
- entangleSpectra :: (Shape sh, Slice sh, RealFloat a) => Acc (Array (sh :. Int) (Complex a, Complex a)) -> Acc (Array (sh :. Int) (Complex a))
- entangleSpectra2d :: (Shape sh, Slice sh, RealFloat a) => Acc (Array ((sh :. Int) :. Int) (Complex a, Complex a)) -> Acc (Array ((sh :. Int) :. Int) (Complex a))
- entangleCoefficient :: RealFloat a => Exp (Complex a) -> Exp (Complex a) -> Exp (Complex a, Complex a)

# Documentation

toSpectrum :: (Shape sh, Slice sh, RealFloat a, FromIntegral Int a) => Transform (sh :. Int) (Complex a) -> Acc (Array (sh :. Int) a) -> Acc (Array (sh :. Int) (Complex a)) Source #

Perform a real-to-complex transform using a complex-to-complex transform of half size. Input must have an even size. Result has the same size as the input, i.e. it is not halved.

fromSpectrum :: (Shape sh, Slice sh, RealFloat a, FromIntegral Int a) => Transform (sh :. Int) (Complex a) -> Acc (Array (sh :. Int) (Complex a)) -> Acc (Array (sh :. Int) a) Source #

Perform a complex-to-real transform using a complex-to-complex of half size. Input must be self-adjoint and must have an even size. Result has the same size as the input, i.e. it is not doubled.

twoToSpectrum :: (Shape sh, Slice sh, RealFloat a) => Transform (sh :. Int) (Complex a) -> Acc (Array (sh :. Int) (a, a)) -> Acc (Array (sh :. Int) (Complex a, Complex a)) Source #

Perform a real-to-complex transform of two real inputs using a complex-to-complex transform of the same size. Input can have arbitrary size.

twoToSpectrum2d :: (Shape sh, Slice sh, RealFloat a) => Transform ((sh :. Int) :. Int) (Complex a) -> Acc (Array ((sh :. Int) :. Int) (a, a)) -> Acc (Array ((sh :. Int) :. Int) (Complex a, Complex a)) Source #

untangleSpectra :: (Shape sh, Slice sh, RealFloat a) => Acc (Array (sh :. Int) (Complex a)) -> Acc (Array (sh :. Int) (Complex a, Complex a)) Source #

You can transform two real data sets using one complex transform. This function can be used to untangle the resulting spectrum.

untangleSpectra2d :: (Shape sh, Slice sh, RealFloat a) => Acc (Array ((sh :. Int) :. Int) (Complex a)) -> Acc (Array ((sh :. Int) :. Int) (Complex a, Complex a)) Source #

untangleCoefficient :: RealFloat a => Exp (Complex a) -> Exp (Complex a) -> Exp (Complex a, Complex a) Source #

twoFromSpectrum :: (Shape sh, Slice sh, RealFloat a) => Transform (sh :. Int) (Complex a) -> Acc (Array (sh :. Int) (Complex a, Complex a)) -> Acc (Array (sh :. Int) (a, a)) Source #

twoFromSpectrum2d :: (Shape sh, Slice sh, RealFloat a) => Transform ((sh :. Int) :. Int) (Complex a) -> Acc (Array ((sh :. Int) :. Int) (Complex a, Complex a)) -> Acc (Array ((sh :. Int) :. Int) (a, a)) Source #

entangleSpectra :: (Shape sh, Slice sh, RealFloat a) => Acc (Array (sh :. Int) (Complex a, Complex a)) -> Acc (Array (sh :. Int) (Complex a)) Source #