Changeset 17370 for branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/IntervalConstraint.cs
- Timestamp:
- 11/25/19 13:39:43 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/IntervalConstraint.cs
r16964 r17370 98 98 99 99 [Storable] 100 private bool inclusiveLowerBound;101 public bool InclusiveLowerBound {102 get => inclusiveLowerBound;103 set {104 if (inclusiveLowerBound == value) return;105 inclusiveLowerBound = value;106 UpdateExpression();107 OnChanged();108 }109 }110 111 [Storable]112 private bool inclusiveUpperBound;113 public bool InclusiveUpperBound {114 get => inclusiveUpperBound;115 set {116 if (inclusiveUpperBound == value) return;117 inclusiveUpperBound = value;118 UpdateExpression();119 OnChanged();120 }121 }122 123 [Storable]124 100 private bool enabled; 125 101 public bool Enabled { … … 135 111 private IntervalConstraint(StorableConstructorFlag _) : base(_) { } 136 112 137 public IntervalConstraint(string expression, string variable, string target, int numberOfDerivation, Interval interval, bool inclusiveLowerBound, 138 bool inclusiveUpperBound, bool enabled) : base(){ 113 public IntervalConstraint(string expression, string variable, string target, int numberOfDerivation, Interval interval, bool enabled) : base(){ 139 114 this.expression = expression; 140 115 this.variable = variable; … … 142 117 this.numberOfDerivation = numberOfDerivation; 143 118 this.interval = interval; 144 this.inclusiveLowerBound = inclusiveLowerBound;145 this.inclusiveUpperBound = inclusiveUpperBound;146 119 this.enabled = enabled; 147 120 } … … 158 131 this.NumberOfDerivation = original.NumberOfDerivation; 159 132 this.Interval = original.Interval; 160 this.InclusiveLowerBound = original.InclusiveLowerBound;161 this.InclusiveUpperBound = original.InclusiveUpperBound;162 133 this.Enabled = original.Enabled; 163 134 } … … 189 160 expression = string.Format("Target:{0} in {1}{2} .. {3}{4}", 190 161 Variable, 191 (InclusiveLowerBound) ? "[" : "]",162 "[", 192 163 Interval?.LowerBound, 193 164 Interval?.UpperBound, 194 (InclusiveUpperBound) ? "]" : "[");165 "]"); 195 166 Expression = expression; 196 167 return; … … 199 170 Variable, 200 171 Target, 201 (InclusiveLowerBound) ? "[" : "]",172 "[", 202 173 Interval?.LowerBound, 203 174 Interval?.UpperBound, 204 (InclusiveUpperBound) ? "]" : "[",175 "]", 205 176 GetDerivationString(numberOfDerivation)); 206 177 Expression = expression;
Note: See TracChangeset
for help on using the changeset viewer.