bearriver-0.14.7: FRP Yampa replacement implemented with Monadic Stream Functions.
Copyright(c) Ivan Perez 2019-2023
(c) Ivan Perez and Manuel Baerenz 2016-2018
LicenseBSD3
Maintainerivan.perez@keera.co.uk
Safe HaskellSafe-Inferred
LanguageHaskell2010

FRP.BearRiver.Integration

Description

Implementation of integrals and derivatives using Monadic Stream Processing library.

Synopsis

Integration

integral :: (Monad m, Fractional s, VectorSpace a s) => SF m a a Source #

Integration using the rectangle rule.

Differentiation

derivative :: (Monad m, Fractional s, VectorSpace a s) => SF m a a Source #

A very crude version of a derivative. It simply divides the value difference by the time difference. Use at your own risk.

iterFrom :: Monad m => (a -> a -> DTime -> b -> b) -> b -> SF m a b Source #

Integrate using an auxiliary function that takes the current and the last input, the time between those samples, and the last output, and returns a new output.