C# Class Accord.Math.Integration.MonteCarloIntegration

Monte Carlo method for multi-dimensional integration.

In mathematics, Monte Carlo integration is a technique for numerical integration using random numbers. It is a particular Monte Carlo method that numerically computes a definite integral. While other algorithms usually evaluate the integrand at a regular grid, Monte Carlo randomly choose points at which the integrand is evaluated. This method is particularly useful for higher-dimensional integrals. There are different methods to perform a Monte Carlo integration, such as uniform sampling, stratified sampling and importance sampling.

Inheritance: INumericalIntegration, IMultidimensionalIntegration
Afficher le fichier Open project: accord-net/framework Class Usage Examples

Méthodes publiques

Méthode 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, int samples ) : double

Computes the area under the integral for the given function, in the given integration interval, using a Monte Carlo integration algorithm.

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

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, int samples ) : double

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

MonteCarloIntegration ( int parameters ) : System

Constructs a new Monte Carlo integration method.

MonteCarloIntegration ( int parameters, double>.Func function ) : System

Constructs a new Monte Carlo integration method.

Reset ( ) : void

Manually resets the previously computed area and error estimates, so the integral can be computed from scratch without reusing previous computations.

Method Details

Clone() public méthode

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

Compute() public méthode

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

Integrate() public static méthode

Computes the area under the integral for the given function, in the given integration interval, using a Monte Carlo integration algorithm.
public static Integrate ( double>.Func func, double a, double b, int samples ) : 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.
samples int The number of points that should be sampled.
Résultat double

Integrate() public static méthode

Computes the area of the function under the selected Range. The computed value will be available at this object's Area.
public static Integrate ( double>.Func func, double a, double b ) : double
func double>.Func
a double
b double
Résultat double

Integrate() public static méthode

Computes the area of the function under the selected Range. The computed value will be available at this object's Area.
public static Integrate ( double>.Func func, double a, double b, int samples ) : double
func double>.Func
a double
b double
samples int
Résultat double

MonteCarloIntegration() public méthode

Constructs a new Monte Carlo integration method.
public MonteCarloIntegration ( int parameters ) : System
parameters int The number of parameters expected by the integrand.
Résultat System

MonteCarloIntegration() public méthode

Constructs a new Monte Carlo integration method.
public MonteCarloIntegration ( int parameters, double>.Func function ) : System
parameters int The number of parameters expected by the .
function double>.Func The function to be integrated.
Résultat System

Reset() public méthode

Manually resets the previously computed area and error estimates, so the integral can be computed from scratch without reusing previous computations.
public Reset ( ) : void
Résultat void