/// <summary> /// Initializes the component to ensure its readiness for algorithm execution. /// </summary> /// <param name="algorithm">The algorithm that is to use this component.</param> public virtual void Initialize(GeneticAlgorithm algorithm) { this.Algorithm = algorithm ?? throw new ArgumentNullException(nameof(algorithm)); this.IsInitialized = true; }
/// <summary> /// Initializes a new instance of the <see cref="GeneticEnvironment"/> class. /// </summary> /// <param name="algorithm"><see cref="GeneticAlgorithm"/> using this <see cref="GeneticEnvironment"/>.</param> internal GeneticEnvironment(GeneticAlgorithm algorithm) { this.algorithm = algorithm; }