Пример #1
0
 /// <summary>
 /// Добавить ребро
 /// </summary>
 /// <param name="vertex">Вершина</param>
 /// <param name="edgeWeight">Вес</param>
 public void AddEdge(GraphVertex vertex, int edgeWeight)
 {
     AddEdge(new GraphEdge(vertex, edgeWeight));
 }
Пример #2
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="connectedVertex">Связанная вершина</param>
 /// <param name="weight">Вес ребра</param>
 public GraphEdge(GraphVertex connectedVertex, int weight)
 {
     ConnectedVertex = connectedVertex;
     EdgeWeight      = weight;
 }