60 lines
1.2 KiB
C++
60 lines
1.2 KiB
C++
|
|
#pragma once
|
|
// add mix_cc ihdb module to deal with ihyperDB
|
|
#include "mix_cc/utility/ihyper_db/ihyper_db.h"
|
|
#include <eqpalg/stat/PolyfitStat.h>
|
|
|
|
|
|
// change done
|
|
|
|
#include <eqpalg/AlgCommonDefine.h>
|
|
#include <eqpalg/algs/AlgExp.h>
|
|
#include <iomanip>
|
|
#include <iostream>
|
|
#include <string>
|
|
|
|
class AlgExpPolyFit : virtual public AlgExp {
|
|
public:
|
|
AlgExpPolyFit(const string &name, const Json::Value &rulejson,
|
|
const string &ruleid, IHDBTools *ihdb);
|
|
|
|
virtual ~AlgExpPolyFit();
|
|
|
|
public:
|
|
virtual int Reload();
|
|
virtual int calculate(string &outjson);
|
|
|
|
private:
|
|
int calculate_once(string &outjson, HD3Record *hdRec);
|
|
|
|
// int GetHDTrend(const string &tag);
|
|
|
|
private:
|
|
MathExpression *mp_expact;
|
|
|
|
int max_sample_count_; //
|
|
|
|
double full_tag_level_;
|
|
|
|
int level_count_;
|
|
|
|
// using sample data to storage data from ihdb
|
|
|
|
std::unique_ptr<PolyfitStat> poly_fit_stat_;
|
|
// delete
|
|
|
|
std::string sample_tag_x_str_;
|
|
std::string sample_tag_y_str_;
|
|
std::string sample_tag_level_str_;
|
|
|
|
// SampleTrendAnalysis sample_tag_x_trend_;
|
|
// SampleTrendAnalysis sample_tag_y_trend_;
|
|
|
|
std::map<string,SampleTrendAnalysis> m_sample_tags; // tag_name -> sample
|
|
|
|
mix_cc::IhdCom hd_com;
|
|
|
|
|
|
|
|
};
|