Cleaned 66 files across all eqpalg subdirectories: - Removed commented-out dead code - Removed redundant Chinese inline comments that restate variable/function names - Removed trailing ///< annotations on self-explanatory fields - Removed namespace closing comments - Preserved all file headers, Doxygen documentation, and logic explanations - No code changes — only comment removal
66 lines
2.0 KiB
C++
66 lines
2.0 KiB
C++
#include <eqpalg/algs/roller2.h>
|
|
#include <eqpalg/algs/trend_slope2.h>
|
|
#include <eqpalg/build_algorithm.h>
|
|
// for default case
|
|
#include <eqpalg/algs/exp_base.h>
|
|
#include <eqpalg/algs/exp_bound.h>
|
|
#include <eqpalg/algs/exp_sample2D.h>
|
|
#include <eqpalg/algs/exp_times.h>
|
|
#include <eqpalg/algs/fault_code.h>
|
|
#include <eqpalg/algs/glitch_detection.h>
|
|
#include <eqpalg/algs/null.h>
|
|
#include <eqpalg/algs/roller3.h>
|
|
#include <eqpalg/algs/trend_slope3.h>
|
|
std::unique_ptr<AlgBase> build_algorithm(int algId, const string &ruleId,
|
|
const string &name,
|
|
const mix_cc::json &rule_json,
|
|
const double padding_low,
|
|
const double padding_up) {
|
|
LOG d("build_algorithm");
|
|
switch (algId) {
|
|
case 1:
|
|
case 2:
|
|
case 3:
|
|
case 4:
|
|
case 5:
|
|
return std::make_unique<ExpBase>(name, rule_json, ruleId, algId);
|
|
break;
|
|
case 6:
|
|
case 7:
|
|
return std::make_unique<ExpTimes>(name, rule_json, ruleId, algId);
|
|
break;
|
|
case 8:
|
|
return std::make_unique<TrendSlope2>(name, rule_json, ruleId);
|
|
break;
|
|
case 9:
|
|
return std::make_unique<Roller2>(name, rule_json, ruleId, -1);
|
|
break;
|
|
case 10:
|
|
case 11:
|
|
return std::make_unique<FaultCode>(name, rule_json, ruleId, algId - 10);
|
|
break;
|
|
case 12:
|
|
case 13:
|
|
return std::make_unique<ExpSample2D>(name, rule_json, ruleId, algId);
|
|
break;
|
|
case 14:
|
|
return std::make_unique<TrendSlope3>(name, rule_json, ruleId);
|
|
break;
|
|
case 15:
|
|
return std::make_unique<GlitchDetection>(name, rule_json, ruleId);
|
|
break;
|
|
case 16:
|
|
case 18:
|
|
return std::make_unique<Roller3>(name, rule_json, ruleId, algId);
|
|
break;
|
|
case 17:
|
|
return std::make_unique<ExpBound>(name, rule_json, ruleId, algId);
|
|
break;
|
|
default:
|
|
d.Warn() << "undefined algorithm" << endl;
|
|
return std::make_unique<Null>(name, rule_json, ruleId);
|
|
}
|
|
d.Warn() << "out of control flow" << endl;
|
|
return std::make_unique<Null>(name, rule_json, ruleId);
|
|
}
|