C# Class Accord.Math.Integration.RombergMethod

Romberg's method for numerical integration.

In numerical analysis, Romberg's method (Romberg 1955) is used to estimate the definite integral ∫_a^b(x) dx by applying Richardson extrapolation repeatedly on the trapezium rule or the rectangle rule (midpoint rule). The estimates generate a triangular array. Romberg's method is a Newton–Cotes formula – it evaluates the integrand at equally spaced points. The integrand must have continuous derivatives, though fairly good results may be obtained if only a few derivatives exist. If it is possible to evaluate the integrand at unequally spaced points, then other methods such as Gaussian quadrature and Clenshaw–Curtis quadrature are generally more accurate.

References: Wikipedia, The Free Encyclopedia. Romberg's method. Available on: http://en.wikipedia.org/wiki/Romberg's_method

Inheritance: IUnivariateIntegration, INumericalIntegration
Show file Open project: accord-net/framework Class Usage Examples

Public Methods

Method Description
Clone ( ) : object

Creates a new object that is a copy of the current instance.

Compute ( ) : bool

Computes the area of the function under the selected Range. The computed value will be available at this object's Area.

Integrate ( double>.Func func, double a, double b ) : double

Computes the area under the integral for the given function, in the given integration interval, using Romberg's method.

Integrate ( double>.Func func, double a, double b, int steps ) : double

Computes the area under the integral for the given function, in the given integration interval, using Romberg's method.

RombergMethod ( ) : System

Constructs a new Romberg's integration method.

RombergMethod ( double>.Func function ) : System

Constructs a new Romberg's integration method.

RombergMethod ( double>.Func function, double a, double b ) : System

Constructs a new Romberg's integration method.

RombergMethod ( int steps ) : System

Constructs a new Romberg's integration method.

RombergMethod ( int steps, double>.Func function ) : System

Constructs a new Romberg's integration method.

RombergMethod ( int steps, double>.Func function, double a, double b ) : System

Constructs a new Romberg's integration method.

Method Details

Clone() public method

Creates a new object that is a copy of the current instance.
public Clone ( ) : object
return object

Compute() public method

Computes the area of the function under the selected Range. The computed value will be available at this object's Area.
public Compute ( ) : bool
return bool

Integrate() public static method

Computes the area under the integral for the given function, in the given integration interval, using Romberg's method.
public static Integrate ( double>.Func func, double a, double b ) : double
func double>.Func The unidimensional function whose integral should be computed.
a double The beginning of the integration interval.
b double The ending of the integration interval.
return double

Integrate() public static method

Computes the area under the integral for the given function, in the given integration interval, using Romberg's method.
public static Integrate ( double>.Func func, double a, double b, int steps ) : double
func double>.Func The unidimensional function whose integral should be computed.
a double The beginning of the integration interval.
b double The ending of the integration interval.
steps int The number of steps used in Romberg's method. Default is 6.
return double

RombergMethod() public method

Constructs a new Romberg's integration method.
public RombergMethod ( ) : System
return System

RombergMethod() public method

Constructs a new Romberg's integration method.
public RombergMethod ( double>.Func function ) : System
function double>.Func The unidimensional function whose integral should be computed.
return System

RombergMethod() public method

Constructs a new Romberg's integration method.
public RombergMethod ( double>.Func function, double a, double b ) : System
function double>.Func The unidimensional function whose integral should be computed.
a double The beginning of the integration interval.
b double The ending of the integration interval.
return System

RombergMethod() public method

Constructs a new Romberg's integration method.
public RombergMethod ( int steps ) : System
steps int The number of steps used in Romberg's method. Default is 6.
return System

RombergMethod() public method

Constructs a new Romberg's integration method.
public RombergMethod ( int steps, double>.Func function ) : System
steps int The number of steps used in Romberg's method. Default is 6.
function double>.Func The unidimensional function whose integral should be computed.
return System

RombergMethod() public method

Constructs a new Romberg's integration method.
public RombergMethod ( int steps, double>.Func function, double a, double b ) : System
steps int The number of steps used in Romberg's method. Default is 6.
function double>.Func The unidimensional function whose integral should be computed.
a double The beginning of the integration interval.
b double The ending of the integration interval.
return System