aivika-transformers-6.1.1: Transformers for the Aivika 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.IO.Signal

Description

Tested with: GHC 8.0.1

This module allows collecting the signal history in a more optimal way than it suggests the general implementation.

Synopsis

Signal History

data SignalHistory m a Source #

Represents the history of the signal values.

signalHistorySignal :: SignalHistory m a -> Signal m a Source #

The signal for which the history is created.

newSignalHistory :: Signal IO a -> Composite IO (SignalHistory IO a) Source #

Create a history of the signal values.

newSignalHistoryStartingWith :: Maybe a -> Signal IO a -> Composite IO (SignalHistory IO a) Source #

Create a history of the signal values starting with the optional initial value.

readSignalHistory :: SignalHistory IO a -> Event IO (Array Int Double, Array Int a) Source #

Read the history of signal values.