/// <summary> /// Computes the integral of the current function over the specified interval. /// </summary> /// <param name="a">Lower integration limit.</param> /// <param name="b">Upper integration limit.</param> /// <returns>The integral value over the specified interval.</returns> /// <remarks> /// If an integrator was not explicitly set, the method uses the default integrator. /// </remarks> public double Integrate(double a, double b) { if (_integrator == null) { return(DefaultIntegrator.Integrate(_function, a, b)); } else { return(_integrator.Integrate(_function, a, b)); } }
/// <summary> /// Computes the integral of the current function over the specified interval. /// </summary> /// <param name="a">Lower integration limit.</param> /// <param name="b">Upper integration limit.</param> /// <returns>The integral value over the specified interval.</returns> /// <remarks> /// If an integrator was not explicitly set, the method uses the default integrator. /// </remarks> public float Integrate(float a, float b) { if (_integrator == null) { return(DefaultIntegrator.Integrate(_function, a, b)); } else { return(_integrator.Integrate(_function, a, b)); } }