3 #ifndef __polycor_math_old_hpp
4 #define __polycor_math_old_hpp
6 #include <s2proc/udb_seis.hpp>
7 #include <s2proc/wave_field.hpp>
8 #include <s2proc/PolyMatrix_old.hpp>
21 std::pair<int, int> m_TRS1;
22 std::pair<int, int> m_TRS2;
36 std::pair<int, int> NSP_PAIR1;
37 std::pair<int, int> NSP_PAIR2;
44 typedef std::vector<Polycor::CCF_sample> CCF_Ar;
45 typedef std::vector<Polycor::CCF2_shift> SHIFT_Ar;
47 typedef std::vector<std::vector<double> > Coeff_Matrix;
55 if (shifts.size() < 1)
64 for (
size_t i=0; i<shifts.size(); i++)
66 m_mean += shifts[i]* shifts[i];
68 m_mean /= shifts.size();
72 for (
size_t i=0; i<shifts.size(); ++i)
74 m_d += (shifts[i]*shifts[i] - m_mean) * (shifts[i]*shifts[i] - m_mean);
79 double operator()()
const {
return m_d;}
81 double operator()(
const double& t)
const
83 return fabs(t*t - m_mean);
93 typedef std::vector<std::pair<std::pair<int, int >,
double> > StaticRow;
96 bool WfCorrelator(
WaveField &wf1,
WaveField &wf2,
WaveField &ccf_wf,
float start_time,
float time_width,
float ccf_length,
bool norma);
99 bool TransformCCF(
const WaveField &wf,
TrHeader *headers, Polycor::CCF_Ar &CcfAr);
103 bool summ_CCF1_rows(CCF_Ar &Base_row, CCF_Ar &add_row,
CCF2_shift &CCF2,
const float &intersect_ratio,
const float *l_range,
const float &max_shift);
106 bool get_CCF_max(
const Trace &trs,
float &time,
float &max_value);
110 bool get_CCF2_wave(
const SHIFT_Ar &TMP_CCF2_ROW,
Trace &ccf2_trs);
114 bool compose_summ_row(CCF_Ar &first_row,
const CCF_Ar &second_row,
float &time_shift, CCF_Ar &summ_row);
118 bool form_Matrix(SHIFT_Ar &cur_shift_ar,
119 std::vector<std::pair<int ,int> > &X_i,
120 Coeff_Matrix &coef_mat,
121 std::vector<double> &result);
123 bool gauss_Prepare(Coeff_Matrix &coef_mat, std::vector<double> &result);
141 bool SetMatrixElement(
size_t i,
size_t j,
double& val);
142 bool SetVectorElement(
size_t i,
double& val);
145 size_t GetPointsCount(std::vector<int> &ID_num);
150 std::set<int> m_RP_set;
151 std::vector<Polycor::CCF_Ar>* m_CCF1_base;
168 PolyMatrixSP(std::vector<Polycor::SHIFT_Ar> &CCF2_base);
171 bool SetMatrixElement(
size_t i,
size_t j,
double& val);
172 bool SetVectorElement(
size_t i,
double& val);
175 size_t GetPointsCount(std::vector<int> &ID_num);
180 std::set<int> m_SP_set;
181 std::vector<Polycor::SHIFT_Ar>* m_CCF2_base;
Definition: polycor_math_old.hpp:164
Definition: polycor_math_old.hpp:134
Definition: polycor_math_old.hpp:19
Definition: wave_field.hpp:13
Definition: PolyMatrix_old.hpp:22
Definition: polycor_math_old.hpp:49
Definition: polycor_math_old.hpp:34