C# Класс 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.

Наследование: INumericalIntegration, IMultidimensionalIntegration
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

Clone() публичный Метод

Creates a new object that is a copy of the current instance.
public Clone ( ) : object
Результат object

Compute() публичный Метод

Computes the area of the function under the selected Range. The computed value will be available at this object's Area.
public Compute ( ) : bool
Результат bool

Integrate() публичный статический Метод

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.
Результат double

Integrate() публичный статический Метод

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
Результат double

Integrate() публичный статический Метод

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
Результат double

MonteCarloIntegration() публичный Метод

Constructs a new Monte Carlo integration method.
public MonteCarloIntegration ( int parameters ) : System
parameters int The number of parameters expected by the integrand.
Результат System

MonteCarloIntegration() публичный Метод

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.
Результат System

Reset() публичный Метод

Manually resets the previously computed area and error estimates, so the integral can be computed from scratch without reusing previous computations.
public Reset ( ) : void
Результат void