package frenetic
Install
Dune Dependency
Authors
Maintainers
Sources
md5=baf754df13a759c32f2c86a1b6f328da
sha512=80140900e7009ccab14b25e244fe7edab87d858676f8a4b3799b4fea16825013cf68363fe5faec71dd54ba825bb4ea2f812c2c666390948ab217ffa75d9cbd29
doc/frenetic.async/Frenetic_async/DynGraph/index.html
Module Frenetic_async.DynGraph
Source
A node in a dynamic dataflow graph that receives values of type 'b and * produces values of type 'a.
An uninhabited type used in the definition of create_source
and * from_pipe
. This is the type of values that these nodes receive, thus they * cannot receive any values.
create init f
creates an isolated node, initialized to hold init
. * Use the attach
function to connect the node to consumers and producers. * When any producer produces a value (of type 'b
), the function f
is * applied to latest values of each produced to calculate the new value of * this node. The new value is sent to all the consumers of this node.
create_source init
creates an isolated node initialized to hold init
. * You must not create an edge to this node--it will signal an error if it * receive a value. But, you can update the value at the node using push
.
push v src
sets the value at src
to v
and propagates the update * through the dataflow graph.
attach src dst
sends values from src
to dst
. Be careful not to * create a cyclc. If you do, an infinite loop will occur while propagating * values.
from_pipe init reader
creates a node initialized to init
that is * updated with values from reader
. * * Note: You cannot create an edge to this node, but you can create an edge * from this node to another that accepts values of type 'a
.