Constructor | Description |
|
Static member | Description |
Full Usage:
DiGraph.addEdge edge graph
Parameters:
'NodeKey * 'NodeKey * 'EdgeData
-
The edge to be created. A three part tuple containing the origin node, the destination node, and any edge label such as the weight.
graph : DiGraph<'NodeKey, 'NodeData, 'EdgeData>
-
The graph the edge will be added to.
Returns: DiGraph<'NodeKey, 'NodeData, 'EdgeData>
Unit
|
|
Full Usage:
DiGraph.addEdges edges graph
Parameters:
('NodeKey * 'NodeKey * 'EdgeData)[]
-
The array of edges. Each edge is a three part tuple containing the origin node, the destination node, and any edge label such as the weight.
graph : DiGraph<'NodeKey, 'NodeData, 'EdgeData>
-
The graph to add the edge to
Returns: DiGraph<'NodeKey, 'NodeData, 'EdgeData>
Unit
|
|
|
|
|
|
|
|
Full Usage:
DiGraph.countEdges graph
Parameters:
DiGraph<'NodeKey, 'NodeData, 'EdgeData>
-
The graph to be analysed
Returns: int
A float of the total edges
|
|
Full Usage:
DiGraph.countNodes graph
Parameters:
DiGraph<'NodeKey, 'NodeData, 'EdgeData>
-
The graph to be analysed
Returns: int
A float of the total nodes
|
|
Full Usage:
DiGraph.createFromEdges edges
Parameters:
('NodeKey * 'NodeKey * 'EdgeData)[]
-
An array of edges. Each edge is a three part tuple of origin node, the destination node, and any edge label such as the weight
Returns: DiGraph<'NodeKey, 'NodeKey, 'EdgeData>
A graph containing the nodes
|
Builds a graph from a list of edges. This is a shorthand graph generation method where NodeData is assumed to be of the same type as NodeKey.
|
Full Usage:
DiGraph.createFromNodes nodes
Parameters:
('NodeKey * 'NodeData)[]
-
An array of nodes. The type of the nodes will strongly type the created graph to use that type for all nodes.
Returns: DiGraph<'NodeKey, 'NodeData, 'EdgeData>
A graph containing the nodes
|
|
Full Usage:
DiGraph.find origin destination graph
Parameters:
'NodeKey
-
The starting node of the edge
destination : 'NodeKey
-
The target node of the edge
graph : DiGraph<'NodeKey, 'NodeData, 'EdgeData>
-
The graph to find the edge in
Returns: 'NodeKey * 'NodeKey * 'EdgeData
A edge as a three part tuple of origin node, the destination node, and any edge label such as the weight.
|
Tries to find an edge between the specified nodes. Raises KeyNotFoundException if no such edge exists in the graph.
|
Full Usage:
DiGraph.getAllEdges graph
Parameters:
DiGraph<'NodeKey, 'NodeData, 'EdgeData>
-
The graph the edges are present in
Returns: ('NodeKey * 'NodeKey * 'EdgeData)[]
An array of origin, destination nodes and the corresponding 'EdgeData tuples.
|
|
Full Usage:
DiGraph.getInEdges destination graph
Parameters:
'NodeKey
graph : DiGraph<'NodeKey, 'NodeData, 'EdgeData>
-
The graph the node is present in
Returns: ('NodeKey * 'EdgeData)[]
An array of target nodes and the corresponding 'EdgeData.
|
|
Full Usage:
DiGraph.getNodes graph
Parameters:
DiGraph<'NodeKey, 'NodeData, 'EdgeData>
-
The graph to be analysed
Returns: 'NodeKey[]
An array of nodes
|
|
Full Usage:
DiGraph.getOutEdges origin graph
Parameters:
'NodeKey
-
The node from which the edges start
graph : DiGraph<'NodeKey, 'NodeData, 'EdgeData>
-
The graph the node is present in
Returns: ('NodeKey * 'EdgeData)[]
An array of target nodes and the corresponding 'EdgeData.
|
|
|
Normalises the weights of outbound edges from each node in a graph. The function assumes that the edge data type of the graph will be float.
|
Full Usage:
DiGraph.ofSeq edgelist
Parameters:
seq<'NodeKey * 'NodeData * 'NodeKey * 'NodeData * 'EdgeData>
Returns: DiGraph<'NodeKey, 'NodeData, 'EdgeData>
|
|
Full Usage:
DiGraph.removeEdge edge graph
Parameters:
'NodeKey * 'NodeKey
-
The edge to be removed. A two part tuple containing the origin node, the destination node.
graph : DiGraph<'NodeKey, 'NodeData, 'EdgeData>
-
The graph the edge will be removed from.
Returns: DiGraph<'NodeKey, 'NodeData, 'EdgeData>
Unit
|
|
|
|
Full Usage:
DiGraph.toAdjacencyMatrix getEdgeWeight graph
Parameters:
'EdgeData -> float
graph : DiGraph<'NodeKey, 'a, 'EdgeData>
-
The graph to be converted
Returns: float[][]
An adjacency matrix
|
Converts the Graph to an Adjacency Matrix This is preliminary step in many graph algorithms such as Floyd-Warshall. The operation assumes edge data types of float in the graph.
|
Full Usage:
DiGraph.toSeq graph
Parameters:
DiGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: seq<'NodeKey * 'NodeKey * 'NodeKey * 'NodeKey * 'EdgeData>
|
|