- Timestamp:
- 06/14/12 09:32:01 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/FitnessLandscapeAnalysis/HeuristicLab.Problems.NK/NKLandscape.cs
r7202 r8002 12 12 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 13 13 using HeuristicLab.PluginInfrastructure; 14 using HeuristicLab.Problems.NK.WeightInitializers; 14 15 using HeuristicLab.Random; 15 using HeuristicLab.Problems.NK.WeightInitializers;16 16 17 17 namespace HeuristicLab.Problems.NK { … … 73 73 public OptionalConstrainedValueParameter<IWeightsInitializer> WeightsInitializerParameter { 74 74 get { return (OptionalConstrainedValueParameter<IWeightsInitializer>)Parameters["WeightsInitializer"]; } 75 } 75 } 76 76 #endregion 77 77 … … 101 101 get { return BestKnownQualityParameter.Value; } 102 102 } 103 public IEnumerable<I Operator> Operators {104 get { return operators .Cast<IOperator>(); }103 public IEnumerable<IItem> Operators { 104 get { return operators; } 105 105 } 106 106 public IInteractionInitializer InteractionInitializer { 107 107 get { return InteractionInitializerParameter.Value; } 108 } 108 } 109 109 //private BestOneMaxSolutionAnalyzer BestOneMaxSolutionAnalyzer { 110 110 //get { return operators.OfType<BestOneMaxSolutionAnalyzer>().FirstOrDefault(); } … … 115 115 116 116 [Storable] 117 private List<I Operator> operators;117 private List<IItem> operators; 118 118 119 119 [StorableConstructor] … … 121 121 private NKLandscape(NKLandscape original, Cloner cloner) 122 122 : base(original, cloner) { 123 operators = original.operators.Select(x => (I Operator)cloner.Clone(x)).ToList();123 operators = original.operators.Select(x => (IItem)cloner.Clone(x)).ToList(); 124 124 AttachEventHandlers(); 125 125 } … … 286 286 287 287 private void InitializeOperators() { 288 operators = new List<I Operator>();288 operators = new List<IItem>(); 289 289 //operators.Add(new BestOneMaxSolutionAnalyzer()); 290 290 ParameterizeAnalyzer(); … … 317 317 } 318 318 319 private void InitializeInteractions() { 319 private void InitializeInteractions() { 320 320 if (InteractionInitializer != null) 321 321 GeneInteractionsParameter.Value = InteractionInitializer.InitializeInterations( … … 323 323 NrOfFitnessComponentsParameter.Value.Value, 324 324 NrOfInteractionsParameter.Value.Value, 325 random); 325 random); 326 326 } 327 327
Note: See TracChangeset
for help on using the changeset viewer.