UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
s2_kin_trans.hpp
1 /* s2_kin_trans.hpp */
2 /* $Id: s2_kin_trans.hpp 21640 2012-06-09 13:05:14Z guser1 $ */
3 #ifndef __s2_kin_trans_hpp
4 #define __s2_kin_trans_hpp
5 
6 #ifdef GE_BUILD
7 #include <wave_field.hpp>
8 #include <least_squares_2d.hpp>
9 #else
10 #include <s2proc/wave_field.hpp>
11 #include <mth/least_squares_2d.hpp>
12 #endif
13 
14 namespace S2KinTrans
15 {
18  {
19  public:
20 
22  AbstractKinShift(bool dir = true) : m_dir(dir){};
23 
24  virtual ~AbstractKinShift(){};
25 
27  double operator()(double L) const {return calc(L);}
28 
30  void setDir(bool dir) {m_dir = dir;}
31 
33  bool getDir() const {return m_dir;}
34 
36  virtual double getHodPoint(double L) const = 0;
37 
38  protected:
39 
41  virtual double calc(double L) const = 0;
42 
43  bool m_dir;
44 
45  };
46 
49  {
50  public:
51 
53  HypKinShift(double t0, double p, bool dir = true);
54 
55  void setT0(double t0) {m_t0 = t0;}
56 
57  double getT0() {return m_t0;}
58 
59  void setP(double p) {m_p = p;}
60 
61  double getP() {return m_p;}
62 
64  virtual double getHodPoint(double L) const;
65 
66  void setLockedParams(double t0, double L);
67 
68  protected:
69 
70  double m_t0, m_p;
71 
73  virtual double calc(double L) const;
74 
75  private:
76 
77  HypKinShift();
78 
80  double m_locked_t0, m_locked_L;
81  };
82 
85  {
86  public:
87 
88  AVelKinShift(double t0, double v, bool dir = true);
89 
91  virtual double getHodPoint(double L) const;
92 
93  void setT0(double t0) {m_t0 = t0;}
94 
95  double getT0() {return m_t0;}
96 
97  void setVel(double v) {m_v = v;}
98 
99  double getVel() {return m_v;}
100 
101  void setLockedParams(double t0, double L);
102 
103  protected:
104 
105  double m_t0, m_v;
106 
108  virtual double calc(double L) const;
109 
110  private:
111 
112  AVelKinShift();
113 
115  double m_locked_t0, m_locked_L;
116  };
117 
120  {
121  public:
122 
123  VelKinShift(double t0, double v, double L0, bool dir = true);
124 
126  virtual double getHodPoint(double L) const;
127 
128  void setT0(double t0) {m_t0 = t0;}
129 
130  double getT0() {return m_t0;}
131 
132  void setL0(double L0) {m_L0 = L0;}
133 
134  double getL0() {return m_L0;}
135 
136  void setVel(double v) {m_v = v;}
137 
138  double getVel() {return m_v;}
139 
140  protected:
141 
142  double m_t0, m_v, m_L0;
143 
145  virtual double calc(double L) const;
146 
147  private:
148 
149  VelKinShift();
150  };
151 
154  {
155  public:
156 
157  PolyKinShift(const LeastSquares2D::PolyCoeffs &coeffs, bool dir = true);
158 
160  virtual double getHodPoint(double L) const;
161 
162  protected:
163 
166 
168  virtual double calc(double L) const;
169 
170  private:
171 
172  PolyKinShift();
173  };
174 
176  void transform(const AbstractKinShift &kin_shift, WaveField &field, bool offsets_from_coords = false);
177 };
178 
179 #endif /* s2_kin_trans.hpp */
LeastSquares2D::PolyCoeffs m_coeffs
Definition: s2_kin_trans.hpp:165
virtual double getHodPoint(double L) const
Definition: s2_kin_trans.hpp:153
Definition: s2_kin_trans.hpp:119
virtual double getHodPoint(double L) const
virtual double getHodPoint(double L) const
double operator()(double L) const
Definition: s2_kin_trans.hpp:27
Definition: wave_field.hpp:13
Definition: s2_kin_trans.hpp:17
Definition: s2_kin_trans.hpp:48
std::vector< PolyCoeff > PolyCoeffs
Definition: least_squares_2d.hpp:25
Definition: s2_kin_trans.hpp:84
bool getDir() const
Definition: s2_kin_trans.hpp:33
AbstractKinShift(bool dir=true)
Definition: s2_kin_trans.hpp:22
virtual double getHodPoint(double L) const
virtual double calc(double L) const
virtual double calc(double L) const
virtual double calc(double L) const
virtual double calc(double L) const
virtual double getHodPoint(double L) const =0
virtual double calc(double L) const =0
void setDir(bool dir)
Definition: s2_kin_trans.hpp:30