aivika-6.1.1: A multi-method simulation library
CopyrightCopyright (c) 2009-2017 David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Simulation.Aivika.Transform

Description

Tested with: GHC 8.0.1

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 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

Instances

Instances details
Arrow Transform Source # 
Instance details

Defined in Simulation.Aivika.Transform

Methods

arr :: (b -> c) -> Transform b c #

first :: Transform b c -> Transform (b, d) (c, d) #

second :: Transform b c -> Transform (d, b) (d, c) #

(***) :: Transform b c -> Transform b' c' -> Transform (b, b') (c, c') #

(&&&) :: Transform b c -> Transform b c' -> Transform b (c, c') #

Category Transform Source # 
Instance details

Defined in Simulation.Aivika.Transform

Methods

id :: forall (a :: k). Transform a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Transform b c -> Transform a b -> Transform a c #

Delaying the Transform

delayTransform Source #

Arguments

:: Dynamics Double

the lag time

-> Dynamics a

the initial value

-> Transform 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 :: Transform a Double Source #

A transform that returns the current modeling time.

Differential and Difference Equations

integTransform Source #

Arguments

:: Dynamics Double

the initial value

-> Transform 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.

integTransformEither Source #

Arguments

:: Dynamics Double

the initial value

-> Transform (Either Double Double) Double

map either a new Left value or the Right derivative to an integral

Like integTransform but allows either setting a new Left value of the integral, or updating it by the specified Right derivative.

sumTransform Source #

Arguments

:: (Num a, Unboxed a) 
=> Dynamics a

the initial value

-> Transform 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.

sumTransformEither Source #

Arguments

:: (Num a, Unboxed a) 
=> Dynamics a

the initial value

-> Transform (Either a a) a

map either a new Left value or the Right difference to a sum

Like sumTransform but allows either setting a new Left value of the sum, or updating it by the specified Right difference.