AERN-Net-0.2.0: Compositional lazy dataflow networks for exact real number computationSource codeContentsIndex
Control.ERNet.Blocks.Control.Basic
Portabilityportable
Stabilityexperimental
Maintainermik@konecny.aow.cz
Description
A collection of processes whose main purpose is to synchronise other processes and have little semantical value.
Synopsis
joinStepValProcess :: (QAProtocol q a, Show q, Show a, Channel sIn sOut sInAnyProt sOutAnyProt) => ERProcessName -> ChannelType -> a -> ERProcess sInAnyProt sOutAnyProt
splitSyncProcess :: (QAProtocol q a, Channel sIn sOut sInAnyProt sOutAnyProt) => ERProcessName -> ChannelType -> Int -> a -> ERProcess sInAnyProt sOutAnyProt
biasedSplitSyncProcess :: (QAProtocol q1 a1, QAProtocol q2 a2, Channel sIn sOut sInAnyProt sOutAnyProt) => ERProcessName -> ChannelType -> ChannelType -> (q2 -> q1 -> Bool) -> (q2 -> a1 -> a2) -> ERProcess sInAnyProt sOutAnyProt
switchMultiProcess :: Channel sIn sOut sInAnyProt sOutAnyProt => Bool -> ERProcessName -> [ChannelType] -> ERProcess sInAnyProt sOutAnyProt
improverIxSimpleProcess :: (QAProtocol q a, Channel sIn sOut sInAnyProt sOutAnyProt) => ERProcessName -> ChannelType -> a -> ERProcess sInAnyProt sOutAnyProt
improverNoIxSimpleProcess :: (QAProtocol q a, Channel sIn sOut sInAnyProt sOutAnyProt) => ERProcessName -> ChannelType -> a -> ERProcess sInAnyProt sOutAnyProt
Documentation
joinStepValProcessSource
:: (QAProtocol q a, Show q, Show a, Channel sIn sOut sInAnyProt sOutAnyProt)
=> ERProcessNameprocess identifier (string)
-> ChannelTypevalue input channel type
-> aexample answer on value channel to help compiler work out the protocol
-> ERProcess sInAnyProt sOutAnyProt

This process joins information from two channels (step, val) in such a way that it acts as a splitter of responsibilities for its multi-threaded failure-enabled result channel as follows:

  • The step channel provides the timing and effort information for responses.
  • The val channel provides values without significant blocking.

While the process is waiting for a response from the step channel, any queries are put on hold until the response comes.

  • If the step channel responds with indication of failure, then all pending queries are answered as failed.
  • If the step channel responds with ok, then all the pending queries are forwarded to the value channel and answered asap. No new queries are accepted during such forwarding stage.
splitSyncProcessSource
:: (QAProtocol q a, Channel sIn sOut sInAnyProt sOutAnyProt)
=> ERProcessNameprocess identifier (string)
-> ChannelTypetype of all channels
-> Intnumber of channels to serve
-> aexample answer on value channel to help compiler work out the protocol
-> ERProcess sInAnyProt sOutAnyProt

This process provides multiple copies of one single-threaded channel.

merges splits a channel into two channels - primary channel and secondary channel. The primary channel is a clean forward of the original channel. The secondary channel can use a slightly different protocol than the primary channel.

Any query on the secondary channel will be blocked until a matching query is received and processed on the primary channel. (The user must supply a function that decides whether or not the queries are matching.)

Whenever a query is being answered on the primary channel, all queries pending on the secondary channel that are matching this one will be replied at the same time using the an answer derived from the answer on the primary channel.

biasedSplitSyncProcessSource
:: (QAProtocol q1 a1, QAProtocol q2 a2, Channel sIn sOut sInAnyProt sOutAnyProt)
=> ERProcessNameprocess identifier (string)
-> ChannelTypeprimary and input channel type
-> ChannelTypesecondary channel type
-> q2 -> q1 -> Booldecision whether a secondary query matches a primary query
-> q2 -> a1 -> a2translation of primary answer to a secondary answer
-> ERProcess sInAnyProt sOutAnyProt

This process provides two channels (primary, secondary) split off from one source channel. The primary channel is a clean forward of the source channel. The secondary channel can use a slightly different protocol than the primary channel.

Any query on the secondary channel will be blocked until a matching query is received and processed on the primary channel. (The user must supply a function that decides whether or not the queries are matching.)

Whenever a query is being answered on the primary channel, all queries pending on the secondary channel that are matching this one will be replied at the same time using the an answer derived from the answer on the primary channel.

switchMultiProcessSource
:: Channel sIn sOut sInAnyProt sOutAnyProt
=> Boolshould use channel cache?
-> ERProcessNameprocess identifier (string)
-> [ChannelType]switched output channel types
-> ERProcess sInAnyProt sOutAnyProt
This process acts as a switch for a group of channels, forwarding information from one of two groups of source channels. The special switch channel indicates whether to use one or the other.
improverIxSimpleProcessSource
:: (QAProtocol q a, Channel sIn sOut sInAnyProt sOutAnyProt)
=> ERProcessNameprocess identifier (string)
-> ChannelTypetype shared by all channels
-> asample answer to help the type checker
-> ERProcess sInAnyProt sOutAnyProt
This process acts as a simple pass-through + it decreases the effort index of each query except for a query with effort index zero it asks a special value provider. It can cope with several queries in parallel.
improverNoIxSimpleProcessSource
:: (QAProtocol q a, Channel sIn sOut sInAnyProt sOutAnyProt)
=> ERProcessNameprocess identifier (string)
-> ChannelTypetype shared by all channels
-> asample answer to help the type checker
-> ERProcess sInAnyProt sOutAnyProt
This process acts as a simple pass-through + it remembers its last answer and provides it on another channel. It initialises its memory from a special value provider.
Produced by Haddock version 2.4.2