FGraph Type

Constructors

Constructor Description

FGraph()

Full Usage: FGraph()

Returns: FGraph
Returns: FGraph

Static members

Static member Description

FGraph.addEdge nk1 nk2 ed g

Full Usage: FGraph.addEdge nk1 nk2 ed g

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

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

Adds a labeled, directed edge to the graph.

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

FGraph.addEdges edgeSeq g

Full Usage: FGraph.addEdges edgeSeq g

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

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

Add labeled, directed edges to the graph.

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

FGraph.addElement nk1 nd1 nk2 nd2 ed g

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

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

Returns: FGraph<'NodeKey, 'NodeData, 'EdgeData> FGraph with new element

Adds a labeled, directed edge to the graph.

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

FGraph with new element

FGraph.addNode nk nd g

Full Usage: FGraph.addNode nk nd g

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

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

Adds a labeled node to the graph.

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

FGraph.addNodes nodeSeq g

Full Usage: FGraph.addNodes nodeSeq g

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

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

Adds labeled nodes to the graph.

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

FGraph.clone graph

Full Usage: FGraph.clone graph

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

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

Clones an existing graph Note: Current implementation subject to change [see here for further info](https://github.com/fslaborg/Graphoscope/issues/52#issuecomment-1741746696)

graph : FGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: FGraph<'NodeKey, 'NodeData, 'EdgeData>

FGraph

FGraph.containsEdge v1 v2 g

Full Usage: FGraph.containsEdge v1 v2 g

Parameters:
    v1 : 'NodeKey
    v2 : 'NodeKey
    g : FGraph<'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 : FGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: bool

FGraph.containsNode vk g

Full Usage: FGraph.containsNode vk g

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

Returns: bool

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

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

FGraph.countEdges g

Full Usage: FGraph.countEdges g

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

Returns: int

Evaluates the number of edges in the graph.

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

FGraph.countNodes g

Full Usage: FGraph.countNodes g

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

Returns: int

Evaluates the number of nodes in the graph.

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

FGraph.create (nodes, edges)

Full Usage: FGraph.create (nodes, edges)

Parameters:
    nodes : seq<'NodeKey * 'NodeData>
    edges : seq<'NodeKey * 'NodeKey * 'EdgeData>

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

Creates a new graph with the given Data

nodes : seq<'NodeKey * 'NodeData>
edges : seq<'NodeKey * 'NodeKey * 'EdgeData>
Returns: FGraph<'NodeKey, 'NodeData, 'EdgeData>

FGraph

FGraph.create ()

Full Usage: FGraph.create ()

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

Creates a new graph with the given Data

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

FGraph

FGraph.createFromNodes nodes

Full Usage: FGraph.createFromNodes nodes

Parameters:
    nodes : seq<'NodeKey * 'NodeData>

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

Creates a new graph with the given node Data

nodes : seq<'NodeKey * 'NodeData>
Returns: FGraph<'NodeKey, 'NodeData, 'EdgeData>

FGraph

FGraph.findEdge v1 v2 g

Full Usage: FGraph.findEdge v1 v2 g

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

Returns: 'NodeKey * 'NodeKey * 'EdgeData

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

v1 : 'NodeKey
v2 : 'NodeKey
g : FGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: 'NodeKey * 'NodeKey * 'EdgeData

FGraph.findNode n g

Full Usage: FGraph.findNode n g

Parameters:
    n : 'NodeKey
    g : FGraph<'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 : FGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: 'NodeKey * 'NodeData

FGraph.getNodes g

Full Usage: FGraph.getNodes g

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

Returns: seq<'NodeKey * 'NodeData>

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

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

FGraph.iterEdges action graph

Full Usage: FGraph.iterEdges action graph

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

Applies the given function on each egdge of the graph

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

FGraph.iteriEdges action graph

Full Usage: FGraph.iteriEdges action graph

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

Applies the given function on every edge of the graph, which also receives an ascending integer index.

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

FGraph.mapContexts mapping g

Full Usage: FGraph.mapContexts mapping g

Parameters:
    mapping : FContext<'NodeKey, 'NodeData, 'EdgeData> -> 'T
    g : FGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: seq<'NodeKey * 'T>

Maps contexts of the graph.

mapping : FContext<'NodeKey, 'NodeData, 'EdgeData> -> 'T
g : FGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: seq<'NodeKey * 'T>

FGraph.ofSeq edgelist

Full Usage: FGraph.ofSeq edgelist

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

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

Creates an Adjacency graph of a sequence of edges

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

FGraph.removeEdge nkSource nkTarget g

Full Usage: FGraph.removeEdge nkSource nkTarget g

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

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

Remove a directed edge

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

FGraph.removeMany edgeSeq removeF g

Full Usage: FGraph.removeMany edgeSeq removeF g

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

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

Removes all edges according to the given removeF

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

FGraph.removeNode nk g

Full Usage: FGraph.removeNode nk g

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

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

FGraph.reverseEdges graph

Full Usage: FGraph.reverseEdges graph

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

Returns: Dictionary<'NodeKey, FContext<'NodeKey, 'NodeData, 'EdgeData>>

Creates an FGraph consisting of the Nodes of a given FGraph but with its directed Edges reversed.

graph : FGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: Dictionary<'NodeKey, FContext<'NodeKey, 'NodeData, 'EdgeData>>

FGraph.setNodeData n nd g

Full Usage: FGraph.setNodeData n nd g

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

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

Set the NodeData of a given NodeKey to the given NodeData

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

FGraph.toArray2D nodeIndexer

Full Usage: FGraph.toArray2D nodeIndexer

Parameters:
    nodeIndexer : 'NodeKey -> int

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

Converts the FGraph to an array2d

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

An array2d

FGraph.toEdgeSeq graph

Full Usage: FGraph.toEdgeSeq graph

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

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

Returns the FGraph edges as a sequence of edges

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

FGraph.toSeq graph

Full Usage: FGraph.toSeq graph

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

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

Returns the FGraph content as a sequence of edges

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

FGraph.tryAddEdge nk1 nk2 ed g

Full Usage: FGraph.tryAddEdge nk1 nk2 ed g

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

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

Adds a labeled, directed edge to the graph.

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

FGraph.tryFindEdge nk1 nk2 g

Full Usage: FGraph.tryFindEdge nk1 nk2 g

Parameters:
    nk1 : 'NodeKey
    nk2 : 'NodeKey
    g : FGraph<'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 : FGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: ('NodeKey * 'NodeKey * 'EdgeData) option