AdjGraph Type

Functions to operate on the AdjGraph representation

Constructors

Constructor Description

AdjGraph()

Full Usage: AdjGraph()

Returns: AdjGraph
Returns: AdjGraph

Static members

Static member Description

AdjGraph.addEdge sourceKey targetKey data graph

Full Usage: AdjGraph.addEdge sourceKey targetKey data graph

Parameters:
    sourceKey : 'NodeKey
    targetKey : 'NodeKey
    data : 'EdgeData
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Add edge

sourceKey : 'NodeKey
targetKey : 'NodeKey
data : 'EdgeData
graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

AdjGraph.addEdges edgeSeq g

Full Usage: AdjGraph.addEdges edgeSeq g

Parameters:
    edgeSeq : seq<'NodeKey * 'NodeKey * 'EdgeData>
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Add labeled edges to the graph.

edgeSeq : seq<'NodeKey * 'NodeKey * 'EdgeData>
g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

AdjGraph.addElement nk1 nd1 nk2 nd2 ed g

Full Usage: AdjGraph.addElement nk1 nd1 nk2 nd2 ed g

Parameters:
    nk1 : 'NodeKey
    nd1 : 'NodeData
    nk2 : 'NodeKey
    nd2 : 'NodeData
    ed : 'EdgeData
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Adds an edge and the corresponding nodes with data to the graph

nk1 : 'NodeKey
nd1 : 'NodeData
nk2 : 'NodeKey
nd2 : 'NodeData
ed : 'EdgeData
g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

AdjGraph.addNode nk nd g

Full Usage: AdjGraph.addNode nk nd g

Parameters:
    nk : 'NodeKey
    nd : 'NodeData
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Adds a labeled node to the graph.

nk : 'NodeKey
nd : 'NodeData
g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

AdjGraph.addNodes nodeSeq g

Full Usage: AdjGraph.addNodes nodeSeq g

Parameters:
    nodeSeq : seq<'NodeKey * 'NodeData>
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Adds labeled nodes to the graph.

nodeSeq : seq<'NodeKey * 'NodeData>
g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

AdjGraph.containsEdge v1 v2 g

Full Usage: AdjGraph.containsEdge v1 v2 g

Parameters:
    v1 : 'NodeKey
    v2 : 'NodeKey
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: bool

Returns true, if the edge from vertex v1 to vertex v2 is contained in the graph. Otherwise, it returns false.

v1 : 'NodeKey
v2 : 'NodeKey
g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: bool

AdjGraph.containsNode vk g

Full Usage: AdjGraph.containsNode vk g

Parameters:
    vk : 'NodeKey
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: bool

Returns true, if the node v is contained in the graph. Otherwise, it returns false.

vk : 'NodeKey
g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: bool

AdjGraph.countEdges graph

Full Usage: AdjGraph.countEdges graph

Parameters:
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: int

Counts all edges

graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: int

AdjGraph.countNodes g

Full Usage: AdjGraph.countNodes g

Parameters:
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: int

Evaluates the number of nodes in the graph.

g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: int

AdjGraph.create ()

Full Usage: AdjGraph.create ()

Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData> Empty AdjGraph

Creates an empty Adjacency Graph

Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Empty AdjGraph

AdjGraph.findEdge sourceKey targetKey graph

Full Usage: AdjGraph.findEdge sourceKey targetKey graph

Parameters:
    sourceKey : 'NodeKey
    targetKey : 'NodeKey
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: 'NodeKey * 'NodeKey * 'EdgeData

Tries to find an edge between the specified nodes. Raises Exception if no such edge exists in the graph.

sourceKey : 'NodeKey
targetKey : 'NodeKey
graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: 'NodeKey * 'NodeKey * 'EdgeData

AdjGraph.findNode n g

Full Usage: AdjGraph.findNode n g

Parameters:
    n : 'NodeKey
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: 'NodeKey * 'NodeData

Lookup a labeled vertex in the graph. Raising KeyNotFoundException if no binding exists in the graph.

n : 'NodeKey
g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: 'NodeKey * 'NodeData

AdjGraph.getDegree g nk

Full Usage: AdjGraph.getDegree g nk

Parameters:
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
    nk : 'NodeKey

Returns: int

Returns the degree of a node nk

g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
nk : 'NodeKey
Returns: int

AdjGraph.getEdgeOverlap graph1 graph2

Full Usage: AdjGraph.getEdgeOverlap graph1 graph2

Parameters:
    graph1 : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
    graph2 : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: Set<'NodeKey * 'NodeKey>

Returns the overlapping edges of two graphs

graph1 : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
graph2 : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: Set<'NodeKey * 'NodeKey>

AdjGraph.getEdgeOverlapCount graph1 graph2

Full Usage: AdjGraph.getEdgeOverlapCount graph1 graph2

Parameters:
    graph1 : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
    graph2 : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: int

Returns the amount of overlapping edges of two graphs

graph1 : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
graph2 : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: int

AdjGraph.getNeighbours nk g

Full Usage: AdjGraph.getNeighbours nk g

Parameters:
    nk : 'NodeKey
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: seq<'NodeKey * 'EdgeData>

Returns the neighours of a node nk with their EdgeData

nk : 'NodeKey
g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: seq<'NodeKey * 'EdgeData>

AdjGraph.getNeighourhoodSubgraphByHops startingNode hopCount graph

Full Usage: AdjGraph.getNeighourhoodSubgraphByHops startingNode hopCount graph

Parameters:
    startingNode : 'NodeKey
    hopCount : int
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
startingNode : 'NodeKey
hopCount : int
graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

AdjGraph.getNodeOverlap graph1 graph2

Full Usage: AdjGraph.getNodeOverlap graph1 graph2

Parameters:
    graph1 : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
    graph2 : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: Set<'NodeKey>

Returns the overlapping nodes of two graphs

graph1 : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
graph2 : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: Set<'NodeKey>

AdjGraph.getNodeOverlapCount graph1 graph2

Full Usage: AdjGraph.getNodeOverlapCount graph1 graph2

Parameters:
    graph1 : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
    graph2 : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: int

Returns the amount of overlapping nodes of two graphs

graph1 : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
graph2 : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: int

AdjGraph.getNodes g

Full Usage: AdjGraph.getNodes g

Parameters:
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: seq<'NodeKey * 'NodeData>

Returns all the nodes as a seq of 'NodeKey * 'NodeData Tuple

g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: seq<'NodeKey * 'NodeData>

AdjGraph.getSubGraphOfNodeSeq graph nodeSeq

Full Usage: AdjGraph.getSubGraphOfNodeSeq graph nodeSeq

Parameters:
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
    nodeSeq : seq<'NodeKey>

Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
nodeSeq : seq<'NodeKey>
Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

AdjGraph.iterEdge action graph

Full Usage: AdjGraph.iterEdge action graph

Parameters:
    action : 'NodeKey -> 'NodeKey -> 'EdgeData -> unit
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Applies the given function to each node of the graph

action : 'NodeKey -> 'NodeKey -> 'EdgeData -> unit
graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

AdjGraph.iterNodes action graph

Full Usage: AdjGraph.iterNodes action graph

Parameters:
    action : 'NodeKey -> 'NodeData -> unit
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Applies the given function to each node of the graph

action : 'NodeKey -> 'NodeData -> unit
graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

AdjGraph.iteriNodes action graph

Full Usage: AdjGraph.iteriNodes action graph

Parameters:
    action : int -> 'NodeKey -> 'NodeData -> unit
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Applies the given function to each node of the graph

action : int -> 'NodeKey -> 'NodeData -> unit
graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

AdjGraph.map mapping graph

Full Usage: AdjGraph.map mapping graph

Parameters:
    mapping : 'NodeKey -> 'NodeData -> 'NodeKey * 'NodeData
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: Dictionary<'NodeKey, ('NodeData * Dictionary<'NodeKey, 'EdgeData>)>

Builds a graph whose elements are the results of applying the given function to each of the node.

mapping : 'NodeKey -> 'NodeData -> 'NodeKey * 'NodeData
graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: Dictionary<'NodeKey, ('NodeData * Dictionary<'NodeKey, 'EdgeData>)>

AdjGraph.mapContexts mapping g

Full Usage: AdjGraph.mapContexts mapping g

Parameters:
    mapping : 'NodeData * Dictionary<'NodeKey, 'EdgeData> -> 'T
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: seq<'NodeKey * 'T>

Maps contexts of the graph.

mapping : 'NodeData * Dictionary<'NodeKey, 'EdgeData> -> 'T
g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: seq<'NodeKey * 'T>

AdjGraph.ofSeq edgelist

Full Usage: AdjGraph.ofSeq edgelist

Parameters:
    edgelist : seq<'NodeKey * 'NodeData * 'NodeKey * 'NodeData * 'EdgeData>

Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Creates an Adjacency graph of a sequence of edges

edgelist : seq<'NodeKey * 'NodeData * 'NodeKey * 'NodeData * 'EdgeData>
Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

AdjGraph.removeEdge nkSource nkTarget g

Full Usage: AdjGraph.removeEdge nkSource nkTarget g

Parameters:
    nkSource : 'NodeKey
    nkTarget : 'NodeKey
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Remove an edge

nkSource : 'NodeKey
nkTarget : 'NodeKey
g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

AdjGraph.removeMany edgeSeq removeF g

Full Usage: AdjGraph.removeMany edgeSeq removeF g

Parameters:
    edgeSeq : seq<'NodeKey * 'NodeKey>
    removeF : 'NodeKey -> 'NodeKey -> AdjGraph<'NodeKey, 'NodeData, 'EdgeData> -> AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Removes all edges according to the given removeF

edgeSeq : seq<'NodeKey * 'NodeKey>
removeF : 'NodeKey -> 'NodeKey -> AdjGraph<'NodeKey, 'NodeData, 'EdgeData> -> AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

AdjGraph.removeNode nk g

Full Usage: AdjGraph.removeNode nk g

Parameters:
    nk : 'NodeKey
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Remove the Node and all edges connected to it

nk : 'NodeKey
g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

AdjGraph.setNodeData n nd g

Full Usage: AdjGraph.setNodeData n nd g

Parameters:
    n : 'NodeKey
    nd : 'NodeData
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Set the NodeData of a given NodeKey to the given NodeData

n : 'NodeKey
nd : 'NodeData
g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

AdjGraph.toAdjMatrix graph

Full Usage: AdjGraph.toAdjMatrix graph

Parameters:
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: AdjMatrix<'NodeKey, 'NodeData, 'EdgeData>

Converts Adjacency graph to its Adjacency matrix representation

graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: AdjMatrix<'NodeKey, 'NodeData, 'EdgeData>

AdjGraph.toArray2D nodeIndexer

Full Usage: AdjGraph.toArray2D nodeIndexer

Parameters:
    nodeIndexer : 'NodeKey -> int

Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData> -> 'EdgeData[,] An array2d

Converts the FGraph to an array2d

nodeIndexer : 'NodeKey -> int
Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData> -> 'EdgeData[,]

An array2d

AdjGraph.toEdgeSeq graph

Full Usage: AdjGraph.toEdgeSeq graph

Parameters:
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: seq<'NodeKey * 'NodeKey * 'EdgeData>

Returns the FGraph edges as a sequence of edges

graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: seq<'NodeKey * 'NodeKey * 'EdgeData>

AdjGraph.toNodeArray graph

Full Usage: AdjGraph.toNodeArray graph

Parameters:
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: ('NodeKey * 'NodeData)[]

Converts nodes to nodeKey * nodeData array

graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: ('NodeKey * 'NodeData)[]

AdjGraph.toSeq graph

Full Usage: AdjGraph.toSeq graph

Parameters:
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: seq<'NodeKey * 'NodeData * 'NodeKey * 'NodeData * 'EdgeData>

Returns the Adjacency graph conetent as a sequence of edges

graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: seq<'NodeKey * 'NodeData * 'NodeKey * 'NodeData * 'EdgeData>

AdjGraph.tryAddEdge nk1 nk2 ed g

Full Usage: AdjGraph.tryAddEdge nk1 nk2 ed g

Parameters:
    nk1 : 'NodeKey
    nk2 : 'NodeKey
    ed : 'EdgeData
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData> option

Adds a labeled edge to the graph.

nk1 : 'NodeKey
nk2 : 'NodeKey
ed : 'EdgeData
g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: AdjGraph<'NodeKey, 'NodeData, 'EdgeData> option

AdjGraph.tryFindEdge nk1 nk2 g

Full Usage: AdjGraph.tryFindEdge nk1 nk2 g

Parameters:
    nk1 : 'NodeKey
    nk2 : 'NodeKey
    g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: ('NodeKey * 'NodeKey * 'EdgeData) option

Lookup a labeled edge in the graph, returning a Some value if a binding exists and None if not.

nk1 : 'NodeKey
nk2 : 'NodeKey
g : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: ('NodeKey * 'NodeKey * 'EdgeData) option