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
edge
IDirectedGraphEdge<TKey, TNodeValue, TEdgeValue>Source graph edge.
node
IDirectedGraphNode<TKey, TNodeValue, TEdgeValue>Expected From node.
Returns
- DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue>?
New DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue> instance or null if the provided
node
does not belong to the specifiededge
.
Type Parameters
TKey
Graph's key type.
TNodeValue
Graph node value's type.
TEdgeValue
Graph 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
edge
IDirectedGraphEdge<TKey, TNodeValue, TEdgeValue>Source graph edge.
Returns
- DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue>
New DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue> instance.
Type Parameters
TKey
Graph's key type.
TNodeValue
Graph node's value type.
TEdgeValue
Graph 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
edge
IDirectedGraphEdge<TKey, TNodeValue, TEdgeValue>Source graph edge.
Returns
- DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue>
New DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue> instance.
Type Parameters
TKey
Graph's key type.
TNodeValue
Graph node's value type.
TEdgeValue
Graph edge's value type.