protected Edge FindEdge(Vertix begin, Vertix end) { foreach (var i in Edges) { if (i.Begin == begin && i.End == end) { return(i); } } return(null); }
protected bool ExistsEdge(Vertix begin, Vertix end) { foreach (var i in Edges) { if (i.Begin == begin && i.End == end) { return(true); } } return(false); }
private void Canvas_MouseMove(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { Vertix v = InRadius(e); if (v != null) { v.Location = e.Location; Invalidate(); } } }
public WeightedEdge(Vertix begin, Vertix end, int weight) : base(begin, end) { Weight = weight; }
/// <summary> /// Конструктор /// </summary> /// <param name="begin"> /// Первая вершина /// </param> /// <param name="end"> /// Вторая вершина /// </param> public Edge(Vertix begin, Vertix end) { Begin = begin; End = end; }
/// <summary> /// Конструктор /// </summary> /// <param name="begin"> /// Начало ребра /// </param> /// <param name="end"> /// Конец ребра /// </param> public OrientedEdge(Vertix begin, Vertix end) : base(begin, end) { }
public EdgeWithFlow(Vertix begin, Vertix end, int weight, int flow) : base(begin, end) { Flow = flow; Weight = weight; }