/// <inheritdoc/> public IDerivative CreateDerivative(bool track = true) { var result = new DerivativeInstance(this, _stateValues + 1); _stateValues += 2; return(result); }
/// <summary> /// Creates a derivative. /// </summary> /// <param name="track">If set to <c>true</c>, the integration method will use this state to limit truncation errors.</param> /// <returns> /// The derivative. /// </returns> public override IDerivative CreateDerivative(bool track) { var derivative = new DerivativeInstance(this, _stateValues + 1); _stateValues += 2; if (track) { TruncatableStates.Add(derivative); } return(derivative); }