forked from giacomelli/GeneticSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PureReinsertion.cs
39 lines (37 loc) · 1.42 KB
/
PureReinsertion.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
28
29
30
31
32
33
34
35
36
37
38
39
using System.Collections.Generic;
using System.ComponentModel;
namespace GeneticSharp
{
/// <summary>
/// Pure Reinsertion.
/// <remarks>
/// When there are same number of offspring than parents, select the offspring to be reinserted, the parents are discarded.
/// <see href="http://usb-bg.org/Bg/Annual_Informatics/2011/SUB-Informatics-2011-4-29-35.pdf">Generalized Nets Model of offspring Reinsertion in Genetic Algorithm</see>
/// </remarks>
/// </summary>
[DisplayName("Pure")]
public class PureReinsertion : ReinsertionBase
{
#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="GeneticSharp.PureReinsertion"/> class.
/// </summary>
public PureReinsertion() : base(false, false)
{
}
#endregion
#region Methods
/// <summary>
/// Selects the chromosomes which will be reinserted.
/// </summary>
/// <returns>The chromosomes to be reinserted in next generation..</returns>
/// <param name="population">The population.</param>
/// <param name="offspring">The offspring.</param>
/// <param name="parents">The parents.</param>
protected override IList<IChromosome> PerformSelectChromosomes(IPopulation population, IList<IChromosome> offspring, IList<IChromosome> parents)
{
return offspring;
}
#endregion
}
}