import Prelude ()
import Data.Function.Differentiable
import Data.Manifold
import Math.LinearMap.Category
import Numeric.Exponent.Monomorphic.Int
import Control.Category.Constrained.Prelude hiding((^))
import Control.Arrow.Constrained
:opt no-lint -- lint gives bogus warnings with constrained-categories
From dynamic-plot:
import Graphics.Dynamic.Plot.R2
strictFunPlot :: RWDiffable ℝ ℝ ℝ -> IO ()
strictFunPlot f = do
let (_, [pts]) = discretisePathSegs 8000 (const $ spanNorm [800], const $ spanNorm [100])
( alg (\x -> -2 ?< x ?< 2 ?-> (f $~ x)) :: RWDiffable ℝ ℝ ℝ )
print $ length pts
plotWindow [lineSegPlot pts]
return ()
forM_ [1..5] $ \q -> strictFunPlot $ alg (\x -> sin (exp (fromInteger q * x)))
92 348 843 1403 1663