public TEdgeData GetEdgeData(
     VerticesPair <int> verticesPair)
 {
     return(this[verticesPair.Source].GetEdgeToIndex(verticesPair.Destination));
 }
 public bool TryGetEdgeData(
     VerticesPair <int> verticesPair,
     out TEdgeData edgeData)
 {
     return(TryGetEdgeData(verticesPair.Source, verticesPair.Destination, out edgeData));
 }
Example #3
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="Edge{TVertexKey, TEdgeData}" /> structure with vertices pair and
 ///     given edge data.
 /// </summary>
 /// <param name="vertices">The vertices.</param>
 /// <param name="edgeData">The edge data.</param>
 public Edge(VerticesPair <TVertexKey> vertices, TEdgeData edgeData)
 {
     Vertices = vertices;
     Data     = edgeData;
 }
 public bool ContainsBiDirectionalEdge(
     VerticesPair <int> edge)
 {
     return(ContainsBiDirectionalEdge(edge.Source, edge.Destination));
 }
Example #5
0
 public void Deconstruct(out VerticesPair <TVertexKey> vertices, out TEdgeData edgeData)
 {
     vertices = Vertices;
     edgeData = Data;
 }