Changeset 17891 for branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/ShapeConstraint.cs
- Timestamp:
- 03/12/21 16:41:42 (3 years ago)
- Location:
- branches/3073_IA_constraint_splitting_reintegration
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3073_IA_constraint_splitting_reintegration
- Property svn:ignore
-
old new 1 1 bin 2 TestResults
-
- Property svn:ignore
-
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/ShapeConstraint.cs
r17887 r17891 102 102 } 103 103 104 [Storable]105 private bool enabled;106 107 public bool Enabled {108 get => enabled;109 set {110 if (enabled == value)111 return;112 enabled = value;113 OnChanged();114 }115 }104 // [Storable] 105 // private bool enabled; 106 // 107 // public bool Enabled { 108 // get => enabled; 109 // set { 110 // if (enabled == value) 111 // return; 112 // enabled = value; 113 // OnChanged(); 114 // } 115 // } 116 116 117 117 [Storable] … … 143 143 144 144 // without derivation 145 public ShapeConstraint(Interval interval, double weight , bool enabled)145 public ShapeConstraint(Interval interval, double weight) 146 146 : this(string.Empty, 0, 147 interval, new IntervalCollection(), weight , enabled) { }148 149 public ShapeConstraint(Interval interval, IntervalCollection regions, double weight , bool enabled)147 interval, new IntervalCollection(), weight) { } 148 149 public ShapeConstraint(Interval interval, IntervalCollection regions, double weight) 150 150 : this(string.Empty, 0, 151 interval, regions, weight , enabled) { }151 interval, regions, weight) { } 152 152 153 153 public ShapeConstraint(string variable, int numberOfDerivations, 154 Interval interval, double weight , bool enabled)154 Interval interval, double weight) 155 155 : this(variable, numberOfDerivations, 156 interval, new IntervalCollection(), weight , enabled) { }156 interval, new IntervalCollection(), weight) { } 157 157 158 158 public ShapeConstraint(string variable, int numberOfDerivations, 159 Interval interval, IntervalCollection regions, double weight , bool enabled) {159 Interval interval, IntervalCollection regions, double weight) { 160 160 this.regions = regions; 161 161 this.weight = weight; … … 163 163 this.numberOfDerivations = numberOfDerivations; 164 164 this.interval = interval; 165 this.enabled = enabled;165 //this.enabled = enabled; 166 166 } 167 167 … … 176 176 NumberOfDerivations = original.NumberOfDerivations; 177 177 Interval = original.Interval; 178 Enabled = original.Enabled;178 //Enabled = original.Enabled; 179 179 } 180 180 … … 208 208 if (Regions != null) { 209 209 foreach (var region in Regions.GetReadonlyDictionary()) 210 expression += $", {region.Key}=({region.Value.LowerBound} .. {region.Value.UpperBound})"; 210 expression += $", {region.Key} in [{region.Value.LowerBound} .. {region.Value.UpperBound}]"; 211 } 212 if (Weight != 1.0) { 213 expression += $" weight: {weight}"; 211 214 } 212 215 … … 226 229 if (Regions != null) { 227 230 foreach (var region in Regions.GetReadonlyDictionary()) 228 expression += $", {region.Key}=({region.Value.LowerBound} .. {region.Value.UpperBound})"; 231 expression += $", {region.Key} in [{region.Value.LowerBound} .. {region.Value.UpperBound}]"; 232 } 233 if(Weight != 1.0) { 234 expression += $" weight: {weight}"; 229 235 } 230 236 return expression;
Note: See TracChangeset
for help on using the changeset viewer.