C# 클래스 Accord.Math.Differentiation.FiniteDifferences

Derivative approximation by finite differences.

Numerical differentiation is a technique of numerical analysis to produce an estimate of the derivative of a mathematical function or function subroutine using values from the function and perhaps other knowledge about the function.

References: Trent F. Guidry, Calculating derivatives of a function numerically. Available on: http://www.trentfguidry.net/post/2009/07/12/Calculate-derivatives-function-numerically.aspx

파일 보기 프로젝트 열기: accord-net/framework 1 사용 예제들

공개 메소드들

메소드 설명
Compute ( ) : double[]

Computes the gradient at the given point x.

Compute ( double x, double gradient ) : void

Computes the gradient at the given point x, storing the result at gradient.

CreateCoefficients ( int points ) : ].double[][

Creates the interpolation coefficients.

Derivative ( double>.Func function, double value ) : double

Computes the derivative for a simpler unidimensional function.

Derivative ( double>.Func function, double value, int order ) : double

Computes the derivative for a simpler unidimensional function.

Derivative ( double>.Func function, double value, int order, double stepSize ) : double

Computes the derivative for a simpler unidimensional function.

FiniteDifferences ( int variables ) : System

Initializes a new instance of the FiniteDifferences class.

FiniteDifferences ( int variables, double>.Func function ) : System

Initializes a new instance of the FiniteDifferences class.

FiniteDifferences ( int variables, double>.Func function, int order ) : System

Initializes a new instance of the FiniteDifferences class.

FiniteDifferences ( int variables, double>.Func function, int order, double stepSize ) : System

Initializes a new instance of the FiniteDifferences class.

FiniteDifferences ( int variables, int order ) : System

Initializes a new instance of the FiniteDifferences class.

FiniteDifferences ( int variables, int order, double stepSize ) : System

Initializes a new instance of the FiniteDifferences class.

비공개 메소드들

메소드 설명
Interpolate ( double coefficients, double points, int order, int center, double step ) : double

Interpolates the points to obtain an estimative of the derivative at x.

derivative ( double x, int index, double output ) : double

Computes the derivative at point x_i.

init ( double>.Func func, int variables, int order, double stepSize ) : void

메소드 상세

Compute() 공개 메소드

Computes the gradient at the given point x.
public Compute ( ) : double[]
리턴 double[]

Compute() 공개 메소드

Computes the gradient at the given point x, storing the result at gradient.
public Compute ( double x, double gradient ) : void
x double The point where to compute the gradient.
gradient double The gradient of the function evaluated at point x.
리턴 void

CreateCoefficients() 공개 정적인 메소드

Creates the interpolation coefficients.
public static CreateCoefficients ( int points ) : ].double[][
points int The number of points in the tableau.
리턴 ].double[][

Derivative() 공개 정적인 메소드

Computes the derivative for a simpler unidimensional function.
public static Derivative ( double>.Func function, double value ) : double
function double>.Func The function to be differentiated.
value double The value x at which the derivative should be evaluated.
리턴 double

Derivative() 공개 정적인 메소드

Computes the derivative for a simpler unidimensional function.
public static Derivative ( double>.Func function, double value, int order ) : double
function double>.Func The function to be differentiated.
value double The value x at which the derivative should be evaluated.
order int The derivative order that should be obtained. Default is 1.
리턴 double

Derivative() 공개 정적인 메소드

Computes the derivative for a simpler unidimensional function.
public static Derivative ( double>.Func function, double value, int order, double stepSize ) : double
function double>.Func The function to be differentiated.
value double The value x at which the derivative should be evaluated.
order int The derivative order that should be obtained. Default is 1.
stepSize double The relative step size used to approximate the derivatives. Default is 0.01.
리턴 double

FiniteDifferences() 공개 메소드

Initializes a new instance of the FiniteDifferences class.
public FiniteDifferences ( int variables ) : System
variables int The number of free parameters in the function.
리턴 System

FiniteDifferences() 공개 메소드

Initializes a new instance of the FiniteDifferences class.
public FiniteDifferences ( int variables, double>.Func function ) : System
variables int The number of free parameters in the function.
function double>.Func The function to be differentiated.
리턴 System

FiniteDifferences() 공개 메소드

Initializes a new instance of the FiniteDifferences class.
public FiniteDifferences ( int variables, double>.Func function, int order ) : System
variables int The number of free parameters in the function.
function double>.Func The function to be differentiated.
order int The derivative order that should be obtained. Default is 1.
리턴 System

FiniteDifferences() 공개 메소드

Initializes a new instance of the FiniteDifferences class.
public FiniteDifferences ( int variables, double>.Func function, int order, double stepSize ) : System
variables int The number of free parameters in the function.
function double>.Func The function to be differentiated.
order int The derivative order that should be obtained. Default is 1.
stepSize double The relative step size used to approximate the derivatives. Default is 0.01.
리턴 System

FiniteDifferences() 공개 메소드

Initializes a new instance of the FiniteDifferences class.
public FiniteDifferences ( int variables, int order ) : System
variables int The number of free parameters in the function.
order int The derivative order that should be obtained. Default is 1.
리턴 System

FiniteDifferences() 공개 메소드

Initializes a new instance of the FiniteDifferences class.
public FiniteDifferences ( int variables, int order, double stepSize ) : System
variables int The number of free parameters in the function.
order int The derivative order that should be obtained. Default is 1.
stepSize double The relative step size used to approximate the derivatives. Default is 0.01.
리턴 System