Changeset 7704
- Timestamp:
- 04/04/12 12:52:53 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimization.Operators/3.3
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Operators/3.3/ExponentialDiscreteDoubleValueModifier.cs
r7259 r7704 29 29 /// Modifies the value by exponential fall (steep fall initially, slow fall to the end) or rise (slow rise initially, fast rise to the end). 30 30 /// </summary> 31 [Item("ExponentialDiscreteDoubleValueModifier", "Modifies the value by exponential fall (steep fall initially, slow fall to the end) or rise (slow rise initially, fast rise to the end).")] 31 [Item("ExponentialDiscreteDoubleValueModifier", 32 @"Modifies the value by exponential fall (steep fall initially, slow fall to the end) or rise (slow rise initially, fast rise to the end). 33 This uses a standard exponential distribution and yields a base which is implicitly derived by start and end indices and values.")] 32 34 [StorableClass] 33 35 public class ExponentialDiscreteDoubleValueModifier : DiscreteDoubleValueModifier { … … 53 55 /// <returns>The new value.</returns> 54 56 protected override double Modify(double value, double startValue, double endValue, int index, int startIndex, int endIndex) { 55 if (endValue <= 0 || startValue <= 0) throw new ArgumentException(" ExponentialDiscreteDoubleValueModifier:startValue and endValue must be greater than 0.");57 if (endValue <= 0 || startValue <= 0) throw new ArgumentException("startValue and endValue must be greater than 0."); 56 58 double b = Math.Pow(endValue / startValue, 1.0 / (endIndex - startIndex)); 57 59 return startValue * Math.Pow(b, index - startIndex); -
trunk/sources/HeuristicLab.Optimization.Operators/3.3/HeuristicLab.Optimization.Operators-3.3.csproj
r6866 r7704 108 108 </ItemGroup> 109 109 <ItemGroup> 110 <Compile Include="GeneralizedExponentialDiscreteDoubleValueModifier.cs" /> 110 111 <Compile Include="MultiObjective\CrowdedComparisonSorter.cs" /> 111 112 <Compile Include="MultiObjective\CrowdingDistanceAssignment.cs" />
Note: See TracChangeset
for help on using the changeset viewer.