Skip to main content
. 2022 Nov 26;22(23):9209. doi: 10.3390/s22239209
Algorithm 1 The algorithm used to compute the Charlier polynomials

Input:N = Polynomial size, p = Polynomial parameter.

Output:C^ = Charlier polynomials.

1: Initialize C^ with a size of N×N

2: C^p(0;p)elogΓ(p)+p+(1p)log(p)0.5 {Compute initial value}.

3: n[p2,p1,,0] {Set the range of n}.

4:for i in range n do

5:   C^i1(0;p)ipC^i(0;p)

6: end for

7: n[n=p+1,p+2,,N1,] {Set the range of n}.

8: for i in range n do

9:   C^i(0;p)pnC^i1(0;p)

10:end for

11:for n=0 to N1 do

12:   C^n(1;p)(pn)nC^n0;p

13:end for

14:{Compute the coefficients in “Part 1”}

15:for x=1 to N1 do

16:    for n=x to N1 do

17:      Aan+xa(x+1)

18:      Bx(x+1)

19:      C^nx+1;pAC^nx;p+BC^nx1;p

20:    end for

21: end for

22: {Compute the coefficients in “Part 2”}

23:for n=1 to N1 do

24:    for x=0 to n1 do

25:       C^n(x;p)C^x(n;p)

26:    end for

27: end for

28: return {C^ Note that Hd in Equation (27) is equal to C^.}