Evolution/Evolution/Core/Stats.cs
/// <summary>
/// Returns a new <see cref="Stats{G,F}"/> using the previous statistics information and the newly generated world
/// </summary>
/// <param name="newWorld">The new world.</param>
/// <param name="oldStats">The old stats.</param>
/// <returns></returns>
Returns a new  using the previous statistics information and the newly generated world
Returns a new using the previous statistics information and the newly generated world
public static Stats<G, F> CalculateNewStatistics(World<G, F> newWorld, IStats<G, F> oldStats)
        {
            if (oldStats == null || oldStats.BestFitness.CompareTo(newWorld.BestFitness) == -1)
            {
                return new Stats<G, F>(newWorld);
            }
            return new Stats<G, F>(oldStats.BestWorld);
        }
public static Stats < G , F > CalculateNewStatistics ( World < G , F > newWorld , IStats < G , F > oldStats ) { if ( oldStats == null || oldStats . BestFitness . CompareTo ( newWorld . BestFitness ) == - 1 ) { return new Stats < G , F > ( newWorld ) ; } return new Stats < G , F > ( oldStats . BestWorld ) ; }
Returns a new  using the previous statistics information and the newly generated world
Returns a new using the previous statistics information and the newly generated world
None
newWorld
World<G, F>
The new world.
The new world .
oldStats
IStats<G, F>
The old stats.
The old stats .