private Configuration(int n, int k, double a, double b, ISelection method1, ISelection method2, ISelection method3, ISelection method4, ICrossover crossover, IMutation mutation, double mutationProbability, IReplacement replacement, IFinisher finisher, Character.Type characterType) { this.N = n; this.K = k; this.A = a; this.B = b; this.Method1 = method1; this.Method2 = method2; this.Method3 = method3; this.Method4 = method4; this.CrossoverMethod = crossover; this.MutationMethod = mutation; this.ReplacementMethod = replacement; this.MutationProbablity = mutationProbability; this.FinishCondition = finisher; this.CharacterType = characterType; }
protected AHelloWorld(IHello hello, IWorld world, ISeparator separator, IFinisher finisher) { mHello = hello; mWorld = world; mSeparator = separator; mFinisher = finisher; }
private static Configuration LoadConfiguration(ConfigurationFile configFile) { ISelection method1 = GetSelection(configFile.Method1, configFile), method2 = GetSelection(configFile.Method2, configFile), method3 = GetSelection(configFile.Method3, configFile), method4 = GetSelection(configFile.Method4, configFile); ICrossover crossover = GetCrossover(configFile.CrossoverMethod); IMutation mutation = GetMutation(configFile.MutationMethod); IReplacement replacement = GetReplacement(configFile.ReplacementMethod, configFile.N, configFile.K); Character.Type type = GetCharacterType(configFile.CharacterType); IFinisher finisher = GetFinisher(configFile.Finish, configFile); if (configFile.HeightMutationDelta.HasValue) { HeightGene.Delta = configFile.HeightMutationDelta.Value; } return(new Configuration(configFile.N, configFile.K, configFile.A, configFile.B, method1, method2, method3, method4, crossover, mutation, configFile.MutationProbability, replacement, finisher, type)); }
public EnglishHelloWorld(IHello hello, IWorld world, ISeparator separator, IFinisher finisher) : base(hello, world, separator, finisher) { }