Table of Contents

Method InsertEdge

Namespace
Bonsai.Dag
Assembly
Bonsai.Core.dll

InsertEdge(Node<TNodeValue, TEdgeLabel>, int, Node<TNodeValue, TEdgeLabel>, TEdgeLabel)

Creates and inserts a labeled outgoing edge of the source node at the specified index.

public Edge<TNodeValue, TEdgeLabel> InsertEdge(Node<TNodeValue, TEdgeLabel> from, int edgeIndex, Node<TNodeValue, TEdgeLabel> to, TEdgeLabel label)

Parameters

from Node<TNodeValue, TEdgeLabel>

The node that is the source of the edge.

edgeIndex int

The zero-based index at which the edge should be inserted on the successor list of the from node.

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.

InsertEdge(Node<TNodeValue, TEdgeLabel>, int, Edge<TNodeValue, TEdgeLabel>)

Inserts a labeled outgoing edge of a source node at the specified index.

public void InsertEdge(Node<TNodeValue, TEdgeLabel> from, int edgeIndex, Edge<TNodeValue, TEdgeLabel> edge)

Parameters

from Node<TNodeValue, TEdgeLabel>

The node that is the source of the edge.

edgeIndex int

The zero-based index at which the edge should be inserted on the successor list of the from node.

edge Edge<TNodeValue, TEdgeLabel>

The labeled outgoing edge that is to be inserted at the specified index on the successor list of the from node.