using System; using System.Collections.Generic; using HeuristicLab.Core; namespace HeuristicLab.Problems.MetaOptimization { public delegate void MutateDelegate(IRandom random, IOptimizable configuartion, IIntValueManipulator intValueManipulator, IDoubleValueManipulator doubleValueManipulator); public delegate void CrossDelegate(IRandom random, IOptimizable configuartion, IOptimizable other, IIntValueCrossover intValueCrossover, IDoubleValueCrossover doubleValueCrossover); public interface IOptimizable : IItem { bool IsOptimizable { get; } bool Optimize { get; set; } ConstrainedValue ActualValue { get; set; } void Randomize(IRandom random); void Mutate(IRandom random, MutateDelegate mutate, IIntValueManipulator intValueManipulator, IDoubleValueManipulator doubleValueManipulator); void Cross(IRandom random, IOptimizable other, CrossDelegate cross, IIntValueCrossover intValueCrossover, IDoubleValueCrossover doubleValueCrossover); string ParameterInfoString { get; } void CollectOptimizedParameterNames(List parameterNames, string prefix); double CalculateSimilarity(IOptimizable optimizable); /// /// Recursively gets all optimizables which have Optimize=true /// List GetAllOptimizables(); event EventHandler IsOptimizableChanged; event EventHandler OptimizeChanged; /// /// indicates if the actualvalues are modifiable /// bool ValuesReadOnly { get; set; } } }