Changeset 7704


Ignore:
Timestamp:
04/04/12 12:52:53 (10 years ago)
Author:
epitzer
Message:

#1813 add generalized exponential distribution with additional base parameter
adapt documentation of previous exponential distribution operator

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  
    2929  /// Modifies the value by exponential fall (steep fall initially, slow fall to the end) or rise (slow rise initially, fast rise to the end).
    3030  /// </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).
     33This uses a standard exponential distribution and yields a base which is implicitly derived by start and end indices and values.")]
    3234  [StorableClass]
    3335  public class ExponentialDiscreteDoubleValueModifier : DiscreteDoubleValueModifier {
     
    5355    /// <returns>The new value.</returns>
    5456    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.");
    5658      double b = Math.Pow(endValue / startValue, 1.0 / (endIndex - startIndex));
    5759      return startValue * Math.Pow(b, index - startIndex);
  • trunk/sources/HeuristicLab.Optimization.Operators/3.3/HeuristicLab.Optimization.Operators-3.3.csproj

    r6866 r7704  
    108108  </ItemGroup>
    109109  <ItemGroup>
     110    <Compile Include="GeneralizedExponentialDiscreteDoubleValueModifier.cs" />
    110111    <Compile Include="MultiObjective\CrowdedComparisonSorter.cs" />
    111112    <Compile Include="MultiObjective\CrowdingDistanceAssignment.cs" />
Note: See TracChangeset for help on using the changeset viewer.