src/GenFx/GeneticAlgorithm.cs
/// <summary>
/// Executes the genetic algorithm until the <see cref="Terminator.IsComplete()"/> method returns
/// true or <see cref="CancelEventArgs.Cancel"/> property is set to true.
/// </summary>
/// <returns>true if the genetic algorithm has completed its execution; otherwise, false.</returns>
Executes the genetic algorithm until the  method returns
true or  property is set to true.
Executes the genetic algorithm until the method returns true or property is set to true .
private async Task<bool> StepCoreAsync()
        {
            if (this.currentGeneration == 0)
            {
                this.OnAlgorithmStarting();
            }
            bool isAlgorithmComplete = false;
            bool isCanceled = false;
            if (!this.Terminator.IsComplete())
            {
                isCanceled = await this.CreateNextGenerationAsync();
                if (!isCanceled)
                {
                    isAlgorithmComplete = this.Terminator.IsComplete();
                    if (isAlgorithmComplete)
                    {
                        this.isInitialized = false;
                    }
                }
            }
            else
            {
                isAlgorithmComplete = true;
            }
            if (isAlgorithmComplete)
            {
                this.Complete();
            }
            return isAlgorithmComplete || isCanceled;
        }
private async Task < bool > StepCoreAsync ( ) { if ( this . currentGeneration == 0 ) { this . OnAlgorithmStarting ( ) ; } bool isAlgorithmComplete = false ; bool isCanceled = false ; if ( ! this . Terminator . IsComplete ( ) ) { isCanceled = await this . CreateNextGenerationAsync ( ) ; if ( ! isCanceled ) { isAlgorithmComplete = this . Terminator . IsComplete ( ) ; if ( isAlgorithmComplete ) { this . isInitialized = false ; } } } else { isAlgorithmComplete = true ; } if ( isAlgorithmComplete ) { this . Complete ( ) ; } return isAlgorithmComplete || isCanceled ; }
Executes the genetic algorithm until the  method returns
true or  property is set to true.
Executes the genetic algorithm until the method returns true or property is set to true .
true if the genetic algorithm has completed its execution; otherwise, false.
true if the genetic algorithm has completed its execution ; otherwise false .