std::assoc_laguerre, std::assoc_laguerref, std::assoc_laguerrel
提供: cppreference.com
< cpp | numeric | special functions
ヘッダ <cmath> で定義
|
||
double assoc_laguerre( unsigned int n, unsigned int m, double x ); float assoc_laguerre( unsigned int n, unsigned int m, float x ); |
(1) | (C++17以上) |
double assoc_laguerre( unsigned int n, unsigned int m, 整数型 x ); |
(2) | (C++17以上) |
目次 |
[編集] 引数
n | - | 多項式の次数、符号なし整数型の値 |
m | - | 多項式の位数、符号なし整数型の値 |
x | - | 引数、浮動小数点型または整数型の値 |
[編集] 戻り値
エラーが発生しなければ、x
のラゲール陪多項式の値、すなわち (-1)mdm |
dxm |
n+m(x) が返されます (ただし L
n+m(x) はラゲール多項式 std::laguerre(n+m, x) です)。
[編集] エラー処理
エラーは math_errhandling で規定されているように報告されます。
- 引数が NaN の場合は、 NaN が返されます。 定義域エラーは報告されません。
-
x
が負の場合は、定義域エラーが発生するかもしれません。 -
n
またはm
が128以上の場合、動作は処理系定義です。
[編集] ノート
C++17 をサポートしないけれども ISO 29124:2010 をサポートする処理系は、 __STDCPP_MATH_SPEC_FUNCS__
が処理系によって少なくとも 201003L の値に定義されており、ユーザがいかなる標準ライブラリのヘッダもインクルードする前に __STDCPP_WANT_MATH_SPEC_FUNCS__
を定義する場合、この関数を提供します。
ISO 29124:2010 をサポートしなけれども TR 19768:2007 (TR1) をサポートする処理系は、ヘッダ <tr1/cmath>
および名前空間 std::tr1
で、この関数を提供します。
この関数の実装は boost.math でも利用可能です。
ラゲール陪多項式は方程式 xy,,
+(m+1-x)y,
+ny = 0 の多項式解です。
最初のいくつかは以下の通りです。
- assoc_laguerre(0, m, x) = 1
- assoc_laguerre(1, m, x) = -x + m + 1
- assoc_laguerre(2, m, x) =
[x21 2
-2(m+2)x+(m+1)(m+2)] - assoc_laguerre(3, m, x) =
[-x31 6
-3(m+3)x2
-3(m+2)(m+3)x+(m+1)(m+2)(m+3)]
[編集] 例
Run this code
#include <cmath> #include <iostream> double L1(unsigned m, double x) { return -x + m + 1; } double L2(unsigned m, double x) { return 0.5*(x*x-2*(m+2)*x+(m+1)*(m+2)); } int main() { // spot-checks std::cout << std::assoc_laguerre(1, 10, 0.5) << '=' << L1(10, 0.5) << '\n' << std::assoc_laguerre(2, 10, 0.5) << '=' << L2(10, 0.5) << '\n'; }
出力:
10.5=10.5 60.125=60.125
[編集] 関連項目
(C++17)(C++17)(C++17) |
ラゲール多項式 (関数) |
[編集] 外部リンク
Weisstein, Eric W. "Associated Laguerre Polynomial." From MathWorld--A Wolfram Web Resource.