src/GenFx.Components/Lists/BinaryStringEntity.cs
/// <summary>
/// Initializes the component to ensure its readiness for algorithm execution.
/// </summary>
/// <param name="algorithm">The algorithm that is to use this component.</param>
Initializes the component to ensure its readiness for algorithm execution.
Initializes the component to ensure its readiness for algorithm execution .
public override void Initialize(GeneticAlgorithm algorithm)
        {
            base.Initialize(algorithm);
            this.genes = new BitArray(this.GetInitialLength());
            for (int i = 0; i < this.Length; i++)
            {
                this[i] = RandomNumberService.Instance.GetRandomValue(2) == 1 ? true : false;
            }
            this.UpdateStringRepresentation();
        }
public override void Initialize ( GeneticAlgorithm algorithm ) { base . Initialize ( algorithm ) ; this . genes = new BitArray ( this . GetInitialLength ( ) ) ; for ( int i = 0 ; i < this . Length ; i ++ ) { this [ i ] = RandomNumberService . Instance . GetRandomValue ( 2 ) == 1 ? true : false ; } this . UpdateStringRepresentation ( ) ; }
Initializes the component to ensure its readiness for algorithm execution.
Initializes the component to ensure its readiness for algorithm execution .
algorithm
GeneticAlgorithm
The algorithm that is to use this component.
The algorithm that is to use this component .