From: Francis Russell Date: Fri, 12 Apr 2013 16:19:28 +0000 (+0100) Subject: Add simple example expressing a DFT. X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=1610c6c5f8e21d6530b3ceb2c78afe6cb1997a53;p=francis%2Flta.git Add simple example expressing a DFT. --- diff --git a/src/Main.hs b/src/Main.hs index 5459a6f..bb5d7f9 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1,4 +1,27 @@ module Main (main) where +import LTA.Symbolic + main :: IO() -main = putStrLn "Hello World!" +main = putStrLn $ show dft + +row :: Expr +row = IntegerSymbol "row" + +col :: Expr +col = IntegerSymbol "col" + +n :: Expr +n = IntegerSymbol "N" + +e :: Expr +e = Constant Euler + +i :: Expr +i = Constant ImaginaryUnit + +pi :: Expr +pi = Constant Pi + +dft :: Expr +dft = pow e ((- i * 2 * Main.pi * row * col) / n)