-
-
Notifications
You must be signed in to change notification settings - Fork 335
/
IOperatorsStrategy.cs
27 lines (25 loc) · 1.06 KB
/
IOperatorsStrategy.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System.Collections.Generic;
namespace GeneticSharp
{
/// <summary>
/// Defines an interface for operators strategy.
/// </summary>
public interface IOperatorsStrategy
{
/// <summary>
/// Crosses the specified parents.
/// </summary>
/// <param name="crossover">The crossover class.</param>
/// <param name="crossoverProbability">The crossover probability.</param>
/// <param name="parents">The parents.</param>
/// <returns>The result chromosomes.</returns>
IList<IChromosome> Cross(IPopulation population, ICrossover crossover, float crossoverProbability, IList<IChromosome> parents);
/// <summary>
/// Mutate the specified chromosomes.
/// </summary>
/// <param name="mutation">The mutation class.</param>
/// <param name="mutationProbability">The mutation probability.</param>
/// <param name="chromosomes">The chromosomes.</param>
void Mutate(IMutation mutation, float mutationProbability, IList<IChromosome> chromosomes);
}
}