Changeset 6090 for branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/RangeConstraints
- Timestamp:
- 05/01/11 22:02:28 (13 years ago)
- Location:
- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/RangeConstraints
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/RangeConstraints/DoubleValueRange.cs
r5522 r6090 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 { … … 12 10 public class DoubleValueRange : Range<DoubleValue> { 13 11 12 public override DoubleValue LowerBound { 13 get { 14 return base.LowerBound; 15 } 16 set { 17 base.LowerBound = value; 18 } 19 } 20 14 21 public DoubleValueRange(DoubleValue lowerBound, DoubleValue upperBound, DoubleValue stepSize) : base(lowerBound, upperBound, stepSize) { } 15 22 public DoubleValueRange() { } -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/RangeConstraints/Range.cs
r5576 r6090 12 12 [Storable] 13 13 private T lowerBound; 14 public T LowerBound {14 public virtual T LowerBound { 15 15 get { return lowerBound; } 16 16 set { … … 30 30 [Storable] 31 31 private T upperBound; 32 public T UpperBound {32 public virtual T UpperBound { 33 33 get { return upperBound; } 34 34 set { … … 48 48 [Storable] 49 49 private T stepSize; 50 public T StepSize {50 public virtual T StepSize { 51 51 get { return stepSize; } 52 52 set { … … 197 197 if (random.NextDouble() < 0.1) { 198 198 if (random.NextDouble() < 0.5) { 199 return LowerBound;199 return (T)LowerBound.Clone(); 200 200 } else { 201 return UpperBound;201 return (T)UpperBound.Clone(); 202 202 } 203 203 }
Note: See TracChangeset
for help on using the changeset viewer.