From 92b9deaf8d7c2a96c3977e1204341d6b6feb1fc1 Mon Sep 17 00:00:00 2001 From: Franz Zotter Date: Wed, 14 Jan 2009 10:58:32 +0000 Subject: renamed [mtx_sh] to [mtx_spherical_harmonics]. svn path=/trunk/externals/iem/iemmatrix/; revision=10549 --- src/mtx_spherical_harmonics/legendre_a.h | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/mtx_spherical_harmonics/legendre_a.h (limited to 'src/mtx_spherical_harmonics/legendre_a.h') diff --git a/src/mtx_spherical_harmonics/legendre_a.h b/src/mtx_spherical_harmonics/legendre_a.h new file mode 100644 index 0000000..f1d0229 --- /dev/null +++ b/src/mtx_spherical_harmonics/legendre_a.h @@ -0,0 +1,36 @@ +/* + + Evaluates all associated legendre functions + at the angles theta up to the order nmax + using the three-term recurrence of the Legendre functions. + P has dimensions length(theta) x (nmax+1)(nmax+2) + + Implementation by Franz Zotter, Institute of Electronic Music and Acoustics + (IEM), University of Music and Dramatic Arts (KUG), Graz, Austria + http://iem.at/Members/zotter, 2008. + + This code is published under the Gnu General Public License, see + "LICENSE.txt" + +*/ + + +#ifndef _legendre_a_h__ +#define _legendre_a_h__ +#include +#include + +typedef struct _LegendreWorkSpace_ +{ + size_t nmax; + size_t l; + double *p; +} LegendreWorkSpace; + +LegendreWorkSpace *legendre_a_alloc(const size_t nmax, const size_t l); + +void legendre_a_free(LegendreWorkSpace *wl); + +void legendre_a(double *theta, LegendreWorkSpace *wl); + +#endif -- cgit v1.2.1