Changeset 3824 for trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Symbol.cs
- Timestamp:
- 05/17/10 15:55:45 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Symbol.cs
r3742 r3824 41 41 set { 42 42 if (value < 0.0) throw new ArgumentException("InitialFrequency must be positive"); 43 initialFrequency = value; 43 if (value != initialFrequency) { 44 initialFrequency = value; 45 OnChanged(EventArgs.Empty); 46 } 44 47 } 48 } 49 public override bool CanChangeName { 50 get { return false; } 45 51 } 46 52 #endregion … … 58 64 59 65 public override IDeepCloneable Clone(Cloner cloner) { 60 Symbol clone = (Symbol) 66 Symbol clone = (Symbol)base.Clone(cloner); 61 67 clone.initialFrequency = initialFrequency; 62 68 return clone; 63 69 } 70 71 #region events 72 public event EventHandler Changed; 73 protected void OnChanged(EventArgs e) { 74 EventHandler handlers = Changed; 75 if (handlers != null) 76 handlers(this, e); 77 } 78 #endregion 64 79 } 65 80 }
Note: See TracChangeset
for help on using the changeset viewer.