/// <summary> /// Creates a new instance of <see cref="DynamicParameterProvider"/> /// </summary> /// <param name="parameterSetListCapacity">Parameter set list capacity</param> public DynamicParameterProvider(int parameterSetListCapacity) { _random = RandomFactory.GetInstance(); _currentParameterSetIndex = 0; ParameterSets = GenerateRandomParameters(parameterSetListCapacity); WinningParameterSets = new List <Tuple <double, double> >(); }
public static IBoundedRandom GetInstance() { return(_instance ?? (_instance = new BoundedRandom())); }
/// <summary> /// Initializes a new instance of the <see cref="BaseHarmonyGenerator{T}"/> class. /// </summary> /// <param name="function">The function.</param> /// <exception cref="ArgumentNullException">function</exception> protected BaseHarmonyGenerator(IObjectiveFunction <T> function) { ObjectiveFunction = function ?? throw new ArgumentNullException(nameof(function)); Random = RandomFactory.GetInstance(); }