Edges Module

Functions for edges of undirected Graphs

Functions and values

Function or value Description

add (arg1, arg2, arg3) g

Full Usage: add (arg1, arg2, arg3) g

Parameters:
    arg0 : 'Vertex
    arg1 : 'Vertex
    arg2 : 'Edge
    g : Graph<'Vertex, 'Label, 'Edge>

Returns: Graph<'Vertex, 'Label, 'Edge>

Adds a labeled, undirected edge to the graph.

arg0 : 'Vertex
arg1 : 'Vertex
arg2 : 'Edge
g : Graph<'Vertex, 'Label, 'Edge>
Returns: Graph<'Vertex, 'Label, 'Edge>

addMany edges g

Full Usage: addMany edges g

Parameters:
    edges : LEdge<'Vertex, 'Edge> list
    g : Graph<'Vertex, 'Label, 'Edge>

Returns: Graph<'Vertex, 'Label, 'Edge>

Adds a list of labeled, undirected edges to the graph.

edges : LEdge<'Vertex, 'Edge> list
g : Graph<'Vertex, 'Label, 'Edge>
Returns: Graph<'Vertex, 'Label, 'Edge>

contains v1 v2 g

Full Usage: contains v1 v2 g

Parameters:
    v1 : 'Vertex
    v2 : 'Vertex
    g : Graph<'Vertex, 'Label, 'Edge>

Returns: bool

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

v1 : 'Vertex
v2 : 'Vertex
g : Graph<'Vertex, 'Label, 'Edge>
Returns: bool

count g

Full Usage: count g

Parameters:
    g : Graph<'Vertex, 'Label, 'Edge>

Returns: int

Evaluates the number of edges in the graph.

g : Graph<'Vertex, 'Label, 'Edge>
Returns: int

find v1 v2 g

Full Usage: find v1 v2 g

Parameters:
    v1 : 'Vertex
    v2 : 'Vertex
    g : Graph<'Vertex, 'Label, 'Edge>

Returns: LEdge<'Vertex, 'Edge>

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

v1 : 'Vertex
v2 : 'Vertex
g : Graph<'Vertex, 'Label, 'Edge>
Returns: LEdge<'Vertex, 'Edge>

fold folder state graph

Full Usage: fold folder state graph

Parameters:
    folder : 'State -> 'Vertex -> 'Vertex -> 'Edge -> 'State
    state : 'State
    graph : Graph<'Vertex, 'Label, 'Edge>

Returns: 'State
folder : 'State -> 'Vertex -> 'Vertex -> 'Edge -> 'State
state : 'State
graph : Graph<'Vertex, 'Label, 'Edge>
Returns: 'State

iter action graph

Full Usage: iter action graph

Parameters:
    action : 'Vertex -> 'Vertex -> 'Edge -> unit
    graph : Graph<'Vertex, 'Label, 'Edge>

Performs a given function on every edge of the graph.

action : 'Vertex -> 'Vertex -> 'Edge -> unit
graph : Graph<'Vertex, 'Label, 'Edge>

iteri action graph

Full Usage: iteri action graph

Parameters:
    action : int -> 'Vertex -> 'Vertex -> 'Edge -> unit
    graph : Graph<'Vertex, 'Label, 'Edge>

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

action : int -> 'Vertex -> 'Vertex -> 'Edge -> unit
graph : Graph<'Vertex, 'Label, 'Edge>

map mapping g

Full Usage: map mapping g

Parameters:
    mapping : 'Vertex -> 'Vertex -> 'Edge -> 'REdge
    g : Graph<'Vertex, 'Label, 'Edge>

Returns: Graph<'Vertex, 'Label, 'REdge>

Maps edgelabels of the graph.

mapping : 'Vertex -> 'Vertex -> 'Edge -> 'REdge
g : Graph<'Vertex, 'Label, 'Edge>
Returns: Graph<'Vertex, 'Label, 'REdge>

remove (arg1, arg2) g

Full Usage: remove (arg1, arg2) g

Parameters:
    arg0 : 'Vertex
    arg1 : 'Vertex
    g : Graph<'Vertex, 'Label, 'Edge>

Returns: Map<'Vertex, MContext<'Vertex, 'Label, 'Edge>>

Removes an edge from the graph.

arg0 : 'Vertex
arg1 : 'Vertex
g : Graph<'Vertex, 'Label, 'Edge>
Returns: Map<'Vertex, MContext<'Vertex, 'Label, 'Edge>>

removeMany edges g

Full Usage: removeMany edges g

Parameters:
    edges : Edge<'Vertex> list
    g : Graph<'Vertex, 'Label, 'Edge>

Returns: Map<'Vertex, MContext<'Vertex, 'Label, 'Edge>>

Removes a list of edges from the graph.

edges : Edge<'Vertex> list
g : Graph<'Vertex, 'Label, 'Edge>
Returns: Map<'Vertex, MContext<'Vertex, 'Label, 'Edge>>

toEdgeList g

Full Usage: toEdgeList g

Parameters:
    g : Graph<'Vertex, 'Label, 'Edge>

Returns: LEdge<'Vertex, 'Edge> list

Creates a list of all edges and their labels.

g : Graph<'Vertex, 'Label, 'Edge>
Returns: LEdge<'Vertex, 'Edge> list

tryAdd (arg1, arg2, arg3) g

Full Usage: tryAdd (arg1, arg2, arg3) g

Parameters:
    arg0 : 'Vertex
    arg1 : 'Vertex
    arg2 : 'Edge
    g : Graph<'Vertex, 'Label, 'Edge>

Returns: Graph<'Vertex, 'Label, 'Edge> option

Adds a labeled, undirected edge to the graph.

arg0 : 'Vertex
arg1 : 'Vertex
arg2 : 'Edge
g : Graph<'Vertex, 'Label, 'Edge>
Returns: Graph<'Vertex, 'Label, 'Edge> option

tryAddMany edges g

Full Usage: tryAddMany edges g

Parameters:
    edges : LEdge<'Vertex, 'Edge> list
    g : Graph<'Vertex, 'Label, 'Edge>

Returns: Graph<'Vertex, 'Label, 'Edge> option

Adds a list of labeled, undirected edges to the graph.

edges : LEdge<'Vertex, 'Edge> list
g : Graph<'Vertex, 'Label, 'Edge>
Returns: Graph<'Vertex, 'Label, 'Edge> option

tryFind v1 v2 g

Full Usage: tryFind v1 v2 g

Parameters:
    v1 : 'Vertex
    v2 : 'Vertex
    g : Graph<'Vertex, 'Label, 'Edge>

Returns: LEdge<'Vertex, 'Edge> option

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

v1 : 'Vertex
v2 : 'Vertex
g : Graph<'Vertex, 'Label, 'Edge>
Returns: LEdge<'Vertex, 'Edge> option