OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
lomb.h
Go to the documentation of this file.
1#ifndef __LOMB__
2#define __LOMB__
3/*****************************************************************************/
4/* */
5/* Class for Lomb Periodograms & Co. */
6/* ================================= */
7/* */
8/*****************************************************************************/
9#include <vector>
10#include <cmath>
11#include <functional>
12
13typedef struct {
14 double x, y;
15} LOMB_TYPE;
16
17typedef std::vector<LOMB_TYPE>::const_iterator CI_lt;
18typedef std::vector<double>::const_iterator CI_vd;
19
20class Lomb_eq {
21 double b;
22public:
23 explicit Lomb_eq(const double &a) : b(a) {}
24 bool operator()(const LOMB_TYPE &c) const {return c.y == b;}
25};
26
28private:
29
30public:
31
32 explicit LOMB_class(int); // constructor
33 virtual ~LOMB_class(void); //destructor
34
35 int period(std::vector<LOMB_TYPE> *indata, std::vector<LOMB_TYPE> *outdata,
36 double ofac, double hifac, int *nout, int *jmax, double *prob,
37 int amp);
38
39 int avevar(std::vector<LOMB_TYPE> *data, double *ave, double *var);
40 double signi(double *peak, int *nout, double *ofac);
41
42 int moment(std::vector<LOMB_TYPE> *indata, double *ave, double *adev,
43 double *sdev, double *var, double *skew, double *curt);
44
45
46};
47
48#endif
std::vector< double >::const_iterator CI_vd
Definition: lomb.h:18
std::vector< LOMB_TYPE >::const_iterator CI_lt
Definition: lomb.h:17
std::complex< double > a
constexpr double c
The velocity of light in m/s.
Definition: Physics.h:45
Definition: lomb.h:13
double x
Definition: lomb.h:14
Definition: lomb.h:20
double b
Definition: lomb.h:21
bool operator()(const LOMB_TYPE &c) const
Definition: lomb.h:24
Lomb_eq(const double &a)
Definition: lomb.h:23
virtual ~LOMB_class(void)
Definition: lomb.cpp:23
int avevar(std::vector< LOMB_TYPE > *data, double *ave, double *var)
Definition: lomb.cpp:175
LOMB_class(int)
Definition: lomb.cpp:14
double signi(double *peak, int *nout, double *ofac)
Definition: lomb.cpp:221
int moment(std::vector< LOMB_TYPE > *indata, double *ave, double *adev, double *sdev, double *var, double *skew, double *curt)
Definition: lomb.cpp:248
int period(std::vector< LOMB_TYPE > *indata, std::vector< LOMB_TYPE > *outdata, double ofac, double hifac, int *nout, int *jmax, double *prob, int amp)
Definition: lomb.cpp:34