3 * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or (at
8 * your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 # define __BEGIN_DECLS extern "C" {
29 # define __END_DECLS }
31 # define __BEGIN_DECLS /* empty */
32 # define __END_DECLS /* empty */
38 struct gsl_dht_struct {
39 size_t size; /* size of the sample arrays to be transformed */
40 double nu; /* Bessel function order */
41 double xmax; /* the upper limit to the x-sampling domain */
42 double kmax; /* the upper limit to the k-sampling domain */
43 double * j; /* array of computed J_nu zeros, j_{nu,s} = j[s] */
44 double * Jjj; /* transform numerator, J_nu(j_i j_m / j_N) */
45 double * J2; /* transform denominator, J_{nu+1}^2(j_m) */
47 typedef struct gsl_dht_struct gsl_dht;
50 /* Create a new transform object for a given size
51 * sampling array on the domain [0, xmax].
53 gsl_dht * gsl_dht_alloc(size_t size);
54 gsl_dht * gsl_dht_new(size_t size, double nu, double xmax);
56 /* Recalculate a transform object for given values of nu, xmax.
57 * You cannot change the size of the object since the internal
58 * allocation is reused.
60 int gsl_dht_init(gsl_dht * t, double nu, double xmax);
62 /* The n'th computed x sample point for a given transform.
65 double gsl_dht_x_sample(const gsl_dht * t, int n);
68 /* The n'th computed k sample point for a given transform.
71 double gsl_dht_k_sample(const gsl_dht * t, int n);
74 /* Free a transform object.
76 void gsl_dht_free(gsl_dht * t);
79 /* Perform a transform on a sampled array.
80 * f_in[0] ... f_in[size-1] and similarly for f_out[]
82 int gsl_dht_apply(const gsl_dht * t, double * f_in, double * f_out);
87 #endif /* __GSL_DHT_H__ */