hasim-0.1: Process-Based Discrete Event Simulation library
Source code
Contents
Index
Control.Hasim.WatchMap
Portability
unportable
Stability
experimental
Maintainer
jochem@functor.nl
Contents
Abstract data type
Creation and inspection
Modification
Description
This module defines a
WatchMap
, a data structure that keeps track of which processes watch which other processes.
Synopsis
data
WatchMap
emptyWM
::
WatchMap
watchers
::
WatchMap
->
Process
-> [
Process
]
register
::
Process
->
Process
->
WatchMap
->
WatchMap
unregister
::
Process
->
Process
->
WatchMap
->
WatchMap
Abstract data type
data
WatchMap
Source
A watch map. This data structure represents a relation on processes.
Creation and inspection
emptyWM
::
WatchMap
Source
An empty
WatchMap
.
watchers
Source
::
WatchMap
The
WatchMap
to be queried
->
Process
p2
-> [
Process
]
The list of
p1
's
Find all
p1
such that
(p1, p2)
is in the relation.
Modification
register
Source
::
Process
p1
->
Process
p2
->
WatchMap
old
WatchMap
->
WatchMap
new
WatchMap
Add the tuple
(p1, p2)
to the relation.
unregister
Source
::
Process
p1
->
Process
p2
->
WatchMap
old
WatchMap
->
WatchMap
new
WatchMap
Remove the tuple
(p1, p2)
from the relation, if it existed.
Produced by
Haddock
version 2.3.0