Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="connectedVertex">Связанная вершина</param>
 /// <param name="weight">Вес ребра</param>
 public GraphEdge(GraphVertex connectedVertex, int weight)
 {
     ConnectedVertex = connectedVertex;
     EdgeWeight      = weight;
 }
Exemplo n.º 3
0
 public T1(GraphVertex beginVertex) : this(beginVertex, new List <GraphEdge>(), 0)
 {
 }
Exemplo n.º 4
0
 /// <summary>
 /// Добавить ребро
 /// </summary>
 /// <param name="vertex">Вершина</param>
 /// <param name="edgeWeight">Вес</param>
 public void AddEdge(GraphVertex vertex, int edgeWeight)
 {
     AddEdge(new GraphEdge(vertex, edgeWeight));
 }