Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/07/19 23:40:10 (5 years ago)
Author:
mkommend
Message:

#2520: Merged 16565 - 16579 into stable.

Location:
stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Selection/3.3/EvolutionStrategyOffspringSelector.cs

    r15584 r17097  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Runtime.InteropServices;
    2524using HeuristicLab.Common;
    2625using HeuristicLab.Core;
     
    2827using HeuristicLab.Operators;
    2928using HeuristicLab.Parameters;
    30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     29using HEAL.Attic;
    3130
    3231namespace HeuristicLab.Selection {
    3332  [Item("EvolutionStrategyOffspringSelector", "Selects among the offspring population those that are designated successful and discards the unsuccessful offspring, except for some lucky losers. It expects the parent scopes to be below the first sub-scope, and offspring scopes to be below the second sub-scope separated again in two sub-scopes, the first with the failed offspring and the second with successful offspring.")]
    34   [StorableClass]
     33  [StorableType("CE585C3C-5139-44F0-9CB2-CC901A290831")]
    3534  public class EvolutionStrategyOffspringSelector : SingleSuccessorOperator {
    36 
     35    [StorableType("F1CA99A7-E9C2-49F3-8030-5CEE407357AA")]
    3736    private class FitnessComparer : IComparer<IScope> {
    3837
    3938      #region IComparer<IScope> Member
    40 
    41       private String qualityParameterName;
     39      [Storable]
     40      private string qualityParameterName;
     41      [Storable]
    4242      private bool maximization;
    4343
    44       public FitnessComparer(String qualityParamName, bool maximization) {
     44      [StorableConstructor]
     45      protected FitnessComparer(StorableConstructorFlag _) { }
     46
     47      public FitnessComparer(string qualityParamName, bool maximization) {
    4548        this.qualityParameterName = qualityParamName;
    4649        this.maximization = maximization;
     
    113116
    114117    [StorableConstructor]
    115     protected EvolutionStrategyOffspringSelector(bool deserializing) : base(deserializing) { }
     118    protected EvolutionStrategyOffspringSelector(StorableConstructorFlag _) : base(_) { }
    116119    protected EvolutionStrategyOffspringSelector(EvolutionStrategyOffspringSelector original, Cloner cloner) : base(original, cloner) { }
    117120    public override IDeepCloneable Clone(Cloner cloner) {
Note: See TracChangeset for help on using the changeset viewer.