style: run clang-format and configure pre-commit hooks

This commit is contained in:
AI-anonymous
2026-05-20 00:18:23 +02:00
parent 041eab7155
commit 3b15770437
28 changed files with 2226 additions and 2061 deletions

View File

@@ -11,21 +11,22 @@ namespace fces {
class OscillationDetector {
public:
static constexpr int WINDOW_SIZE = 64;
static constexpr float POWER_THRESHOLD = 0.5f;
static constexpr int MIN_PERIOD = 4;
static constexpr int MAX_PERIOD = 16;
static constexpr int WINDOW_SIZE = 64;
static constexpr float POWER_THRESHOLD = 0.5f;
static constexpr int MIN_PERIOD = 4;
static constexpr int MAX_PERIOD = 16;
void update(float loss);
bool detect() const;
float get_score() const;
float get_variance_50() const;
void reset();
void update(float loss);
bool detect() const;
float get_score() const;
float get_variance_50() const;
void reset();
private:
std::vector<float> loss_history_;
static std::vector<float> detrend(const std::vector<float>& signal);
static std::vector<float> compute_power_spectrum(const std::vector<float>& signal);
std::vector<float> loss_history_;
static std::vector<float> detrend(const std::vector<float> &signal);
static std::vector<float>
compute_power_spectrum(const std::vector<float> &signal);
};
} // namespace fces
} // namespace fces