IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.
|
Static Public Member Functions | |
static double | IntegralSimpson (DlgFunctionValue f, double from, double to, int numintervals) |
Returns numerical integral of a function calculated by the composite Simpson's rule. Error: -(to-from)*h^4*f(4)(mi)/180. | |
static double | IntegralSimpson (double[] tabx, double[] tabf) |
Returns numerical integral of a function calculated by the Simpson's rule. Function is specified as a table of values in equidistant points. Intervals need to be equidistant, minimal number of points is 3 and must be odd. Error: -(to-from)*h^4*f(4)(mi)/180. | |
static double | IntegralTrapezoidal (DlgFunctionValue f, double from, double to, int numintervals) |
Returns numerical integral of a function calculated by the composite trapezoidal rule. Error: -(a-b)*h^2*f''(mi)/12. | |
static double | IntegralTrapezoidal (double[] tabx, double[] tabf) |
Returns numerical integral of a function calculated by the trapezoidal rule. Function is specified as a table of values in specified points. Intervals do not need to be equidistant, minimal number of points is 2. Error: -(a-b)*h^2*f''(mi)/12. | |
static double | DerivativeFD (DlgFunctionValue f, double x, double step) |
Calculates numerical derivative of a function according to the forward difference formula. Error: -h*f''(mi)/2. | |
static double | DerivativeBD (DlgFunctionValue f, double x, double step) |
Calculates numerical derivative of f according to the backward difference formula. Error: h*f''(mi)/2. | |
static double | DerivativeCD (DlgFunctionValue f, double x, double step) |
Calculates numerical derivative of a function according to the central difference formula. Error: -h^2*f(3)(mi)/6. | |
static double | Derivative4Point (DlgFunctionValue f, double x, double h) |
Calculates the derivative of a function with a 4 point formula. Error is of order O(h^4). | |
static double | SecondDerivativeCD (DlgFunctionValue f, double x, double step) |
Calculates numerical second derivative of a function according to the central difference formula. Error: -h^2*f(4)(mi)/12. | |
static double | SecondDerivative5Point (DlgFunctionValue f, double x, double h) |
Calculates the second order derivative of a function with a 5 point formula. Error is O(h^4). | |
static double | ThirdDerivative4Point (DlgFunctionValue f, double x, double h) |
Calculates the third order derivative of a function with a 5 point formula. Error is O(h^2). | |
static double | ThirdDerivative6Point (DlgFunctionValue f, double x, double h) |
Calculates the third order derivative of a function with a 5 point formula. Error is O(h^4). | |
static double | FourthDerivative5Point (DlgFunctionValue f, double x, double h) |
Calculates the fourth order derivative of a function with a 5 point formula. Error is O(h^2). | |
static double | FourthDerivative7Point (DlgFunctionValue f, double x, double h) |
Calculates the fourth order derivative of a function with a 5 point formula. Error is O(h^4). | |
static double | FifthDerivative7Point (DlgFunctionValue f, double x, double h) |
Calculates the fifth order derivative of a function with a 7 point formula. | |
static double | FifthDerivative9Point (DlgFunctionValue f, double x, double h) |
Calculates the fifth order derivative of a function with a 9 point formula. | |
static void | TestDifferentiation () |
Tests numerical differentiation methods. | |
static void | TestIntegration () |
Test for numerical integration methods. | |
Static Private Member Functions | |
static double | IntegralSimpsonTab (DlgFunctionValue f, double from, double to, int numintervals) |
Calculates numerical integral of a function by Simpson's rule, but through a table of values. | |
static double | IntegralTrapeZoidalTab (DlgFunctionValue f, double from, double to, int numintervals) |
Calculates numerical integral of a function by Trapezoidal rule, but through a table of values. |
static double IG::Num::Numeric::IntegralSimpson | ( | DlgFunctionValue | f, |
double | from, | ||
double | to, | ||
int | numintervals | ||
) | [inline, static] |
Returns numerical integral of a function calculated by the composite Simpson's rule. Error: -(to-from)*h^4*f(4)(mi)/180.
f | Function to be integrated. |
from | Lower bound of integration interval. |
to | Upper bound of integration interval. |
numintervals | Number of sub-intervals (1 less than the numbe of evaluation points). |
static double IG::Num::Numeric::IntegralSimpson | ( | double[] | tabx, |
double[] | tabf | ||
) | [inline, static] |
Returns numerical integral of a function calculated by the Simpson's rule. Function is specified as a table of values in equidistant points. Intervals need to be equidistant, minimal number of points is 3 and must be odd. Error: -(to-from)*h^4*f(4)(mi)/180.
tabx | Table of equidistant points at which function is evaluated. |
tabf | Table of function values in points contained in tabx. |
static double IG::Num::Numeric::IntegralTrapezoidal | ( | DlgFunctionValue | f, |
double | from, | ||
double | to, | ||
int | numintervals | ||
) | [inline, static] |
Returns numerical integral of a function calculated by the composite trapezoidal rule. Error: -(a-b)*h^2*f''(mi)/12.
f | Function to be integrated. |
from | Lower bound of integration interval. |
to | Upper bound of integration interval. |
numintervals | Number of sub-intervals (1 less than the numbe of evaluation points). |
static double IG::Num::Numeric::IntegralTrapezoidal | ( | double[] | tabx, |
double[] | tabf | ||
) | [inline, static] |
Returns numerical integral of a function calculated by the trapezoidal rule. Function is specified as a table of values in specified points. Intervals do not need to be equidistant, minimal number of points is 2. Error: -(a-b)*h^2*f''(mi)/12.
tabx | Table of equidistant points at which function is evaluated. |
tabf | Table of function values in points contained in tabx. |
static double IG::Num::Numeric::IntegralSimpsonTab | ( | DlgFunctionValue | f, |
double | from, | ||
double | to, | ||
int | numintervals | ||
) | [inline, static, private] |
Calculates numerical integral of a function by Simpson's rule, but through a table of values.
static double IG::Num::Numeric::IntegralTrapeZoidalTab | ( | DlgFunctionValue | f, |
double | from, | ||
double | to, | ||
int | numintervals | ||
) | [inline, static, private] |
Calculates numerical integral of a function by Trapezoidal rule, but through a table of values.
static double IG::Num::Numeric::DerivativeFD | ( | DlgFunctionValue | f, |
double | x, | ||
double | step | ||
) | [inline, static] |
Calculates numerical derivative of a function according to the forward difference formula. Error: -h*f''(mi)/2.
f | Function whose derivative is calculated. |
x | Value of independent variable at which derivative is calculated. |
step | Step size used in differentiation. |
static double IG::Num::Numeric::DerivativeBD | ( | DlgFunctionValue | f, |
double | x, | ||
double | step | ||
) | [inline, static] |
Calculates numerical derivative of f according to the backward difference formula. Error: h*f''(mi)/2.
f | Function whose derivative is calculated. |
x | Value of independent variable at which derivative is calculated. |
step | Step size used in differentiation. |
static double IG::Num::Numeric::DerivativeCD | ( | DlgFunctionValue | f, |
double | x, | ||
double | step | ||
) | [inline, static] |
Calculates numerical derivative of a function according to the central difference formula. Error: -h^2*f(3)(mi)/6.
f | Function whose derivative is calculated. |
x | Value of independent variable at which derivative is calculated. |
step | Step size used in differentiation. |
static double IG::Num::Numeric::Derivative4Point | ( | DlgFunctionValue | f, |
double | x, | ||
double | h | ||
) | [inline, static] |
Calculates the derivative of a function with a 4 point formula. Error is of order O(h^4).
f | Function whose derivative is calculated. |
x | Value of independent variable at which derivative is calculated. |
h | Step size. |
static double IG::Num::Numeric::SecondDerivativeCD | ( | DlgFunctionValue | f, |
double | x, | ||
double | step | ||
) | [inline, static] |
Calculates numerical second derivative of a function according to the central difference formula. Error: -h^2*f(4)(mi)/12.
f | Function whose derivative is calculated. |
x | Value of independent variable at which derivative is calculated. |
step | Step size used in differentiation. |
static double IG::Num::Numeric::SecondDerivative5Point | ( | DlgFunctionValue | f, |
double | x, | ||
double | h | ||
) | [inline, static] |
Calculates the second order derivative of a function with a 5 point formula. Error is O(h^4).
f | Function whose derivative is calculated. |
x | Value of independent variable at which derivative is calculated. |
h | Step size. |
static double IG::Num::Numeric::ThirdDerivative4Point | ( | DlgFunctionValue | f, |
double | x, | ||
double | h | ||
) | [inline, static] |
Calculates the third order derivative of a function with a 5 point formula. Error is O(h^2).
f | Function whose derivative is calculated. |
x | Value of independent variable at which derivative is calculated. |
h | Step size. |
static double IG::Num::Numeric::ThirdDerivative6Point | ( | DlgFunctionValue | f, |
double | x, | ||
double | h | ||
) | [inline, static] |
Calculates the third order derivative of a function with a 5 point formula. Error is O(h^4).
f | Function whose derivative is calculated. |
x | Value of independent variable at which derivative is calculated. |
h | Step size. |
static double IG::Num::Numeric::FourthDerivative5Point | ( | DlgFunctionValue | f, |
double | x, | ||
double | h | ||
) | [inline, static] |
Calculates the fourth order derivative of a function with a 5 point formula. Error is O(h^2).
f | Function whose derivative is calculated. |
x | Value of independent variable at which derivative is calculated. |
h | Step size. |
static double IG::Num::Numeric::FourthDerivative7Point | ( | DlgFunctionValue | f, |
double | x, | ||
double | h | ||
) | [inline, static] |
Calculates the fourth order derivative of a function with a 5 point formula. Error is O(h^4).
f | Function whose derivative is calculated. |
x | Value of independent variable at which derivative is calculated. |
h | Step size. |
static double IG::Num::Numeric::FifthDerivative7Point | ( | DlgFunctionValue | f, |
double | x, | ||
double | h | ||
) | [inline, static] |
Calculates the fifth order derivative of a function with a 7 point formula.
f | Function whose derivative is calculated. |
x | Value of independent variable at which derivative is calculated. |
h | Step size. |
static double IG::Num::Numeric::FifthDerivative9Point | ( | DlgFunctionValue | f, |
double | x, | ||
double | h | ||
) | [inline, static] |
Calculates the fifth order derivative of a function with a 9 point formula.
f | Function whose derivative is calculated. |
x | Value of independent variable at which derivative is calculated. |
h | Step size. |
static void IG::Num::Numeric::TestDifferentiation | ( | ) | [inline, static] |
Tests numerical differentiation methods.
static void IG::Num::Numeric::TestIntegration | ( | ) | [inline, static] |
Test for numerical integration methods.