public MotherNature(IEnumerable<IBe> initialPopulation, DarwinBase darwin, IGod god, IRandomOperations randomOperation, IEqualityComparer<IBe> comparer)
 {
     this.darwin = darwin;
     population = initialPopulation;
     this.god = god;
     this.randomOperation = randomOperation;
     this.comparer = comparer;
 }
 public GeneticAlgorithm(IGeneticAlgorithmStateFactory geneticAlgorithmStateFactory, IStateLogger <TCandidate> logger, IGod <TCandidate> god, IExitStrategy exitStrategy, IRandomService randomService)
 {
     this.geneticAlgorithmStateFactory = geneticAlgorithmStateFactory;
     this.logger        = logger;
     this.god           = god;
     this.exitStrategy  = exitStrategy;
     this.randomService = randomService;
 }
Exemple #3
0
 private static IEnumerable<Human> GeneratePairs(IGod god, IReadOnlyList<Human> humans)
 {
     var pairs = new Human[humans.Count];
     for (var i = 0; i < humans.Count; ++i)
     {
         pairs[i] = god.CreatePair(humans[i]);
     }
     return pairs;
 }
Exemple #4
0
 public GodConsole()
 {
     _god        = new God();
     printHelper = new PrintHelper();
 }
 public HomeController(IGod god)
 {
     _god = god;
 }