Graph Module

Functions and values

Function or value Description

create vertices edges

Full Usage: create vertices edges

Parameters:
    vertices : LVertex<'Vertex, 'Label> list
    edges : LEdge<'Vertex, 'Edge> list

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

Creates a directed graph from a list of vertices and a list of edges

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

toAdjacencyMatrix g

Full Usage: toAdjacencyMatrix g

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

Returns: 'Edge[][]

Transforms a graph into an adjacency matrix of its edges.

g : Graph<'Vertex, 'Label, 'Edge>
Returns: 'Edge[][]

toAdjacencyMatrixBy projection g

Full Usage: toAdjacencyMatrixBy projection g

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

Returns: 'REdge[][]

Transfroms a graph into a adjacency matrix, maps every edge using the projection.

projection : 'Edge -> 'REdge
g : Graph<'Vertex, 'Label, 'Edge>
Returns: 'REdge[][]