Browse Source

Revert breaking change

pull/646/merge
Christoph Ruegg 7 years ago
parent
commit
a7f18f291c
  1. 14
      src/Numerics/Integrate.cs

14
src/Numerics/Integrate.cs

@ -46,11 +46,23 @@ namespace MathNet.Numerics
/// <param name="intervalEnd">Where the interval stops, inclusive and finite.</param> /// <param name="intervalEnd">Where the interval stops, inclusive and finite.</param>
/// <param name="targetAbsoluteError">The expected relative accuracy of the approximation.</param> /// <param name="targetAbsoluteError">The expected relative accuracy of the approximation.</param>
/// <returns>Approximation of the finite integral in the given interval.</returns> /// <returns>Approximation of the finite integral in the given interval.</returns>
public static double OnClosedInterval(Func<double, double> f, double intervalBegin, double intervalEnd, double targetAbsoluteError = 1E-8) public static double OnClosedInterval(Func<double, double> f, double intervalBegin, double intervalEnd, double targetAbsoluteError)
{ {
return DoubleExponentialTransformation.Integrate(f, intervalBegin, intervalEnd, targetAbsoluteError); return DoubleExponentialTransformation.Integrate(f, intervalBegin, intervalEnd, targetAbsoluteError);
} }
/// <summary>
/// Approximation of the definite integral of an analytic smooth function on a closed interval.
/// </summary>
/// <param name="f">The analytic smooth function to integrate.</param>
/// <param name="intervalBegin">Where the interval starts, inclusive and finite.</param>
/// <param name="intervalEnd">Where the interval stops, inclusive and finite.</param>
/// <returns>Approximation of the finite integral in the given interval.</returns>
public static double OnClosedInterval(Func<double, double> f, double intervalBegin, double intervalEnd)
{
return DoubleExponentialTransformation.Integrate(f, intervalBegin, intervalEnd, 1e-8);
}
/// <summary> /// <summary>
/// Approximates a 2-dimensional definite integral using an Nth order Gauss-Legendre rule over the rectangle [a,b] x [c,d]. /// Approximates a 2-dimensional definite integral using an Nth order Gauss-Legendre rule over the rectangle [a,b] x [c,d].
/// </summary> /// </summary>

Loading…
Cancel
Save