Method AddEdge
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
TEdgeLabelThe 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)