Table of Contents

Method AddEdge

Namespace
Bonsai.Dag
Assembly
Bonsai.Core.dll

AddEdge(Node<TNodeValue, TEdgeLabel>, Node<TNodeValue, TEdgeLabel>, TEdgeLabel)

Creates and adds a new labeled edge linking the specified nodes in the directed graph.

public Edge<TNodeValue, TEdgeLabel> AddEdge(Node<TNodeValue, TEdgeLabel> from, Node<TNodeValue, TEdgeLabel> to, TEdgeLabel label)

Parameters

from Node<TNodeValue, TEdgeLabel>

The node that is the source of the edge.

to Node<TNodeValue, TEdgeLabel>

The node that is the target of the edge.

label TEdgeLabel

The value of the edge label.

Returns

Edge<TNodeValue, TEdgeLabel>

The created edge.

AddEdge(Node<TNodeValue, TEdgeLabel>, Edge<TNodeValue, TEdgeLabel>)

Adds a labeled outgoing edge from the specified node in the directed graph.

public void AddEdge(Node<TNodeValue, TEdgeLabel> from, Edge<TNodeValue, TEdgeLabel> edge)

Parameters

from Node<TNodeValue, TEdgeLabel>

The node that is the source of the edge.

edge Edge<TNodeValue, TEdgeLabel>

The labeled outgoing edge to be added to the directed graph.