uni-graphs-2.2.0.0: Graphs

Graphs.SimpleGraph

Description

SimpleGraph is, as the name implies, a simple implementation of the Graph interface. For example, we don't bother to sort the arcs going out of a node, meaning that to find out if two nodes are connected requires searching all the arcs out of one of the nodes, or all the arcs into the other.

Notes on synchronicity. The Update operations Set*Label are intrinsically unsafe in this implementation since if two communicating SimpleGraphs both execute a Set*Label operation with different label values they may end up with each others values. It is recommended that Set*Label only be used during the initialisation of the object, as a way of tieing the knot.

In addition, Update operations which create a value based on a previous value (EG a NewNode creates a Node based on a NodeType), do assume that the previous value has already been created.

I realise this is somewhat informal. It may be necessary to replace SimpleGraph by something more complicated later . . .

Documentation

data SimpleGraph nodeLabel nodeTypeLabel arcLabel arcTypeLabel Source

Instances

Graph SimpleGraph 
Destroyable (SimpleGraph nodeLabel nodeTypeLabel arcLabel arcTypeLabel) 
Synchronized (SimpleGraph nodeLabel nodeTypeLabel arcLabel arcTypeLabel) 
Object (SimpleGraph nodeLabel nodeTypeLabel arcLabel arcTypeLabel) 

getNameSource :: SimpleGraph nodeLabel nodeTypeLabel arcLabel arcTypeLabel -> NameSourceSource

delayedAction :: SimpleGraph nodeLabel nodeTypeLabel arcLabel arcTypeLabel -> Node -> IO () -> IO ()Source

data ClientData nodeLabel nodeTypeLabel arcLabel arcTypeLabel Source

Constructors

ClientData 

Fields

clientID :: ObjectID
 
clientSink :: Update nodeLabel nodeTypeLabel arcLabel arcTypeLabel -> IO ()
 

Instances

Eq (ClientData nodeLabel nodeTypeLabel arcLabel arcTypeLabel)