Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12369 for branches/VOSGA


Ignore:
Timestamp:
04/30/15 10:35:55 (10 years ago)
Author:
ascheibe
Message:

#2267 added a value modifier

Location:
branches/VOSGA
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/VOSGA/HeuristicLab.Algorithms.VOffspringSelectionGeneticAlgorithm-3.3.sln

    r11492 r12369  
    22Microsoft Visual Studio Solution File, Format Version 12.00
    33# Visual Studio 2013
    4 VisualStudioVersion = 12.0.30723.0
     4VisualStudioVersion = 12.0.31101.0
    55MinimumVisualStudioVersion = 10.0.40219.1
    66Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.VOffspringSelectionGeneticAlgorithm-3.3", "HeuristicLab.Algorithms.VOffspringSelectionGeneticAlgorithm\HeuristicLab.Algorithms.VOffspringSelectionGeneticAlgorithm-3.3.csproj", "{F409DD9E-1E9C-4EB1-AA3A-9F6E987C6E58}"
     7EndProject
     8Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{41DDAEFF-914B-49BB-BB67-A9271C21F24E}"
    79EndProject
    810Global
     
    3234    HideSolutionNode = FALSE
    3335  EndGlobalSection
     36  GlobalSection(Performance) = preSolution
     37    HasPerformanceSessions = true
     38  EndGlobalSection
    3439EndGlobal
  • branches/VOSGA/HeuristicLab.Algorithms.VOffspringSelectionGeneticAlgorithm/HeuristicLab.Algorithms.VOffspringSelectionGeneticAlgorithm-3.3.csproj

    r12363 r12369  
    179179    <Compile Include="Comparators\WeightedParentsQualityComparator.cs" />
    180180    <Compile Include="ISubScopesQualityComparatorOperator.cs" />
     181    <Compile Include="LinearDiscreteReverseDoubleValueModifier.cs" />
    181182    <Compile Include="OffspringCollector.cs" />
    182183    <Compile Include="OffspringSelectors\IOffspringSelector.cs" />
  • branches/VOSGA/HeuristicLab.Algorithms.VOffspringSelectionGeneticAlgorithm/LinearDiscreteReverseDoubleValueModifier.cs

    r12354 r12369  
    2828  /// Modifies the value by linear (constant) fall or rise.
    2929  /// </summary>
    30   [Item("LinearDiscreteDoubleValueModifier", "Modifies the value by linear (constant) fall or rise.")]
     30  [Item("LinearDiscreteReverseDoubleValueModifier", "Modifies the value by linear (constant) fall or rise.")]
    3131  [StorableClass]
    32   public class LinearDiscreteDoubleValueModifier : DiscreteDoubleValueModifier {
     32  public class LinearDiscreteReverseDoubleValueModifier : DiscreteDoubleValueModifier {
    3333    [StorableConstructor]
    34     protected LinearDiscreteDoubleValueModifier(bool deserializing) : base(deserializing) { }
    35     protected LinearDiscreteDoubleValueModifier(LinearDiscreteDoubleValueModifier original, Cloner cloner) : base(original, cloner) { }
    36     public LinearDiscreteDoubleValueModifier() : base() { }
     34    protected LinearDiscreteReverseDoubleValueModifier(bool deserializing) : base(deserializing) { }
     35    protected LinearDiscreteReverseDoubleValueModifier(LinearDiscreteReverseDoubleValueModifier original, Cloner cloner) : base(original, cloner) { }
     36    public LinearDiscreteReverseDoubleValueModifier() : base() { }
    3737
    3838    public override IDeepCloneable Clone(Cloner cloner) {
    39       return new LinearDiscreteDoubleValueModifier(this, cloner);
     39      return new LinearDiscreteReverseDoubleValueModifier(this, cloner);
    4040    }
    4141
    4242    protected override double Modify(double value, double startValue, double endValue, int index, int startIndex, int endIndex) {
    4343      double k = (endValue - startValue) / (endIndex - startIndex);
    44       double x = index - startIndex;
     44      double x = endIndex - index;
    4545      return k * x + startValue;
    4646    }
Note: See TracChangeset for help on using the changeset viewer.