UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
s2_poly_wave_approx.hpp
1 /* s2_poly_wave_approx.hpp */
2 /* $Id: s2_poly_wave_approx.hpp 21022 2011-07-11 11:45:03Z urij $ */
3 #ifndef __s2_poly_wave_approx_hpp
4 #define __s2_poly_wave_approx_hpp
5 
6 #include <s2proc/wave_field.hpp>
7 #include <s2proc/s2_corr.hpp>
8 #include <mth/least_squares_2d.hpp>
9 
10 #include <utility>
11 
15 {
16 public:
17 
19  struct Params
20  {
21  double twin_start;
22  double twin_len;
23  double dt;
24  size_t pdeg;
25  size_t tbnum;
27  void info() const
28  {
29  printf("S2PolyWaveApprox::Params: win(%g..%g), dt=%g, pdeg=%zu, tbnum=%zu\n",
31  }
32  };
33 
35  typedef std::pair<double, double> Node;
36 
38  S2PolyWaveApprox(const S2PolyWaveApprox::Params &params) : m_params(params) {};
39 
41  virtual ~S2PolyWaveApprox() {};
42 
44  LeastSquares2D::PolyCoeffs operator() (const WaveField &field) const {return calc_poly(field);}
45 
48 
50  LeastSquares2D::PolyCoeffs calc_poly(const std::vector<S2PolyWaveApprox::Node>& nodes) const;
51 
53  virtual std::vector<S2PolyWaveApprox::Node> calc_nodes(const WaveField &field) const;
54 
56  void setParams(const S2PolyWaveApprox::Params &params) {m_params = params;};
57 
59  const S2PolyWaveApprox::Params& getParams() const {return m_params;}
60 
61 protected:
62 
65 
66 private:
67 
68 };
69 
70 #endif /* s2_poly_wave_approx.hpp */
Params m_params
Definition: s2_poly_wave_approx.hpp:64
const S2PolyWaveApprox::Params & getParams() const
Definition: s2_poly_wave_approx.hpp:59
double dt
Definition: s2_poly_wave_approx.hpp:23
std::pair< double, double > Node
Definition: s2_poly_wave_approx.hpp:35
S2PolyWaveApprox(const S2PolyWaveApprox::Params &params)
Definition: s2_poly_wave_approx.hpp:38
Definition: s2_poly_wave_approx.hpp:19
void setParams(const S2PolyWaveApprox::Params &params)
Definition: s2_poly_wave_approx.hpp:56
double twin_len
Definition: s2_poly_wave_approx.hpp:22
Definition: wave_field.hpp:13
LeastSquares2D::PolyCoeffs calc_poly(const WaveField &field) const
double twin_start
Definition: s2_poly_wave_approx.hpp:21
std::vector< PolyCoeff > PolyCoeffs
Definition: least_squares_2d.hpp:25
LeastSquares2D::PolyCoeffs operator()(const WaveField &field) const
Definition: s2_poly_wave_approx.hpp:44
size_t pdeg
Definition: s2_poly_wave_approx.hpp:24
size_t tbnum
Definition: s2_poly_wave_approx.hpp:25
virtual ~S2PolyWaveApprox()
Definition: s2_poly_wave_approx.hpp:41
Definition: s2_poly_wave_approx.hpp:14
virtual std::vector< S2PolyWaveApprox::Node > calc_nodes(const WaveField &field) const