JuliaApproximation / ClassicalOrthogonalPolynomials.jl

A Julia package for classical orthogonal polynomials and expansions
MIT License
38 stars 6 forks source link

Add roots #59

Open dlfivefifty opened 3 years ago

dlfivefifty commented 3 years ago

We can port the code

https://github.com/JuliaApproximation/ApproxFunOrthogonalPolynomials.jl/blob/master/src/roots.jl

I think call it findall(iszero,f).

yewalenikhil65 commented 2 years ago

@dlfivefifty i can help with roots for hermite, legendre, lagaurre polynomials of degree N. Shall i start creating a PR if these roots are welcome ?

dlfivefifty commented 2 years ago

I think we already have it in FastGaussQuadrature.jl

dlfivefifty commented 2 years ago

I think we already have it in FastGaussQuadrature.jl

yewalenikhil65 commented 2 years ago

@dlfivefifty Sorry , i didn't knew that ! The way i was proposing to find roots was based on finding eigen values of tridiagonal jacobi matrices(that's the general way i guess). And i saw codes for jacobi matrices residing in ClassicalOrthogonalPolynomials.jl , so thought this must be the right place

dlfivefifty commented 2 years ago

They use more sophisticated asymptotics which get O(n) complexity

dlfivefifty commented 2 years ago

We could provide an interface to those routines. Say support findall(iszero, Legendre()[:,5])