Exemplo n.º 1
0
 public static Vertex ToImmutable(this MutableVertex mutable)
 {
     return(new Vertex(mutable.Id, mutable.Label));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creates new edge connecting given vertices.
 /// </summary>
 /// <param name="v1">Vertex to be connected be new edge.</param>
 /// <param name="v1">Other vertex to be connected be new edge.</param>
 /// <returns>Created edge.</returns>
 public static MutableEdge Connecting(this MutableVertex v1, MutableVertex v2)
 {
     return(new MutableEdge {
         Vertex1 = v1, Vertex2 = v2, Label = $"e{v1.Id}:{v2.Id}"
     });
 }