version  0.0.1
Defines the C++ API for MsPASS
dpss.h
1 #ifndef __DPSS_H__
2 #define __DPSS_H__
3 #include <cmath>
4 #include <string.h>
5 namespace mspass::algorithms::deconvolution{
6 
7 //Error classes for LAPACK, and a general error
8 class ERR {
9 public:
10  ERR() {};
11  ERR(const char *msg);
12  void getmsg(char *errmsg);
13  const char *getmsg();
14 protected:
15  char msg[30];
16 };
17 
18 class LAPACK_ERROR : public ERR {
19 public:
20  LAPACK_ERROR() {};
21  LAPACK_ERROR(const char *errmsg);
22 };
23 
24 void compute_energy_concentrations(double *h, int n, double NW, double *lambda, int nseq);
25 
26 void eig_iit(int n, double *D, double *E, int il, int iu, double *eig_val, double *eig_vec, int vec_length);
27 
28 //normalizes a vector h
29 void normalize_vec(double *h, int n);
30 
31 //polarizes the sequences
32 void polarize_dpss(double *h, int n, int iseq);
33 
34 //Reduces the problem using simple even/odd splitting (exploiting double symmetry)
35 void dpss_calc(int n, double NW, int seql, int sequ, double *h);
36 }
37 #endif