This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE ScopedTypeVariables, TypeSynonymInstances, FlexibleInstances #-} | |
module FFT where | |
import Prelude hiding (length, sum, map, zipWith, (++), foldr, foldr1, or, | |
concat, concatMap, replicate, scanl, scanl1, scanr, null, | |
init, last, tail, head, filter, reverse, product, | |
maximum, zip, dropWhile) | |
import qualified Prelude as P | |
import Data.Complex | |
import Data.Vector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} | |
import qualified Data.List as L | |
-- MATRIX ENTRIES | |
data Sign = P | M deriving (Eq, Show) | |
data Entry = Z | O Sign | W Sign Int Int deriving Eq | |
negS :: Sign -> Sign |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Data.WAVE | |
import Prelude hiding (length, sum, map, zipWith, (++), foldr, concat, zip3, | |
replicate, concatMap) | |
import qualified Prelude as P | |
import Data.Complex | |
import Data.Vector | |
import Data.Bits | |
import System.Environment (getArgs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Prelude hiding (length, sum, map, zipWith, (++), foldr, concat) | |
import qualified Prelude as P | |
import Data.Complex | |
import Data.Vector | |
import Data.Bits | |
i :: Complex Double | |
i = 0 :+ 1 | |
omega :: Int -> Complex Double |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} | |
import qualified Data.List as L | |
-- MATRIX ENTRIES | |
data Sign = P | M deriving (Eq, Show) | |
data Entry = Z | O Sign | W Sign Int Int deriving Eq | |
negS :: Sign -> Sign |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE EmptyDataDecls #-} | |
{-# LANGUAGE NoImplicitPrelude #-} | |
module RingOscillator (main) where | |
import Language.Fay.FFI | |
import Language.Fay.Prelude | |
-- System parameters. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Lorenz where | |
import Data.Default | |
data LzParam t = LzParam { sigma :: t, r :: t, b :: t } deriving (Eq, Show) | |
instance Floating t => Default (LzParam t) where | |
def = LzParam 10 28 (8/3) | |
lorenz :: Floating t => t -> [t] -> [t] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings, TemplateHaskell, | |
QuasiQuotes, FlexibleContexts #-} | |
-- Yesod code to implement a form field based on the jQuery slider | |
-- widget defined at http://egorkhmelev.github.com/jslider | |
-- | |
-- File layout: we need access to the CSS and JavaScript files for the | |
-- slider plugin, along with the images used for theming the sliders. | |
-- If the CSS is in .../css/jquery.slider.min.css, then the image | |
-- files must be in .../img. A type class is provided to set up the |
NewerOlder