Learn R Programming

wmm (version 1.1.1)

.CalcLegendreComponents: Compute Legendre Components

Description

Function that computes the components of the associated Legendre function, \(P_{n,m}(\mu)\), only dependent on (degree, order) indices. This function is only used to precompute values.

Usage

.CalcLegendreComponents(n, m)

Arguments

n

degree of associated Legendre function

m

order of associated Legendre function

Details

The underlying equation used is: $$P(x, n, m)=(-1)^m * 2^n * (1-x^2)^(m/2) * sum(for m <= k <= n: k!/(k-m)! * x^(k-m) * choose(n, k) * choose((n+k-1)/2, n))$$