aboutsummaryrefslogtreecommitdiff
path: root/src/mtx_sh/chebyshev12.h
diff options
context:
space:
mode:
authorFranz Zotter <fzotter@users.sourceforge.net>2009-01-12 17:09:13 +0000
committerFranz Zotter <fzotter@users.sourceforge.net>2009-01-12 17:09:13 +0000
commit55253e4e15b093a0826fc10b376f7724cea2ba7e (patch)
tree1e1c06129db9f86a12daddcf7c985d530d0872d9 /src/mtx_sh/chebyshev12.h
parentbacae787abd380690126e6adf82ab0cd19f5abec (diff)
added [mtx_sh] for spherical harmonics evaluation.
svn path=/trunk/externals/iem/iemmatrix/; revision=10515
Diffstat (limited to 'src/mtx_sh/chebyshev12.h')
-rw-r--r--src/mtx_sh/chebyshev12.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/mtx_sh/chebyshev12.h b/src/mtx_sh/chebyshev12.h
new file mode 100644
index 0000000..0da747a
--- /dev/null
+++ b/src/mtx_sh/chebyshev12.h
@@ -0,0 +1,36 @@
+/*
+ Evaluates all circular harmonics
+ at the angles phi up to the order nmax.
+ using the recurrence for the Chebyshev
+ polynomials of the first and second kind
+ T has the dimensions length(phi) x 2nmax+1
+
+ 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 _chebyshev12_h__
+#define _chebyshev12_h__
+#include <math.h>
+#include <stdlib.h>
+
+typedef struct _Cheby12WorkSpace_
+{
+ size_t nmax;
+ size_t l;
+ double *t;
+} Cheby12WorkSpace;
+
+Cheby12WorkSpace *chebyshev12_alloc(const size_t nmax, const size_t l);
+
+void chebyshev12_free(Cheby12WorkSpace *wc);
+
+void chebyshev12(double *phi, Cheby12WorkSpace *wc);
+
+#endif
+
+