• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

    最終更新日時(UTC):
    が更新

    履歴 編集

    function
    <cmath>

    std::assoc_laguerre

    namespace std {
      double
        assoc_laguerre(unsigned int n,
                       unsigned int m,
                       double x);              // (1) C++17
      floating-point-type
        assoc_laguerre(unsigned int n,
                       unsigned int m,
                       floating-point-type x); // (1) C++23
    
      Promoted
        assoc_laguerre(unsigned int n,
                       unsigned int m,
                       Arithmetic x);          // (2) C++17
    
      float
        assoc_laguerref(unsigned int n,
                        unsigned int m,
                        float x);              // (3) C++17
    
      long double
        assoc_laguerrel(unsigned int n,
                        unsigned int m,
                        long double x);        // (4) C++17
    }
    

    概要

    ラゲール陪多項式 (associated Laguerre polynomials) を計算する。

    戻り値

    引数 n, m, x のラゲール陪多項式 Lnm(x)=(1)mdmdxmLm+n(x)for x0 を返す。 右辺の L はラゲール多項式 (laguerre)。

    備考

    #include <cmath>
    #include <iostream>
    
    void p(unsigned n, unsigned m) {
      for (double x : {0., 1., 2.})
        std::cout << "assoc_laguerre(" << n << ", " << m << ", " << x << ") = " << std::assoc_laguerre(n, m, x) << "\n";
      std::cout << "\n";
    }
    
    int main() {
      p(0, 0); // L_0^0(x) = 1
      p(0, 1); // L_0^1(x) = 1
      p(1, 0); // L_1^0(x) = - x + 1
      p(1, 1); // L_1^1(x) = - x + 2
      p(2, 0); // L_2^0(x) = (x^2 - 4x + 2) / 2
      p(2, 1); // L_2^1(x) = (x^2 - 6x + 6) / 2
    }
    

    出力例

    assoc_laguerre(0, 0, 0) = 1
    assoc_laguerre(0, 0, 1) = 1
    assoc_laguerre(0, 0, 2) = 1
    
    assoc_laguerre(0, 1, 0) = 1
    assoc_laguerre(0, 1, 1) = 1
    assoc_laguerre(0, 1, 2) = 1
    
    assoc_laguerre(1, 0, 0) = 1
    assoc_laguerre(1, 0, 1) = 0
    assoc_laguerre(1, 0, 2) = -1
    
    assoc_laguerre(1, 1, 0) = 2
    assoc_laguerre(1, 1, 1) = 1
    assoc_laguerre(1, 1, 2) = 0
    
    assoc_laguerre(2, 0, 0) = 1
    assoc_laguerre(2, 0, 1) = -0.5
    assoc_laguerre(2, 0, 2) = -1
    
    assoc_laguerre(2, 1, 0) = 3
    assoc_laguerre(2, 1, 1) = 0.5
    assoc_laguerre(2, 1, 2) = -1
    
    

    バージョン

    言語

    • C++17

    処理系

    実装例

    閉形式

    Lnm(x)=j=0n(m+n)!(m+j)!(nj)!(x)jj!

    漸化式

    Lnm(x)=(2n+m1x)Ln1m(x)(n+m1)Ln2m(x)n;L0m(x)=1,L1m(x)=x+m+1

    関連項目

    参照