forked from giacomelli/GeneticSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IFitness.cs
21 lines (20 loc) · 828 Bytes
/
IFitness.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using GeneticSharp.Domain.Chromosomes;
namespace GeneticSharp.Domain.Fitnesses
{
/// <summary>
/// Defines an interface for fitness function.
/// <remarks>
/// A fitness function is a particular type of objective function that is used to summarize, as a single figure of merit, how close a given design solution is to achieving the set aims.
/// <see href="http://en.wikipedia.org/wiki/Fitness_function">Wikipedia</see>
/// </remarks>
/// </summary>
public interface IFitness
{
/// <summary>
/// Performs the evaluation against the specified chromosome.
/// </summary>
/// <param name="chromosome">The chromosome to be evaluated.</param>
/// <returns>The fitness of the chromosome.</returns>
double Evaluate(IChromosome chromosome);
}
}