src/GenFx.Components/Scaling/ExponentialScalingStrategy.cs
/// <summary>
/// Sets the <see cref="GeneticEntity.ScaledFitnessValue"/> property of each entity
/// in the <paramref name="population"/> by raising it to the power of <see cref="ScalingPower"/>.
/// </summary>
/// <param name="population"><see cref="Population"/> containing the <see cref="GeneticEntity"/> objects.</param>
/// <exception cref="ArgumentNullException"><paramref name="population"/> is null.</exception>
Sets the  property of each entity
in the  by raising it to the power of .
Sets the property of each entity in the by raising it to the power of .
protected override void UpdateScaledFitnessValues(Population population)
        {
            if (population == null)
            {
                throw new ArgumentNullException(nameof(population));
            }
            for (int i = 0; i < population.Entities.Count; i++)
            {
                GeneticEntity entity = population.Entities[i];
                entity.ScaledFitnessValue = Math.Pow(entity.RawFitnessValue, this.ScalingPower);
            }
        }
protected override void UpdateScaledFitnessValues ( Population population ) { if ( population == null ) { throw new ArgumentNullException ( nameof ( population ) ) ; } for ( int i = 0 ; i < population . Entities . Count ; i ++ ) { GeneticEntity entity = population . Entities [ i ] ; entity . ScaledFitnessValue = Math . Pow ( entity . RawFitnessValue , this . ScalingPower ) ; } }
Sets the  property of each entity
in the  by raising it to the power of .
Sets the property of each entity in the by raising it to the power of .
None
population
Population
containing the  objects.
containing the objects .