Changeset 14908 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/Integer/IntegerRangeErcValue.cs
- Timestamp:
- 05/02/17 22:03:01 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/Integer/IntegerRangeErcValue.cs
r14905 r14908 26 26 public IValueParameter<IntRange> RangeParameter 27 27 { 28 get { return (IValueParameter<IntRange>) this.Parameters[RangeParameterName]; }28 get { return (IValueParameter<IntRange>)Parameters[RangeParameterName]; } 29 29 } 30 30 31 31 public int Start 32 32 { 33 get { return this.RangeParameter.Value.Start; }34 set { this.RangeParameter.Value.Start = value; }33 get { return RangeParameter.Value.Start; } 34 set { RangeParameter.Value.Start = value; } 35 35 } 36 36 37 37 public int End 38 38 { 39 get { return this.RangeParameter.Value.End; }40 set { this.RangeParameter.Value.End = value; }39 get { return RangeParameter.Value.End; } 40 set { RangeParameter.Value.End = value; } 41 41 } 42 42 43 43 public override int GetErcValue(IRandom random) { 44 44 45 return this.Start < this.End ? random.Next(this.Start, this.End) : 0;45 return Start < End ? random.Next(Start, End) : 0; 46 46 } 47 47
Note: See TracChangeset
for help on using the changeset viewer.