/// <summary> /// Initializes a new instance of the <see cref="SolverVariable{T}"/> class. /// </summary> /// <param name="state">The state where to find the solution of the variable.</param> /// <param name="name">The name of the variable.</param> /// <param name="index">The index of the variable.</param> /// <param name="unit">The unit of the variable.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="state"/> is <c>null</c>.</exception> public SolverVariable(ISolverSimulationState <T> state, string name, int index, IUnit unit) { _state = state.ThrowIfNull(nameof(state)); Name = name; _index = index; Unit = unit; }
/// <summary> /// Initializes a new instance of the <see cref="Rules"/> class. /// </summary> /// <param name="state">The biasing simulation state.</param> /// <param name="frequencies">The frequencies that will be evaluated.</param> public Rules(ISolverSimulationState <double> state, IEnumerable <double> frequencies) : base(state, state.Comparer) { FrequencyParameters = new RuleParameters(frequencies); }