Changeset 8087 for branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/RangeConstraints
- Timestamp:
- 06/22/12 11:15:13 (12 years ago)
- Location:
- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/RangeConstraints
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/RangeConstraints/DoubleValueRange.cs
r6090 r8087 18 18 } 19 19 } 20 20 21 21 public DoubleValueRange(DoubleValue lowerBound, DoubleValue upperBound, DoubleValue stepSize) : base(lowerBound, upperBound, stepSize) { } 22 public DoubleValueRange() { }23 22 [StorableConstructor] 24 23 protected DoubleValueRange(bool deserializing) : base(deserializing) { } … … 59 58 double range = UpperBound.Value - LowerBound.Value; 60 59 double diff = Math.Abs(a.Value - b.Value); 61 return Math.Max(0, (range - (diff *2)) / range);60 return Math.Max(0, (range - (diff * 2)) / range); 62 61 } 63 62 } -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/RangeConstraints/IntValueRange.cs
r5522 r8087 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.Linq;4 using System.Text;3 using HeuristicLab.Common; 4 using HeuristicLab.Core; 5 5 using HeuristicLab.Data; 6 using HeuristicLab.Common;7 6 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 8 using HeuristicLab.Core;9 7 10 8 namespace HeuristicLab.Problems.MetaOptimization { … … 13 11 14 12 public IntValueRange(IntValue lowerBound, IntValue upperBound, IntValue stepSize) : base(lowerBound, upperBound, stepSize) { } 15 public IntValueRange() { }16 13 [StorableConstructor] 17 14 protected IntValueRange(bool deserializing) : base(deserializing) { } -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/RangeConstraints/PercentValueRange.cs
r5522 r8087 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.Linq;4 using System.Text;3 using HeuristicLab.Common; 4 using HeuristicLab.Core; 5 5 using HeuristicLab.Data; 6 using HeuristicLab.Common;7 6 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 8 using HeuristicLab.Core;9 7 10 8 namespace HeuristicLab.Problems.MetaOptimization { … … 13 11 14 12 public PercentValueRange(PercentValue lowerBound, PercentValue upperBound, PercentValue stepSize) : base(lowerBound, upperBound, stepSize) { } 15 public PercentValueRange() { }16 13 [StorableConstructor] 17 14 protected PercentValueRange(bool deserializing) : base(deserializing) { } -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/RangeConstraints/Range.cs
r6090 r8087 86 86 } 87 87 88 public Range() { }89 88 [StorableConstructor] 90 89 protected Range(bool deserializing) : base(deserializing) { } 91 protected Range(Range<T> original, Cloner cloner) : base(original, cloner) { 90 protected Range(Range<T> original, Cloner cloner) 91 : base(original, cloner) { 92 92 this.LowerBound = cloner.Clone(original.LowerBound); 93 93 this.UpperBound = cloner.Clone(original.UpperBound);
Note: See TracChangeset
for help on using the changeset viewer.