From c42c35dbb520e80fd2714b8fadfde2b7b48e00c0 Mon Sep 17 00:00:00 2001 From: Federico Lolli <federico.lolli@skywarder.eu> Date: Mon, 16 Oct 2023 17:46:29 +0200 Subject: [PATCH] [SFD] linted code --- src/shared/algorithms/SFD/SFDAscent.cpp | 4 ++-- src/shared/algorithms/SFD/SFDAscent.h | 2 +- src/shared/algorithms/SFD/SFDDescent.cpp | 4 ++-- src/shared/algorithms/SFD/SFDDescent.h | 2 +- src/shared/models/SVM.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/shared/algorithms/SFD/SFDAscent.cpp b/src/shared/algorithms/SFD/SFDAscent.cpp index 35b94568f..dfa644379 100644 --- a/src/shared/algorithms/SFD/SFDAscent.cpp +++ b/src/shared/algorithms/SFD/SFDAscent.cpp @@ -34,8 +34,8 @@ SFDAscent::SFDAscent(const SFDAConfig& config) : svm(config.modelParameters) {} SFDAscent::FeaturesVec SFDAscent::getFeatures(const VectorIn& input) { float delta, min, max, u, var, s2, m4, rfmean, rfvar; - VectorIn rfourier; - VectorIn data, x0 = VectorIn::Zero(); + VectorIn rfourier, x0; + VectorIn data = VectorIn::Zero(); FeaturesVec features = FeaturesVec::Zero(); min = input.minCoeff(); diff --git a/src/shared/algorithms/SFD/SFDAscent.h b/src/shared/algorithms/SFD/SFDAscent.h index 9640d0c8f..c714d5bae 100644 --- a/src/shared/algorithms/SFD/SFDAscent.h +++ b/src/shared/algorithms/SFD/SFDAscent.h @@ -46,7 +46,7 @@ public: SVMn::SVMConfig modelParameters; }; - SFDAscent(const SFDAConfig& config); + explicit SFDAscent(const SFDAConfig& config); bool classify(const VectorIn& input); diff --git a/src/shared/algorithms/SFD/SFDDescent.cpp b/src/shared/algorithms/SFD/SFDDescent.cpp index 7ea5283ac..b58e59960 100644 --- a/src/shared/algorithms/SFD/SFDDescent.cpp +++ b/src/shared/algorithms/SFD/SFDDescent.cpp @@ -34,8 +34,8 @@ SFDDescent::SFDDescent(const SFDDConfig& config) : svm(config.modelParameters) SFDDescent::FeaturesVec SFDDescent::getFeatures(const VectorIn& input) { float delta, min, max, u, s2, m3, m4, rms; - VectorIn rfourier; - VectorIn data, x0 = VectorIn::Zero(); + VectorIn rfourier, x0; + VectorIn data = VectorIn::Zero(); FeaturesVec features = FeaturesVec::Zero(); min = input.minCoeff(); diff --git a/src/shared/algorithms/SFD/SFDDescent.h b/src/shared/algorithms/SFD/SFDDescent.h index a0c332f4b..4df2ac03c 100644 --- a/src/shared/algorithms/SFD/SFDDescent.h +++ b/src/shared/algorithms/SFD/SFDDescent.h @@ -46,7 +46,7 @@ public: SVMn::SVMConfig modelParameters; }; - SFDDescent(const SFDDConfig& config); + explicit SFDDescent(const SFDDConfig& config); bool classify(const VectorIn& input); diff --git a/src/shared/models/SVM.h b/src/shared/models/SVM.h index 27594b3d6..0db4f7dc1 100644 --- a/src/shared/models/SVM.h +++ b/src/shared/models/SVM.h @@ -42,7 +42,7 @@ public: float scale; }; - SVM(const SVMConfig& config) + explicit SVM(const SVMConfig& config) : beta(config.beta), mu(config.mu), sigma(config.sigma), bias(config.bias), scale(config.scale) { -- GitLab