You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add associated Legendre Polynomials P_l,m
* Correct argument names in documentation
* Correct example output in doc strings
* Correct output in documentation
* New version 0.3.4
To compute all the associated Legendre polynomials for `0 <= l <= lmax`, use `collectPlm(x; m, lmax)`
57
+
58
+
```julia
59
+
julia>collectPlm(0.5, lmax =5, m =3)
60
+
6-element OffsetArray(::Vector{Float64}, 0:5) with eltype Float64 with indices 0:5:
61
+
0.0
62
+
0.0
63
+
0.0
64
+
-9.742785792574933
65
+
-34.099750274012266
66
+
-42.62468784251533
67
+
```
68
+
49
69
To compute all the n-th derivatives for `0 <= l <= lmax`, use `collectdnPl(x; n, lmax)`
50
70
51
71
```julia
@@ -63,4 +83,4 @@ Check the documentation for other usage.
63
83
64
84
# License
65
85
66
-
This project is licensed under the MIT License - see the [LICENSE](https://github.com/jishnub/LegendrePolynomials.jl/blob/master/LICENSE) file for details.
86
+
This project is licensed under the MIT License - see the [LICENSE](https://github.com/jishnub/LegendrePolynomials.jl/blob/master/LICENSE) file for details.
Copy file name to clipboardExpand all lines: docs/src/index.md
+24-2Lines changed: 24 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ end
7
7
8
8
# Introduction
9
9
10
-
Compute [Legendre polynomials](https://en.wikipedia.org/wiki/Legendre_polynomials) and their derivatives using a 3-term recursion relation (Bonnet’s recursion formula).
10
+
Compute [Legendre polynomials](https://en.wikipedia.org/wiki/Legendre_polynomials), [Associated Legendre polynomials](https://en.wikipedia.org/wiki/Associated_Legendre_polynomials), and their derivatives using a 3-term recursion relation (Bonnet’s recursion formula).
11
11
12
12
```math
13
13
P_\ell(x) = \left((2\ell-1) x P_{\ell-1}(x) - (\ell-1)P_{\ell - 2}(x)\right)/\ell
@@ -19,10 +19,12 @@ Currently this package evaluates the standard polynomials that satisfy ``P_\ell(
*[`Pl(x,l)`](@ref Pl): this evaluates the Legendre polynomial for a given degree `l` at the argument `x`. The argument needs to satisfy `-1 <= x <= 1`.
25
25
*[`collectPl(x; lmax)`](@ref collectPl): this evaluates all the polynomials for `l` lying in `0:lmax` at the argument `x`. As before the argument needs to lie in the domain of validity. Functionally this is equivalent to `Pl.(x, 0:lmax)`, except `collectPl` evaluates the result in one pass, and is therefore faster. There is also the in-place version [`collectPl!`](@ref) that uses a pre-allocated array.
26
+
*[`Plm(x, l, m)`](@ref Plm): this evaluates the associated Legendre polynomial ``P_\ell,m(x)`` at the argument ``x``. The argument needs to satisfy `-1 <= x <= 1`.
27
+
*[`collectPlm(x; m, lmax)`](@ref collectPlm): this evaluates the associated Legendre polynomials with coefficient `m` for `l = 0:lmax`. There is also an in-place version [`collectPlm!`](@ref) that uses a pre-allocated array.
26
28
*[`dnPl(x, l, n)`](@ref dnPl): this evaluates the ``n``-th derivative of the Legendre polynomial ``P_\ell(x)`` at the argument ``x``. The argument needs to satisfy `-1 <= x <= 1`.
27
29
*[`collectdnPl(x; n, lmax)`](@ref collectdnPl): this evaluates the ``n``-th derivative of all the Legendre polynomials for `l = 0:lmax`. There is also an in-place version [`collectdnPl!`](@ref) that uses a pre-allocated array.
28
30
@@ -35,6 +37,13 @@ julia> Pl(0.5, 3)
35
37
-0.4375
36
38
```
37
39
40
+
Evaluate the associated Legendre Polynomial one `l,m` pair as `Plm(x, l, m)`:
41
+
42
+
```jldoctest
43
+
julia> Plm(0.5, 3, 2)
44
+
5.625
45
+
```
46
+
38
47
Evaluate the `n`th derivative for one `l` as `dnPl(x, l, n)`:
0 commit comments