"Fossies" - the Fresh Open Source Software Archive 
Member "harminv-1.4.2/harminv.h" (6 Feb 2023, 2821 Bytes) of package /linux/privat/harminv-1.4.2.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "harminv.h" see the
Fossies "Dox" file reference documentation and the latest
Fossies "Diffs" side-by-side code changes report:
1.4.1_vs_1.4.2.
1 /* Copyright (C) 2017 Massachusetts Institute of Technology.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 */
17
18 #ifndef HARMINV_H
19 #define HARMINV_H
20
21 /* the following need to be kept in sync with configure.ac: */
22 #define HARMINV_VERSION_MAJOR 1
23 #define HARMINV_VERSION_MINOR 4
24 #define HARMINV_VERSION_PATCH 1
25
26 /**************************************************************************/
27
28 #if defined(__cplusplus)
29 #include <complex>
30 extern "C" {
31 typedef std::complex<double> harminv_complex;
32
33 #elif defined(_Complex_I) && defined(complex) && defined(I)
34 /* C99 <complex.h> header was included before harminv.h */
35 typedef double _Complex harminv_complex;
36
37 #else
38 typedef double harminv_complex[2];
39 #endif
40
41 typedef struct harminv_data_struct *harminv_data;
42
43 /**************************************************************************/
44
45 typedef int (*harminv_mode_ok_func)(harminv_data d, int k, void *);
46
47 extern harminv_data harminv_data_create(int n, const harminv_complex *signal, double fmin,
48 double fmax, int nf);
49 extern void harminv_data_destroy(harminv_data d);
50
51 extern void harminv_solve(harminv_data d);
52
53 extern int harminv_get_num_freqs(harminv_data d);
54 extern double harminv_get_freq(harminv_data d, int k);
55 extern double harminv_get_Q(harminv_data d, int k);
56 extern double harminv_get_decay(harminv_data d, int k);
57 extern void harminv_get_omega(harminv_complex *omega, harminv_data d, int k);
58 extern void harminv_get_amplitude(harminv_complex *amplitude, harminv_data d, int k);
59 extern double harminv_get_freq_error(harminv_data d, int k);
60
61 /* the following routines are undocumented and not recommended */
62 extern void harminv_solve_once(harminv_data d);
63 extern void harminv_solve_again(harminv_data d, harminv_mode_ok_func ok, void *ok_d);
64 extern void harminv_solve_ok_modes(harminv_data d, harminv_mode_ok_func ok, void *ok_d);
65 extern double *harminv_compute_freq_errors(harminv_data d);
66 extern harminv_complex *harminv_compute_amplitudes(harminv_data d);
67
68 /**************************************************************************/
69
70 #ifdef __cplusplus
71 } /* extern "C" */
72 #endif
73
74 #endif /* HARMINV_H */