aivika-transformers-2.0: Transformers for the Aivika simulation library

CopyrightCopyright (c) 2009-2014, David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Simulation.Aivika.Trans.Transform

Contents

Description

Tested with: GHC 7.8.3

The module defines something which is most close to the notion of analogous circuit as an opposite to the digital one.

Synopsis

The Transform Arrow

newtype Transform m a b Source

It allows representing an analogous circuit as an opposite to the digital one.

This is a transform of one time varying function to another usually specified in the integration time points and then interpolated in other time points with help of one of the memoization functions like memo0Dynamics.

Constructors

Transform 

Fields

runTransform :: Dynamics m a -> Simulation m (Dynamics m b)

Run the transform.

Instances

Delaying the Transform

delayTransform Source

Arguments

:: MonadComp m 
=> Dynamics m Double

the lag time

-> Dynamics m a

the initial value

-> Transform m a a

the delayed transform

Return a delayed transform by the specified lag time and initial value.

This is actually the delayI function wrapped in the Transform type.

The Time Transform

timeTransform :: MonadComp m => Transform m a Double Source

A transform that returns the current modeling time.

Differential and Difference Equations

integTransform Source

Arguments

:: (MonadComp m, MonadFix m) 
=> Dynamics m Double

the initial value

-> Transform m Double Double

map the derivative to an integral

Return a transform that maps the derivative to an integral by the specified initial value.

This is actually the integ function wrapped in the Transform type.

sumTransform Source

Arguments

:: (MonadComp m, MonadFix m, Num a, Unboxed m a) 
=> Dynamics m a

the initial value

-> Transform m a a

map the difference to a sum

Return a transform that maps the difference to a sum by the specified initial value.

This is actually the diffsum function wrapped in the Transform type.