Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8002


Ignore:
Timestamp:
06/14/12 09:32:01 (12 years ago)
Author:
ascheibe
Message:

#1696 adapted FLA to changes of r7999

Location:
branches/FitnessLandscapeAnalysis
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape/Algorithms/LocalAnalysis.cs

    r7128 r8002  
    150150      ParameterizeStochasticOperator(Problem.SolutionCreator);
    151151      ParameterizeStochasticOperator(Problem.Evaluator);
    152       foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
     152      foreach (IOperator op in Problem.Operators.OfType<IOperator>()) ParameterizeStochasticOperator(op);
    153153      ParameterizeSolutionsCreator();
    154154      ParameterizeMainLoop();
     
    177177    }
    178178    protected override void Problem_OperatorsChanged(object sender, EventArgs e) {
    179       foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
     179      foreach (IOperator op in Problem.Operators.OfType<IOperator>()) ParameterizeStochasticOperator(op);
    180180      UpdateMutators();
    181181      UpdateSelectors();
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape/Algorithms/RepeatedLocalAnalysis.cs

    r7128 r8002  
    185185      ParameterizeStochasticOperator(Problem.SolutionCreator);
    186186      ParameterizeStochasticOperator(Problem.Evaluator);
    187       foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
     187      foreach (IOperator op in Problem.Operators.OfType<IOperator>()) ParameterizeStochasticOperator(op);
    188188      ParameterizeSolutionsCreator();
    189189      ParameterizeMainLoop();
     
    212212    }
    213213    protected override void Problem_OperatorsChanged(object sender, EventArgs e) {
    214       foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
     214      foreach (IOperator op in Problem.Operators.OfType<IOperator>()) ParameterizeStochasticOperator(op);
    215215      UpdateMutators();
    216216      UpdateSelectors();
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Problems.NK/NKLandscape.cs

    r7202 r8002  
    1212using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    1313using HeuristicLab.PluginInfrastructure;
     14using HeuristicLab.Problems.NK.WeightInitializers;
    1415using HeuristicLab.Random;
    15 using HeuristicLab.Problems.NK.WeightInitializers;
    1616
    1717namespace HeuristicLab.Problems.NK {
     
    7373    public OptionalConstrainedValueParameter<IWeightsInitializer> WeightsInitializerParameter {
    7474      get { return (OptionalConstrainedValueParameter<IWeightsInitializer>)Parameters["WeightsInitializer"]; }
    75     }   
     75    }
    7676    #endregion
    7777
     
    101101      get { return BestKnownQualityParameter.Value; }
    102102    }
    103     public IEnumerable<IOperator> Operators {
    104       get { return operators.Cast<IOperator>(); }
     103    public IEnumerable<IItem> Operators {
     104      get { return operators; }
    105105    }
    106106    public IInteractionInitializer InteractionInitializer {
    107107      get { return InteractionInitializerParameter.Value; }
    108     }       
     108    }
    109109    //private BestOneMaxSolutionAnalyzer BestOneMaxSolutionAnalyzer {
    110110    //get { return operators.OfType<BestOneMaxSolutionAnalyzer>().FirstOrDefault(); }
     
    115115
    116116    [Storable]
    117     private List<IOperator> operators;
     117    private List<IItem> operators;
    118118
    119119    [StorableConstructor]
     
    121121    private NKLandscape(NKLandscape original, Cloner cloner)
    122122      : base(original, cloner) {
    123       operators = original.operators.Select(x => (IOperator)cloner.Clone(x)).ToList();
     123      operators = original.operators.Select(x => (IItem)cloner.Clone(x)).ToList();
    124124      AttachEventHandlers();
    125125    }
     
    286286
    287287    private void InitializeOperators() {
    288       operators = new List<IOperator>();
     288      operators = new List<IItem>();
    289289      //operators.Add(new BestOneMaxSolutionAnalyzer());
    290290      ParameterizeAnalyzer();
     
    317317    }
    318318
    319     private void InitializeInteractions() {     
     319    private void InitializeInteractions() {
    320320      if (InteractionInitializer != null)
    321321        GeneInteractionsParameter.Value = InteractionInitializer.InitializeInterations(
     
    323323          NrOfFitnessComponentsParameter.Value.Value,
    324324          NrOfInteractionsParameter.Value.Value,
    325           random);       
     325          random);
    326326    }
    327327
Note: See TracChangeset for help on using the changeset viewer.