|
LMMC
Lamina Mathematic core
|
#include "internal/quadrature_internal.h"宏定义 | |
| #define | LMMC_GH_MAX_ORDER 20 |
| Gauss-Hermite 求积,权函数 exp(-x^2),积分域 (-inf, +inf)。 | |
| #define | LMMC_GL_LAG_MAX_ORDER 20 |
| Gauss-Laguerre 求积,权函数 exp(-x),积分域 [0, +inf)。 | |
函数 | |
| lmmc_status_t | lmmc_quad_gauss_hermite (lmmc_quad_func_t f, void *ud, size_t order, lmmc_real_t *out) |
| Gauss-Hermite 求积:权函数 \(\exp(-x^2)\) ,积分域 \((-\infty, +\infty)\) 。 | |
| lmmc_status_t | lmmc_quad_gauss_laguerre (lmmc_quad_func_t f, void *ud, size_t order, lmmc_real_t *out) |
| Gauss-Laguerre 求积:权函数 \(\exp(-x)\) ,积分域 \([0, +\infty)\) 。 | |
| #define LMMC_GH_MAX_ORDER 20 |
Gauss-Hermite 求积,权函数 exp(-x^2),积分域 (-inf, +inf)。
Golub-Welsch 算法以 Hermite 多项式的对称三对角 Jacobi 矩阵特征值为节点, 以特征向量的首分量计算权重。 物理学家形式的 Hermite 多项式满足 x H_n = H_{n+1}/2 + n H_{n-1}; Jacobi 系数为 a_i = 0、b_i = sqrt(i/2),i=1..n-1。
在文件 quadrature_weighted.c 第 12 行定义.
| #define LMMC_GL_LAG_MAX_ORDER 20 |
Gauss-Laguerre 求积,权函数 exp(-x),积分域 [0, +inf)。
Golub-Welsch 算法使用首一 Laguerre 多项式的三项递推: x L_n(x) = L_{n+1}(x) + (2n+1) L_n(x) - n^2 L_{n-1}(x)。 Jacobi 系数为 alpha_i = 2*i + 1、beta_i = i(i=1..n-1); mu_0 为 exp(-x) 在 [0, inf) 上的积分,等于 1。
在文件 quadrature_weighted.c 第 172 行定义.
被这些函数引用 lmmc_quad_gauss_laguerre().
| lmmc_status_t lmmc_quad_gauss_hermite | ( | lmmc_quad_func_t | f, |
| void * | ud, | ||
| size_t | order, | ||
| lmmc_real_t * | out ) |
Gauss-Hermite 求积:权函数 \(\exp(-x^2)\) ,积分域 \((-\infty, +\infty)\) 。
计算 \(\int_{-\infty}^{+\infty} f(x) \exp(-x^2) dx\) 。
| [in] | f | 被积函数(不含权函数部分)。 |
| [in] | ud | 用户数据指针。 |
| [in] | order | 节点数(阶数),范围 [1, 20]。 |
| [out] | out | 积分结果值。 |
f 被调用恰好 order 次。在文件 quadrature_weighted.c 第 155 行定义.
引用了 lmmc_quad_gauss_hermite().
被这些函数引用 lmmc_quad_gauss_hermite().
| lmmc_status_t lmmc_quad_gauss_laguerre | ( | lmmc_quad_func_t | f, |
| void * | ud, | ||
| size_t | order, | ||
| lmmc_real_t * | out ) |
Gauss-Laguerre 求积:权函数 \(\exp(-x)\) ,积分域 \([0, +\infty)\) 。
计算 \(\int_0^{+\infty} f(x) \exp(-x) dx\) 。
| [in] | f | 被积函数(不含权函数部分)。 |
| [in] | ud | 用户数据指针。 |
| [in] | order | 节点数(阶数),范围 [1, 20]。 |
| [out] | out | 积分结果值。 |
f 被调用恰好 order 次。在文件 quadrature_weighted.c 第 174 行定义.
引用了 LMMC_GL_LAG_MAX_ORDER, lmmc_quad_gauss_laguerre(), LMMC_STATUS_INVALID_ARGUMENT, LMMC_STATUS_NUMERICAL_FAILURE , 以及 LMMC_STATUS_OK.
被这些函数引用 lmmc_quad_gauss_laguerre().