Overload List
| # | Signature | Description |
|---|---|---|
| 1 | Double LegendreP(Int32 l, Double X) | Legendre polynomial P(l,x) = P(l,0,x) (order m = 0). |
| 2 | void LegendreP(Int32 n, Double X, TDenseMtxVec result) | Vector of Legendre polynomials P(0,x), P(1,x), ..., P(n,x) (order m = 0). |
| 3 | Double LegendreP(Int32 l, Int32 m, Double X) | Associated Legendre function P(l,m,x) (Condon-Shortley phase). |
| 4 | Single LegendreP(Int32 l, Int32 m, Single X) | |
| 5 | Single LegendreP(Int32 l, Single X) | |
| 6 | void LegendreP(Int32 n, Single X, TDenseMtxVec result) |
Overload 1: Double LegendreP(Int32 l, Double X)
Legendre polynomial P(l,x) = P(l,0,x) (order m = 0).
| # | Name | Description |
|---|---|---|
| 1 | X | Defines value at which the Legendre polynomial will be evaluated. Valid x values are real values on the closed interval [-1,1] |
| 2 | otherwise NaN is returned. | |
| 3 | l | Defines the Legendre degree parameter l (integer, l >= 0). |
Returns: Double - The Legendre polynomial P(l,x) = P(l,0,x), or NaN when |x| > 1.
Computes the ordinary Legendre polynomial of degree l, i.e. the associated Legendre function at order m = 0:
P_l(x)=1/(2^l l!)d^l/dx^l(x^2-1)^l, P_0=1, P_1=x, (l+1)P_(l+1)=(2l+1)x P_l-l P_(l-1).
Domain: integer l\ge 0 and real x on the closed interval [-1,1]. Defined behavior: returns NaN when |x|>1. Known values: P_l(1)=1 and P_l(-1)=(-1)^l.
Overload 2: void LegendreP(Int32 n, Double X, TDenseMtxVec result)
Vector of Legendre polynomials P(0,x), P(1,x), ..., P(n,x) (order m = 0).
| # | Name | Description |
|---|---|---|
| 1 | X | Defines value at which the Legendre polynomials will be evaluated. Valid x values are real values on the closed interval [-1,1]. |
| 2 | n | Defines the highest degree to evaluate |
| 3 | the result holds degrees 0..n (n must be >= 0). | |
| 4 | result | Returns the Legendre polynomials P(0,x), P(1,x), ..., P(n,x) in elements 0..n. |
Result: stored in self (calling object)
Fills result with the sequence of ordinary Legendre polynomials evaluated at x:
result[l]=P_l(x), l=0,1,...,n,
using the three-term recurrence (l+1)P_{l+1}=(2l+1)x\,P_l-l\,P_{l-1} with P_0=1, P_1=x. The result operand is auto-sized to length n+1 and its precision matches the operand (single or double). Domain: integer n\ge 0 and real x on the closed interval [-1,1]. Defined behavior: an exception is raised if result is complex or if n<0; for |x|>1 each element follows the scalar contract (NaN).
Overload 3: Double LegendreP(Int32 l, Int32 m, Double X)
Associated Legendre function P(l,m,x) (Condon-Shortley phase).
| # | Name | Description |
|---|---|---|
| 1 | X | Defines value at which the Legendre function will be evaluated. Valid x values are real values on the closed interval [-1,1] |
| 2 | otherwise NaN is returned. | |
| 3 | l | Defines the Legendre degree parameter l (integer, l >= 0). |
| 4 | m | Defines the Legendre order parameter m, an integer on the closed interval [0,l] |
| 5 | otherwise NaN is returned. |
Returns: Double - The associated Legendre function P(l,m,x) with the Condon-Shortley phase, or NaN when the parameters are out of domain.
Computes the associated Legendre function of degree l and order m, including the Condon-Shortley phase factor (-1)^m, by the standard upward recurrence in l. With P_l^m derived from the Legendre polynomial P_l by
P_l^m(x)=(-1)^m (1-x^2)^(m/2) d^m/dx^mP_l(x), m=0,1,...,l,
the function uses P_m^m(x)=(-1)^m(2m-1)!!\,(1-x^2)^{m/2}, P_{m+1}^m(x)=x\,(2m+1)\,P_m^m(x) and the recurrence (l-m)\,P_l^m=x(2l-1)P_{l-1}^m-(l+m-1)P_{l-2}^m.
Domain: integer l\ge 0, integer m on [0,l], and real x on the closed interval [-1,1]. Defined behavior on invalid input: if m<0, m>l, or |x|>1 the function returns NaN. The order-zero case P(l,0,x) equals the ordinary Legendre
polynomial P_l(x).
Overload 4: Single LegendreP(Int32 l, Int32 m, Single X)
| # | Name | Type | Description |
|---|---|---|---|
| 1 | l | Int32 | |
| 2 | m | Int32 | |
| 3 | X | Single | scalar |
Returns: Single
Overload 5: Single LegendreP(Int32 l, Single X)
| # | Name | Type | Description |
|---|---|---|---|
| 1 | l | Int32 | |
| 2 | X | Single | scalar |
Returns: Single
Overload 6: void LegendreP(Int32 n, Single X, TDenseMtxVec result)
| # | Name | Type | Description |
|---|---|---|---|
| 1 | n | Int32 | |
| 2 | X | Single | scalar |
| 3 | result | TDenseMtxVec | source TVec or TMtx |
Result: stored in self (calling object)