1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- //
- // Created by lloyd on 2020/9/28.
- //
- #ifndef GTCVR_GTCOMMONKITS_H
- #define GTCVR_GTCOMMONKITS_H
- #include <vector>
- class gtcommonkits {
- public:
- static std::vector<std::string> str_Split(std::string str, std::string pattern);
- static void saveTxt(std::string path, std::string aLineText);
- static std::string getTextFromTxt(std::string path);
- std::vector<std::vector<double>>
- BezierInterpolation(std::vector<std::vector<double>> &poss, int precision, int dimersion);
- /**
- * 峰值选取算法
- * @param data 离散点
- * @param StartPoint 开始点位
- * @param endPoint 结束点位
- * @param Weight 峰值点强度
- * @param EX 1:上峰值:-1下峰值
- * @return
- */
- std::vector<std::vector<double>>
- FindPeakValue(std::vector<std::vector<double>> data, int StartPoint, int endPoint, int Weight, int EX);
- /**
- * 离散度计算
- * 计算标准差
- * @param values 离散点
- * @return
- */
- double cStandardDeviation(std::vector<double> values);
- static std::vector<std::vector<double>> gt_trans_strtoarray(std::string sgt);
- static std::string gt_trans_arraytostr(std::vector<std::vector<double>> sgt);
- };
- #endif //GTCVR_GTCOMMONKITS_H
|