Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/30/14 13:06:52 (10 years ago)
Author:
bburlacu
Message:

#2215: Updated interfaces and graph components according to the reviewer comments (IDirectedGraph, DirectedGraph, Vertex, Arc).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BottomUpTreeDistance/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/DirectedGraph/Arc.cs

    r11229 r11238  
    3131  [StorableClass]
    3232  public class Arc : Item, IArc {
    33     public event EventHandler Changed;
    34     protected virtual void OnChanged(object sender, EventArgs args) {
    35       var changed = Changed;
    36       if (changed != null)
    37         changed(sender, args);
    38     }
    39 
    4033    [Storable]
    4134    public IVertex Source { get; private set; }
     
    4942      get { return label; }
    5043      set {
     44        if (label.Equals(value)) return;
    5145        label = value;
    5246        OnChanged(this, EventArgs.Empty);
     
    5953      get { return weight; }
    6054      set {
     55        if (weight.Equals(value)) return;
    6156        weight = value;
    6257        OnChanged(this, EventArgs.Empty);
     
    6964      get { return data; }
    7065      set {
     66        if (data == value) return;
    7167        data = value;
    7268        OnChanged(this, EventArgs.Empty);
     
    9490      return new Arc(this, cloner);
    9591    }
     92
     93    public event EventHandler Changed;
     94    protected virtual void OnChanged(object sender, EventArgs args) {
     95      var changed = Changed;
     96      if (changed != null)
     97        changed(sender, args);
     98    }
    9699  }
    97100
Note: See TracChangeset for help on using the changeset viewer.