/// <summary>Initializes a new instance of the <see cref="OneDimSAOptimizer"/> class. /// </summary> /// <param name="randomNumberStream">The random number stream.</param> /// <param name="configuration">The configuration of the Simulated Annealing optimizer.</param> /// <param name="abortCondition">The abort (stopping) condition for the Simulated Annealing optimizer.</param> public OneDimSAOptimizer(IRandomNumberStream randomNumberStream, OneDimSAOptimizerConfiguration configuration, OneDimSAOptimizerAbortCondition abortCondition) { AbortCondition = abortCondition ?? throw new ArgumentNullException(nameof(abortCondition)); Configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); if (randomNumberStream == null) { throw new ArgumentNullException(nameof(randomNumberStream)); } m_SingleRandomNumberStream = new SingleRandomNumberStream(randomNumberStream, 250); m_Name = new IdentifierString(String.Format("1-dim Simulated Annealing; {0}", abortCondition.ToString())); m_ObjectiveFunctionFactory = new OneDimOptimizerFunctionFactory(); m_ConstraintDescriptor = new OneDimOptimizerConstraintFactory(OneDimOptimizerConstraintFactory.ConstraintType.BoundedInterval); }
/// <summary>Initializes the <see cref="OneDimSAOptimizer" /> class. /// </summary> static OneDimSAOptimizer() { StandardAbortCondition = OneDimSAOptimizerAbortCondition.Create(); StandardConfiguration = OneDimSAOptimizerConfiguration.Create(); }