// Run the simulation private void SimulatePrice() { for (uint i = 1; i < SimulatedPrice.Steps; i++) { SimulatedPriceArray[i] = DiscretizationScheme.Increment(SimulatedPriceArray[i - 1]); } }
public DiscretizationParameter(Variable variable, Expression minValue, Expression maxValue, int count, DiscretizationScheme scheme) { if (variable == null) { throw new ArgumentNullException(nameof(variable)); } if (minValue == null) { throw new ArgumentNullException(nameof(minValue)); } if (maxValue == null) { throw new ArgumentNullException(nameof(maxValue)); } if (count < 3) { throw new ArgumentOutOfRangeException(nameof(count), "Count should be not less than 3"); } _variable = variable; _minValue = minValue; _maxValue = maxValue; _count = count; _scheme = scheme; }