Table of Contents

Method Predecessors

Namespace
Bonsai.Dag
Assembly
Bonsai.Core.dll

Predecessors<TNodeValue, TEdgeLabel>(DirectedGraph<TNodeValue, TEdgeLabel>, Node<TNodeValue, TEdgeLabel>)

Returns the sequence of predecessors to the specified node.

public static IEnumerable<Node<TNodeValue, TEdgeLabel>> Predecessors<TNodeValue, TEdgeLabel>(this DirectedGraph<TNodeValue, TEdgeLabel> source, Node<TNodeValue, TEdgeLabel> node)

Parameters

source DirectedGraph<TNodeValue, TEdgeLabel>

The source directed graph to search for predecessors.

node Node<TNodeValue, TEdgeLabel>

The node for which to obtain the sequence of predecessors.

Returns

IEnumerable<Node<TNodeValue, TEdgeLabel>>

A sequence containing all the predecessors to the specified node.

Type Parameters

TNodeValue

The type of the labels associated with graph nodes.

TEdgeLabel

The type of the labels associated with graph edges.