Header menu logo B2R2

Serializer Type

Represents a serializer of a graph.

Static members

Static member Description

Serializer.FromJson(json, gConstructor, vConstructor, eConstructor)

Full Usage: Serializer.FromJson(json, gConstructor, vConstructor, eConstructor)

Parameters:
    json : string - The JSON string that contains a serialized graph.
    gConstructor : unit -> IDiGraph<'V, 'E> - Constructs an empty graph.
    vConstructor : string -> 'V - Constructs vertex data from a vertex label.
    eConstructor : string -> 'E - Constructs edge data from an edge label.

Returns: IDiGraph<'V, 'E>
Type parameters: 'V, 'E (requires equality and equality)

Imports the graph from the given JSON string.

json : string

The JSON string that contains a serialized graph.

gConstructor : unit -> IDiGraph<'V, 'E>

Constructs an empty graph.

vConstructor : string -> 'V

Constructs vertex data from a vertex label.

eConstructor : string -> 'E

Constructs edge data from an edge label.

Returns: IDiGraph<'V, 'E>

Serializer.ToDOT(g, name, vertexFn, edgeFn)

Full Usage: Serializer.ToDOT(g, name, vertexFn, edgeFn)

Parameters:
Returns: string
Type parameters: 'a, 'b, 'c (requires equality and equality)

Exports the given graph to a string in the DOT format using the given vertex and edge label functions.

g : IDiGraphAccessible<'a, 'b>
name : 'c
vertexFn : IVertex<'a> -> string
edgeFn : Edge<'a, 'b> -> string
Returns: string

Serializer.ToDOT(g, name)

Full Usage: Serializer.ToDOT(g, name)

Parameters:
Returns: string
Type parameters: 'a, 'b, 'c (requires equality and equality)

Exports the given graph to a string in the DOT format.

g : IDiGraphAccessible<'a, 'b>
name : 'c
Returns: string

Serializer.ToJson(g, vertexFn, edgeFn)

Full Usage: Serializer.ToJson(g, vertexFn, edgeFn)

Parameters:
    g : IDiGraphAccessible<'a, 'b> - The graph to export.
    vertexFn : IVertex<'a> -> string - Converts each vertex to a label.
    edgeFn : Edge<'a, 'b> -> string - Converts each edge to a label.

Returns: string
Type parameters: 'a, 'b (requires equality and equality)

Exports the given graph to a string in the JSON format.

g : IDiGraphAccessible<'a, 'b>

The graph to export.

vertexFn : IVertex<'a> -> string

Converts each vertex to a label.

edgeFn : Edge<'a, 'b> -> string

Converts each edge to a label.

Returns: string

Serializer.ToJson(g)

Full Usage: Serializer.ToJson(g)

Parameters:
Returns: string
Type parameters: 'a, 'b (requires equality and equality)

Exports the given graph to a string in the JSON format using the default string representations of vertices and edges as labels.

g : IDiGraphAccessible<'a, 'b>
Returns: string

Type something to start searching.