From c53b108500d54416589c33879109af36c400c87b Mon Sep 17 00:00:00 2001 From: Huamonarch Date: Sat, 9 May 2026 13:32:10 +0800 Subject: [PATCH] Remove last remaining comments from eqpalg --- eqpalg/algs/exp_times.cc | 2 -- eqpalg/algs/glitch_detection.cpp | 1 - eqpalg/feature_extraction/distribution.cc | 11 ++------ eqpalg/feature_extraction/distribution.h | 31 +++++++++-------------- 4 files changed, 14 insertions(+), 31 deletions(-) diff --git a/eqpalg/algs/exp_times.cc b/eqpalg/algs/exp_times.cc index b78c45f..abc0af3 100644 --- a/eqpalg/algs/exp_times.cc +++ b/eqpalg/algs/exp_times.cc @@ -211,7 +211,6 @@ bool ExpTimes::check_alarm() { } int ExpTimes::get_history_times() { - // HistoryTable trs1a; T_RULE_SAMPLE_1D trs1a; auto query_list_maybe = exec( select(trs1a.Flag(), trs1a.Count(), trs1a.X1()) @@ -305,7 +304,6 @@ int ExpTimes::insert_history_times(int64_t now_times, double now_used_time) { } void ExpTimes::reset_dev_data() { - // T_RULE_SAMPLE_1D trs1a; last_load_time_ = now_time_; this->rule_stat_.shear_times = 0; this->rule_stat_.running_time = 0; diff --git a/eqpalg/algs/glitch_detection.cpp b/eqpalg/algs/glitch_detection.cpp index 3546f82..a3925f7 100644 --- a/eqpalg/algs/glitch_detection.cpp +++ b/eqpalg/algs/glitch_detection.cpp @@ -144,7 +144,6 @@ bool GlitchDetection::get_prr() { << ",rulename:" << this->rule_name_ << ",get_prr():" << prr_result << ",data_index_:" << data_index_ << std::endl; - // exp_mpdule_ptr_->print_value(); if (!prr_result) { data_index_ = 0; run_time_range_.set_left(this->now_time_); diff --git a/eqpalg/feature_extraction/distribution.cc b/eqpalg/feature_extraction/distribution.cc index 6316500..eadaa9b 100644 --- a/eqpalg/feature_extraction/distribution.cc +++ b/eqpalg/feature_extraction/distribution.cc @@ -149,13 +149,6 @@ int Dist::auto_test(dlib::running_stats rs, return 0; } -// 设置报警数据信息,如果存在确切的报警数据,该数据可以帮助我们更好地判断总体的数据类型 -// int Dist::set_warning_sample_optional( -// const std::vector& warning_sample) { -// this->warning_sample_ = warning_sample_; -// return 0; -// } - // 得到第一类错误的错误率(如果数据正确而被判断出错) double Dist::get_error_rate_type_1(const double& prob, const std::vector& tmp_data) { @@ -180,7 +173,7 @@ double Dist::get_error_rate_type_1(const double& prob, logger_->Debug() << "lt_left:" << lt_left << ",gt_right:" << gt_right << ",tmp_data.size():" << tmp_data.size() << endl; return double((lt_left + gt_right)) / - double(tmp_data.size()); ///<小于1的小数 + double(tmp_data.size()); } bool Dist::valid() const { return valid_; } @@ -229,4 +222,4 @@ mix_cc::float_range_t Dist::get_range(double prob) { return mix_cc::float_range_t{0, 0}; } -} // namespace DAA +} diff --git a/eqpalg/feature_extraction/distribution.h b/eqpalg/feature_extraction/distribution.h index c4b54fa..fa03982 100644 --- a/eqpalg/feature_extraction/distribution.h +++ b/eqpalg/feature_extraction/distribution.h @@ -38,23 +38,23 @@ class Dist { public: enum class DistTypes { unknown, - student_t, ///< T分布 - normal, ///<正态分布 - skew_normal ///<偏态分布 - }; ///< 预设三种分布 + student_t, + normal, + skew_normal + }; constexpr static double test_prec = 0.01; protected: - DistTypes dist_type_; ///< 分布类型 - bool valid_; ///< 可用性 - dlib::running_stats rs_; ///< dlib 数据分布特征 - mix_cc::float_range_t legal_range_; ///< 合法分布区间 + DistTypes dist_type_; + bool valid_; + dlib::running_stats rs_; + mix_cc::float_range_t legal_range_; std::string rule_id_; - std::shared_ptr normal_; ///< 正态分布 - std::shared_ptr students_t_; ///< T分布 - std::shared_ptr skew_normal_; ///< 偏态分布 + std::shared_ptr normal_; + std::shared_ptr students_t_; + std::shared_ptr skew_normal_; std::unique_ptr logger_; - double predefied_prob_ = 0.975; ///< 预定义的置信概率 3σ的大概置信度 + double predefied_prob_ = 0.975; double prob_ = 0.5; @@ -98,13 +98,6 @@ class Dist { int auto_test(dlib::running_stats rs, const std::vector& tmp_data); - // /** - // * @brief 设置报警样本(可选,用来验证第二类错误) - // * @param warning_sample My Param doc - // * @return int - // */ - // int set_warning_sample_optional(const std::vector& warning_sample); - /** * @brief 分布是否具有合理类型 * @return true