public T1(GraphVertex beginVertex, List <GraphEdge> graphEdges, int countEdgeWeight) { BeginVertex = beginVertex; GraphEdge[] mas = new GraphEdge[graphEdges.Count]; graphEdges.CopyTo(mas); GraphEdges = mas.ToList(); CountEdgeWeight = countEdgeWeight; }
/// <summary> /// Конструктор /// </summary> /// <param name="connectedVertex">Связанная вершина</param> /// <param name="weight">Вес ребра</param> public GraphEdge(GraphVertex connectedVertex, int weight) { ConnectedVertex = connectedVertex; EdgeWeight = weight; }
public T1(GraphVertex beginVertex) : this(beginVertex, new List <GraphEdge>(), 0) { }
/// <summary> /// Добавить ребро /// </summary> /// <param name="vertex">Вершина</param> /// <param name="edgeWeight">Вес</param> public void AddEdge(GraphVertex vertex, int edgeWeight) { AddEdge(new GraphEdge(vertex, edgeWeight)); }