B2R2


Graph<'D, 'E, 'G> Type

The top-level graph data type. This one can be both directed or undirected.

Constructors

Constructor Description

Graph()

Full Usage: Graph()

Returns: Graph<'D, 'E, 'G>
Returns: Graph<'D, 'E, 'G>

Instance members

Instance member Description

this.AddEdge(src) (dst) (arg3)

Full Usage: this.AddEdge(src) (dst) (arg3)

Parameters:
Returns: 'G
Modifiers: abstract

Add an edge from src to dst.

src : Vertex<'D>
dst : Vertex<'D>
arg2 : 'E
Returns: 'G

this.AddVertex(arg1)

Full Usage: this.AddVertex(arg1)

Parameters:
    arg0 : 'D

Returns: Vertex<'D> * 'G
Modifiers: abstract

Add a vertex into the graph, and return a reference to the added vertex.

arg0 : 'D
Returns: Vertex<'D> * 'G

this.Clone()

Full Usage: this.Clone()

Returns: 'G
Modifiers: abstract

Clone the graph and create a new one.

Returns: 'G

this.ExistsVertex(arg1)

Full Usage: this.ExistsVertex(arg1)

Parameters:
Returns: bool
Modifiers: abstract

Check the existence of the given vertex from the graph.

arg0 : VertexID
Returns: bool

this.FindEdgeData(src) (dst)

Full Usage: this.FindEdgeData(src) (dst)

Parameters:
Returns: 'E
Modifiers: abstract

Find the data of the edge that spans from src to dst.

src : Vertex<'D>
dst : Vertex<'D>
Returns: 'E

this.FindVertexBy(arg1)

Full Usage: this.FindVertexBy(arg1)

Parameters:
Returns: Vertex<'D>
Modifiers: abstract

Find a vertex by the given function. This function returns the first element, in which the function returns true. When there is no such an element, the function raises an exception.

arg0 : Vertex<'D> -> bool
Returns: Vertex<'D>

this.FindVertexByData(arg1)

Full Usage: this.FindVertexByData(arg1)

Parameters:
    arg0 : 'D

Returns: Vertex<'D>
Modifiers: abstract

Find a vertex that has the given VertexData from the graph. It will raise an exception if such a vertex does not exist. Note that this function can be used only when each vertex always has unique VertexData.

arg0 : 'D
Returns: Vertex<'D>

this.FindVertexByID(arg1)

Full Usage: this.FindVertexByID(arg1)

Parameters:
Returns: Vertex<'D>
Modifiers: abstract

Find a vertex by its VertexID. This function raises an exception when there is no such a vertex.

arg0 : VertexID
Returns: Vertex<'D>

this.FoldEdge(arg1) (arg2)

Full Usage: this.FoldEdge(arg1) (arg2)

Parameters:
    arg0 : 'a -> Vertex<'D> -> Vertex<'D> -> 'E -> 'a
    arg1 : 'a

Returns: 'a
Modifiers: abstract

Fold every edge in the graph (the order can be arbitrary).

arg0 : 'a -> Vertex<'D> -> Vertex<'D> -> 'E -> 'a
arg1 : 'a
Returns: 'a

this.FoldVertex(arg1) (arg2)

Full Usage: this.FoldVertex(arg1) (arg2)

Parameters:
    arg0 : 'a -> Vertex<'D> -> 'a
    arg1 : 'a

Returns: 'a
Modifiers: abstract

Fold every vertex (the order can be arbitrary).

arg0 : 'a -> Vertex<'D> -> 'a
arg1 : 'a
Returns: 'a

this.GetSize()

Full Usage: this.GetSize()

Returns: int
Modifiers: abstract

Number of vertices.

Returns: int

this.GetVertices()

Full Usage: this.GetVertices()

Returns: Set<Vertex<'D>>
Modifiers: abstract

Get a set of all vertices in the graph.

Returns: Set<Vertex<'D>>

this.ImplementationType

Full Usage: this.ImplementationType

Returns: GraphImplementationType
Modifiers: abstract

Graph implementation type.

Returns: GraphImplementationType

this.IsEmpty()

Full Usage: this.IsEmpty()

Returns: bool
Modifiers: abstract

Is this empty? A graph is empty when there is no vertex in the graph.

Returns: bool

this.IterEdge(arg1)

Full Usage: this.IterEdge(arg1)

Parameters:
Modifiers: abstract

Fold every edge in the graph (the order can be arbitrary).

arg0 : Vertex<'D> -> Vertex<'D> -> 'E -> unit

this.IterVertex(arg1)

Full Usage: this.IterVertex(arg1)

Parameters:
Modifiers: abstract

Iterate every vertex (the order can be arbitrary).

arg0 : Vertex<'D> -> unit

this.RemoveEdge(src) (dst)

Full Usage: this.RemoveEdge(src) (dst)

Parameters:
Returns: 'G
Modifiers: abstract

Remove the edge that spans from src to dst.

src : Vertex<'D>
dst : Vertex<'D>
Returns: 'G

this.RemoveVertex(arg1)

Full Usage: this.RemoveVertex(arg1)

Parameters:
Returns: 'G
Modifiers: abstract

Remove the given vertex from the graph.

arg0 : Vertex<'D>
Returns: 'G

this.SubGraph(arg1)

Full Usage: this.SubGraph(arg1)

Parameters:
Returns: 'G
Modifiers: abstract

Return a subgraph that contains only the set of vertices.

arg0 : Set<Vertex<'D>>
Returns: 'G

this.ToDOTStr(arg1) (arg2) (arg3)

Full Usage: this.ToDOTStr(arg1) (arg2) (arg3)

Parameters:
    arg0 : string
    arg1 : Vertex<'D> -> string
    arg2 : Edge<'E> -> string

Returns: string
Modifiers: abstract

Return the DOT-representation of this graph.

arg0 : string
arg1 : Vertex<'D> -> string
arg2 : Edge<'E> -> string
Returns: string

this.TryFindEdgeData(src) (dst)

Full Usage: this.TryFindEdgeData(src) (dst)

Parameters:
Returns: 'E option
Modifiers: abstract
src : Vertex<'D>
dst : Vertex<'D>
Returns: 'E option

this.TryFindVertexBy(arg1)

Full Usage: this.TryFindVertexBy(arg1)

Parameters:
Returns: Vertex<'D> option
Modifiers: abstract

Find a vertex by the given function without raising an exception.

arg0 : Vertex<'D> -> bool
Returns: Vertex<'D> option

this.TryFindVertexByData(arg1)

Full Usage: this.TryFindVertexByData(arg1)

Parameters:
    arg0 : 'D

Returns: Vertex<'D> option
Modifiers: abstract

Find a vertex that has the given VertexData from the graph. This function does not raise an exception unlike FindVertexByData.

arg0 : 'D
Returns: Vertex<'D> option

this.TryFindVertexByID(arg1)

Full Usage: this.TryFindVertexByID(arg1)

Parameters:
Returns: Vertex<'D> option
Modifiers: abstract

Find a vertex by its VertexID. This function returns an Option type.

arg0 : VertexID
Returns: Vertex<'D> option