Class DirectedGraphEdgeExtensions
- Namespace
- LfrlAnvil.Collections.Extensions
- Assembly
- LfrlAnvil.Collections.dll
Contains IDirectedGraphEdge<TKey, TNodeValue, TEdgeValue> extension methods.
public static class DirectedGraphEdgeExtensions
- Inheritance
-
DirectedGraphEdgeExtensions
- Inherited Members
Methods
GetInfo<TKey, TNodeValue, TEdgeValue>(IDirectedGraphEdge<TKey, TNodeValue, TEdgeValue>, IDirectedGraphNode<TKey, TNodeValue, TEdgeValue>)
Attempts to create a new DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue> instance
with the provided node being the From node.
[Pure]
public static DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue>? GetInfo<TKey, TNodeValue, TEdgeValue>(this IDirectedGraphEdge<TKey, TNodeValue, TEdgeValue> edge, IDirectedGraphNode<TKey, TNodeValue, TEdgeValue> node) where TKey : notnull
Parameters
edgeIDirectedGraphEdge<TKey, TNodeValue, TEdgeValue>Source graph edge.
nodeIDirectedGraphNode<TKey, TNodeValue, TEdgeValue>Expected From node.
Returns
- DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue>?
New DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue> instance or null if the provided
nodedoes not belong to the specifiededge.
Type Parameters
TKeyGraph's key type.
TNodeValueGraph node value's type.
TEdgeValueGraph edge value's type.
GetSourceInfo<TKey, TNodeValue, TEdgeValue>(IDirectedGraphEdge<TKey, TNodeValue, TEdgeValue>)
Creates a new DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue> instance with Source node being the From node.
[Pure]
public static DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue> GetSourceInfo<TKey, TNodeValue, TEdgeValue>(this IDirectedGraphEdge<TKey, TNodeValue, TEdgeValue> edge) where TKey : notnull
Parameters
edgeIDirectedGraphEdge<TKey, TNodeValue, TEdgeValue>Source graph edge.
Returns
- DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue>
New DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue> instance.
Type Parameters
TKeyGraph's key type.
TNodeValueGraph node's value type.
TEdgeValueGraph edge's value type.
GetTargetInfo<TKey, TNodeValue, TEdgeValue>(IDirectedGraphEdge<TKey, TNodeValue, TEdgeValue>)
Creates a new DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue> instance with Target node being the From node.
[Pure]
public static DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue> GetTargetInfo<TKey, TNodeValue, TEdgeValue>(this IDirectedGraphEdge<TKey, TNodeValue, TEdgeValue> edge) where TKey : notnull
Parameters
edgeIDirectedGraphEdge<TKey, TNodeValue, TEdgeValue>Source graph edge.
Returns
- DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue>
New DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue> instance.
Type Parameters
TKeyGraph's key type.
TNodeValueGraph node's value type.
TEdgeValueGraph edge's value type.