- Timestamp:
- 04/12/19 07:48:00 (6 years ago)
- Location:
- branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Parser/IntervalConstraint.cs
r16774 r16776 12 12 [Item("Interval Constraint", "Constraint on intervals.")] 13 13 public class IntervalConstraint : NamedItem { 14 public string Expression { get; set; } 14 private string expression; 15 public string Expression { 16 get => expression; 17 set { 18 if (value != expression) { 19 expression = value; 20 } 21 } 22 } 15 23 public string Definition { get; set; } 16 24 public Interval Interval { get; set; } 17 public bool InclusiveLowerBound { get; set; } 25 private bool inclusiveLowerBound; 26 27 public bool InclusiveLowerBound { 28 get => inclusiveLowerBound; 29 set { 30 if (value != inclusiveLowerBound) { 31 inclusiveLowerBound = value; 32 OnChanged(EventArgs.Empty); 33 } 34 } 35 } 18 36 public bool InclusiveUpperBound { get; set; } 19 37 public bool IsDerivation { get; set; } -
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
r16774 r16776 181 181 "#double: upperbound of the interval" + Environment.NewLine + 182 182 "#bracket: open or closed regarding to open or closed interval definition" + Environment.NewLine + 183 "# Y2 in [0 .. 1.2]" + Environment.NewLine + Environment.NewLine +183 "#Target:Y2 in [0 .. 1.2]" + Environment.NewLine + Environment.NewLine + 184 184 "#Constraints on model parameters:" + Environment.NewLine + 185 185 "#derivation symbol: d or ∂" + Environment.NewLine + -
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/ParsedConstraint.cs
r16774 r16776 25 25 public IEnumerable<IntervalConstraint> Constraints { 26 26 get => constraints; 27 set => constraints = value; 28 } 27 set { 28 constraints = value; 29 OnChanged(EventArgs.Empty); 30 } 31 } 29 32 30 33 protected IRegressionProblemData problemData; … … 38 41 : base(original, cloner) { 39 42 this.input = original.Input ?? string.Empty; 40 this.constraints = original.Constraints ?? new ItemList<IntervalConstraint>();43 this.constraints = original.Constraints ?? new CheckedItemList<IntervalConstraint>(); 41 44 42 45 } … … 48 51 public ParsedConstraint() { 49 52 this.input = string.Empty; 50 this.constraints = new ItemList<IntervalConstraint>();53 this.constraints = new CheckedItemList<IntervalConstraint>(); 51 54 } 52 55 53 56 public ParsedConstraint(string input, IRegressionProblemData problemData) { 54 57 this.input = input; 55 this.constraints = new ItemList<IntervalConstraint>();58 this.constraints = new CheckedItemList<IntervalConstraint>(); 56 59 this.problemData = problemData; 57 60 } … … 61 64 this.constraints = constraints; 62 65 } 66 67 public event EventHandler Changed; 68 protected virtual void OnChanged(EventArgs e) { 69 EventHandler handlers = Changed; 70 if (handlers != null) 71 handlers(this, e); 72 } 63 73 } 64 74 }
Note: See TracChangeset
for help on using the changeset viewer.