summaryrefslogtreecommitdiff
path: root/sccomp
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-03-12 09:39:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-03-12 17:44:30 +0100
commit8070e2f7c6db94e819c9bf9597b347cfbcf06be4 (patch)
tree5c60f0c543ea017ddc56489d256aad3531c494a6 /sccomp
parentf6cd2dd6c6ac69fc2f9baf1e072c4786774ef351 (diff)
Revert "loplugin:constfields in scaddins,sccomp"
This reverts commit 1ab27f9ae6f32c7502884c02c2217bbdcf035c48. Change-Id: Iaf9b011201ee763aaf4d08ceedd6074bafad1c3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90409 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sccomp')
-rw-r--r--sccomp/source/solver/DifferentialEvolution.hxx4
-rw-r--r--sccomp/source/solver/ParticelSwarmOptimization.hxx2
-rw-r--r--sccomp/source/solver/SwarmSolver.cxx4
3 files changed, 6 insertions, 4 deletions
diff --git a/sccomp/source/solver/DifferentialEvolution.hxx b/sccomp/source/solver/DifferentialEvolution.hxx
index a71af6d82fe7..7d18821350aa 100644
--- a/sccomp/source/solver/DifferentialEvolution.hxx
+++ b/sccomp/source/solver/DifferentialEvolution.hxx
@@ -29,12 +29,12 @@ template <typename DataProvider> class DifferentialEvolutionAlgorithm
DataProvider& mrDataProvider;
- size_t const mnPopulationSize;
+ size_t mnPopulationSize;
std::vector<Individual> maPopulation;
std::random_device maRandomDevice;
std::mt19937 maGenerator;
- size_t const mnDimensionality;
+ size_t mnDimensionality;
std::uniform_int_distribution<> maRandomPopulation;
std::uniform_int_distribution<> maRandomDimensionality;
diff --git a/sccomp/source/solver/ParticelSwarmOptimization.hxx b/sccomp/source/solver/ParticelSwarmOptimization.hxx
index 61eed529785d..ec76474ddece 100644
--- a/sccomp/source/solver/ParticelSwarmOptimization.hxx
+++ b/sccomp/source/solver/ParticelSwarmOptimization.hxx
@@ -49,7 +49,7 @@ private:
DataProvider& mrDataProvider;
- size_t const mnNumOfParticles;
+ size_t mnNumOfParticles;
std::vector<Particle> maSwarm;
diff --git a/sccomp/source/solver/SwarmSolver.cxx b/sccomp/source/solver/SwarmSolver.cxx
index dc310c64986e..0aa75b158c96 100644
--- a/sccomp/source/solver/SwarmSolver.cxx
+++ b/sccomp/source/solver/SwarmSolver.cxx
@@ -121,6 +121,7 @@ private:
// results
bool mbSuccess;
+ double mfResultValue;
uno::Sequence<double> maSolution;
OUString maStatus;
@@ -144,6 +145,7 @@ public:
, mnTimeout(60000)
, mnAlgorithm(0)
, mbSuccess(false)
+ , mfResultValue(0.0)
{
registerProperty("NonNegative", PROP_NONNEGATIVE, 0, &mbNonNegative,
cppu::UnoType<decltype(mbNonNegative)>::get());
@@ -215,7 +217,7 @@ public:
virtual void SAL_CALL setMaximize(sal_Bool bMaximize) override { mbMaximize = bMaximize; }
virtual sal_Bool SAL_CALL getSuccess() override { return mbSuccess; }
- virtual double SAL_CALL getResultValue() override { return 0; }
+ virtual double SAL_CALL getResultValue() override { return mfResultValue; }
virtual uno::Sequence<double> SAL_CALL getSolution() override { return maSolution; }