public StochasticUniversalSampling(IFitnessScalingStrategy <T> fitnessScaling, IGenerator randomNumberGenerator)
        {
            if (fitnessScaling == null)
            {
                throw new ArgumentException("The fitness scaling strategy must not be null");
            }
            this.fitnessScaling = fitnessScaling;

            if (randomNumberGenerator == null)
            {
                throw new ArgumentException("The random number generator must not be null");
            }
            this.rng = randomNumberGenerator;
        }
        protected AbstractRemainderSelection(IFitnessScalingStrategy <T> fitnessScaling,
                                             IGenerator randomNumberGenerator)
        {
            if (fitnessScaling == null)
            {
                throw new ArgumentException("The fitness scaling strategy must not be null");
            }
            this.fitnessScaling = fitnessScaling;

            if (randomNumberGenerator == null)
            {
                throw new ArgumentException("The random number generator must not be null");
            }
            this.RNG = randomNumberGenerator;
        }
Ejemplo n.º 3
0
        public RouletteWheelSelection(IFitnessScalingStrategy <T> fitnessScaling, bool allowIdenticalParents,
                                      IGenerator randomNumberGenerator)
        {
            if (fitnessScaling == null)
            {
                throw new ArgumentException("The fitness scaling strategy must not be null");
            }
            this.fitnessScaling = fitnessScaling;

            this.allowIdenticalParents = allowIdenticalParents;

            if (randomNumberGenerator == null)
            {
                throw new ArgumentException("The random number generator must not be null");
            }
            this.rng = randomNumberGenerator;
        }
 public StochasticUniversalSampling(IFitnessScalingStrategy <T> fitnessScaling) :
     this(fitnessScaling, RandomNumberGenerationUtilities.troschuetzRandom)
 {
 }
Ejemplo n.º 5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="fitnessScaling"></param>
 /// <param name="allowIdenticalParents">If set to false and the fitness scaling is too biased towards the fittest
 ///     individuals, performance will degrade dramatically due to excessive sampling</param>
 public RouletteWheelSelection(IFitnessScalingStrategy <T> fitnessScaling, bool allowIdenticalParents = true) :
     this(fitnessScaling, allowIdenticalParents, RandomNumberGenerationUtilities.troschuetzRandom)
 {
 }
Ejemplo n.º 6
0
 public RemainderStochasticSamplingWithReplacement(IFitnessScalingStrategy <T> fitnessScaling,
                                                   IGenerator randomNumberGenerator) :
     base(fitnessScaling, randomNumberGenerator)
 {
 }
Ejemplo n.º 7
0
 public RemainderStochasticSamplingWithReplacement(IFitnessScalingStrategy <T> fitnessScaling) :
     base(fitnessScaling, RandomNumberGenerationUtilities.troschuetzRandom)
 {
 }