Esempio n. 1
0
 UsingHeuristic <TIndividual, TGeneStructure, TGene>(
     this IEvolutionaryAlgorithm <TIndividual, TGeneStructure, TGene> algo,
     Func <IMutator <TIndividual, TGeneStructure, TGene>, IMutator <TIndividual, TGeneStructure, TGene> >
     applyMutations,
     IGenerationFilter <TIndividual, TGeneStructure, TGene> filter)
     where TIndividual : IIndividual <TGeneStructure, TGene>
     where TGeneStructure : ICloneable =>
 algo.UsingHeuristic(new GenerationGenerator <TIndividual, TGeneStructure, TGene>
 {
     Mutator = applyMutations(new Mutator <TIndividual, TGeneStructure, TGene>()),
     Filter  = filter
 });
Esempio n. 2
0
 UsingHeuristic <TIndividual, TGeneStructure, TGene>(
     this IEvolutionaryAlgorithm <TIndividual, TGeneStructure, TGene> algo,
     IGenerationGenerator <TIndividual, TGeneStructure, TGene> generator)
     where TIndividual : IIndividual <TGeneStructure, TGene>
     where TGeneStructure : ICloneable =>
 algo.UsingHeuristic(new SimpleHeuristic <TIndividual, TGeneStructure, TGene>(generator));