#pragma once // add mix_cc ihdb module to deal with ihyperDB #include "mix_cc/utility/ihyper_db/ihyper_db.h" #include // change done #include #include #include #include #include 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 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 m_sample_tags; // tag_name -> sample mix_cc::IhdCom hd_com; };