public static void AddEdge(this IGraphBuilder graph, int from, int to, int edge, EdgeDirectionType directionType = EdgeDirectionType.Undirected) { graph.AddEdge(new Vertex { Id = from }, new Vertex { Id = to }, new Edge { Id = edge, DirectionType = directionType }); }
public Graph(EdgeDirectionType directionType = EdgeDirectionType.Undirected) { DirectionType = directionType; _vertices = new Dictionary <int, AdjacencyVertex>(); _edges = new Dictionary <int, AdjacencyEdge>(); }