Struct DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue>
- Namespace
- LfrlAnvil.Collections
- Assembly
- LfrlAnvil.Collections.dll
Represents an information about two IDirectedGraphNode<TKey, TNodeValue, TEdgeValue> instances connected together through the same IDirectedGraphEdge<TKey, TNodeValue, TEdgeValue> instance.
public readonly struct DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue> where TKey : notnull
Type Parameters
TKey
Graph entry's key type.
TNodeValue
Graph node's value type.
TEdgeValue
Graph edge's value type.
- Inherited Members
Properties
CanBeReached
public bool CanBeReached { get; }
Property Value
CanReach
public bool CanReach { get; }
Property Value
Direction
public GraphDirection Direction { get; }
Property Value
Edge
public IDirectedGraphEdge<TKey, TNodeValue, TEdgeValue> Edge { get; }
Property Value
- IDirectedGraphEdge<TKey, TNodeValue, TEdgeValue>
From
Source graph node.
public IDirectedGraphNode<TKey, TNodeValue, TEdgeValue> From { get; }
Property Value
- IDirectedGraphNode<TKey, TNodeValue, TEdgeValue>
To
Destination graph node.
public IDirectedGraphNode<TKey, TNodeValue, TEdgeValue> To { get; }
Property Value
- IDirectedGraphNode<TKey, TNodeValue, TEdgeValue>
Methods
ForSource(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> ForSource(IDirectedGraphEdge<TKey, TNodeValue, TEdgeValue> edge)
Parameters
edge
IDirectedGraphEdge<TKey, TNodeValue, TEdgeValue>Source graph edge.
Returns
- DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue>
New DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue> instance.
ForTarget(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> ForTarget(IDirectedGraphEdge<TKey, TNodeValue, TEdgeValue> edge)
Parameters
edge
IDirectedGraphEdge<TKey, TNodeValue, TEdgeValue>Source graph edge.
Returns
- DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue>
New DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue> instance.
ToString()
Returns a string representation of this DirectedGraphEdgeInfo<TKey, TNodeValue, TEdgeValue> instance.
[Pure]
public override string ToString()
Returns
- string
String representation.