33 lines
790 B
C++
33 lines
790 B
C++
/**
|
|
* @file data_process_function.h
|
|
* @brief 拟合函数
|
|
* FitterLeastSquareMethod 多项式拟合
|
|
* log_fit log函数拟合
|
|
* @author your name (you@domain.com)
|
|
* @version 0.1
|
|
* @date 2023-12-22
|
|
*
|
|
* Copyright: Baosight Co. Ltd.
|
|
* DO NOT COPY/USE WITHOUT PERMISSION
|
|
*
|
|
*/
|
|
#ifndef _DATA_PROCESS_H_
|
|
#define _DATA_PROCESS_H_
|
|
#include <eigen3/Eigen/Dense>
|
|
#include <vector>
|
|
|
|
/**
|
|
* 1.多项式拟合
|
|
* 2.log线性拟合 a*lnx+b b = result[0],a=result[1]
|
|
* 3.单增提取
|
|
*/
|
|
namespace DataProcessFun {
|
|
using std::vector;
|
|
|
|
Eigen::VectorXd FitterLeastSquareMethod(vector<double>& X, vector<double>& Y,
|
|
size_t orders);
|
|
Eigen::VectorXd log_fit(vector<double>& X, vector<double>& Y);
|
|
} // namespace DataProcessFun
|
|
|
|
#endif //_DATA_PROCESS_H_
|