summaryrefslogtreecommitdiff
path: root/nlpsolver
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-18 15:20:11 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-11-25 06:06:48 +0000
commit58eab57648e222e5a3e488087afd44eea6efd591 (patch)
tree190af535c3871f3931a3b29dea55493751a01d03 /nlpsolver
parent1658c017a27ac2cccb2af89f88a4cde8ffdbe531 (diff)
java: final fields that can be static
found by PMD Change-Id: I2b48f35d252d6e914c2a18a2c175b075a9d3ac0f Reviewed-on: https://gerrit.libreoffice.org/13099 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'nlpsolver')
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java2
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java2
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator.java12
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java4
4 files changed, 10 insertions, 10 deletions
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java
index c40f2c1ec258..b6387bfb8a96 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java
@@ -35,7 +35,7 @@ import net.adaptivebox.problem.*;
import net.adaptivebox.space.*;
public class DEGTBehavior extends AbsGTBehavior implements ILibEngine {
- private final int DVNum = 2; //Number of differential vectors, normally be 1 or 2
+ private static final int DVNum = 2; //Number of differential vectors, normally be 1 or 2
public double FACTOR = 0.5; //scale constant: (0, 1.2], normally be 0.5
public double CR = 0.9; //crossover constant: [0, 1], normally be 0.1 or 0.9
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java
index 1ad1adefd08c..823479de556a 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java
@@ -25,7 +25,7 @@ import net.adaptivebox.global.*;
public class EvalElement {
//The weight for each response (target)
- private final double weight = 1;
+ private static final double weight = 1;
/**
* The expected range of the response value, forms the following objective:
*
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator.java
index 2d9f55fc2ac4..6b4fd614330c 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator.java
@@ -39,15 +39,15 @@ public class ACRComparator implements IGoodnessCompareEngine, IUpdateCycleEngine
private final Library socialPool;
private double epsilon_t = 0;
- private final double RU = 0.75;
- private final double RL = 0.25;
- private final double BETAF = 0.618;
- private final double BETAL = 0.618;
- private final double BETAU = 1.382;
+ private static final double RU = 0.75;
+ private static final double RL = 0.25;
+ private static final double BETAF = 0.618;
+ private static final double BETAL = 0.618;
+ private static final double BETAU = 1.382;
private final double T;
- private final double TthR = 0.5;
+ private static final double TthR = 0.5;
public ACRComparator(Library lib, int T) {
socialPool = lib;
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java
index b473ae0a3807..882613d2e8c3 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java
@@ -48,9 +48,9 @@ public class SCAgent {
private IGoodnessCompareEngine specComparator;
//the coefficients of SCAgent
- private final int TaoB = 2;
+ private static final int TaoB = 2;
//The early version set TaoW as the size of external library (NL), but 4 is often enough
- private final int TaoW = 4;
+ private static final int TaoW = 4;
//The referred external library
private Library externalLib;