[Libreoffice-commits] core.git: nlpsolver/ThirdParty

Todor Balabanov (via logerrit) logerrit at kemper.freedesktop.org
Fri May 10 06:50:14 UTC 2019


 nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java              |   12 +++++---
 nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/AbsGTBehavior.java |    7 ++---
 nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java  |   12 +++++---
 nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/PSGTBehavior.java  |   10 ++++---
 nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java          |    2 -
 nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator.java      |    5 +--
 nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library.java           |    7 ++---
 nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/SearchPoint.java       |    7 ++---
 nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java      |   14 ++++------
 nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java                 |   13 +++++----
 nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignDim.java             |    6 +---
 11 files changed, 50 insertions(+), 45 deletions(-)

New commits:
commit 7aeef2e88b0a74be6670f13536281bbaecfa568f
Author:     Todor Balabanov <todor.balabanov at gmail.com>
AuthorDate: Wed May 8 14:34:10 2019 +0300
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Fri May 10 08:49:42 2019 +0200

    Import of each class is better practice than import of entire library.
    
    Change-Id: I13c4916b951d36ea5e83e52c9c6e36df552bdfeb
    Reviewed-on: https://gerrit.libreoffice.org/71961
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java
index 58b7e5e60c31..50ab8fd8c8f0 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java
@@ -32,11 +32,15 @@ package net.adaptivebox.deps;
  *     -> an agent perspective
  */
 
-import net.adaptivebox.deps.behavior.*;
+import net.adaptivebox.deps.behavior.AbsGTBehavior;
+import net.adaptivebox.deps.behavior.DEGTBehavior;
+import net.adaptivebox.deps.behavior.PSGTBehavior;
 import net.adaptivebox.goodness.IGoodnessCompareEngine;
-import net.adaptivebox.knowledge.*;
-import net.adaptivebox.problem.*;
-import net.adaptivebox.space.*;
+import net.adaptivebox.knowledge.ILibEngine;
+import net.adaptivebox.knowledge.Library;
+import net.adaptivebox.knowledge.SearchPoint;
+import net.adaptivebox.problem.ProblemEncoder;
+import net.adaptivebox.space.BasicPoint;
 
 public class DEPSAgent implements ILibEngine {
 
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/AbsGTBehavior.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/AbsGTBehavior.java
index 60f438cc637c..3e556719bfdb 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/AbsGTBehavior.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/AbsGTBehavior.java
@@ -17,9 +17,10 @@
  */
 package net.adaptivebox.deps.behavior;
 
-import net.adaptivebox.goodness.*;
-import net.adaptivebox.knowledge.*;
-import net.adaptivebox.problem.*;
+import net.adaptivebox.goodness.IGoodnessCompareEngine;
+import net.adaptivebox.knowledge.Library;
+import net.adaptivebox.knowledge.SearchPoint;
+import net.adaptivebox.problem.ProblemEncoder;
 
 abstract public class AbsGTBehavior {
   //The referred social library
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 e5677818c0ef..a58a66196372 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java
@@ -28,11 +28,13 @@
 
 package net.adaptivebox.deps.behavior;
 
-import net.adaptivebox.goodness.*;
-import net.adaptivebox.global.*;
-import net.adaptivebox.knowledge.*;
-import net.adaptivebox.problem.*;
-import net.adaptivebox.space.*;
+import net.adaptivebox.global.RandomGenerator;
+import net.adaptivebox.goodness.IGoodnessCompareEngine;
+import net.adaptivebox.knowledge.ILibEngine;
+import net.adaptivebox.knowledge.Library;
+import net.adaptivebox.knowledge.SearchPoint;
+import net.adaptivebox.problem.ProblemEncoder;
+import net.adaptivebox.space.BasicPoint;
 
 public class DEGTBehavior extends AbsGTBehavior implements ILibEngine {
   private static final int DVNum = 2;  //Number of differential vectors, normally be 1 or 2
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/PSGTBehavior.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/PSGTBehavior.java
index 546e9dd486a9..a946b2301f9e 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/PSGTBehavior.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/PSGTBehavior.java
@@ -55,10 +55,12 @@
 
 package net.adaptivebox.deps.behavior;
 
-import net.adaptivebox.goodness.*;
-import net.adaptivebox.knowledge.*;
-import net.adaptivebox.problem.*;
-import net.adaptivebox.space.*;
+import net.adaptivebox.goodness.IGoodnessCompareEngine;
+import net.adaptivebox.knowledge.Library;
+import net.adaptivebox.knowledge.SearchPoint;
+import net.adaptivebox.problem.ProblemEncoder;
+import net.adaptivebox.space.BasicPoint;
+import net.adaptivebox.space.DesignSpace;
 
 public class PSGTBehavior extends AbsGTBehavior {
   // Two normally choices for (c1, c2, weight), i.e., (2, 2, 0.4), or (1.494, 1.494, 0.729)
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java
index c09491be6046..d3ffc25d323d 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java
@@ -20,7 +20,7 @@
 
 package net.adaptivebox.encode;
 
-import net.adaptivebox.global.*;
+import net.adaptivebox.global.BasicBound;
 
 public class EvalElement {
 
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator.java
index e529d33ba9c0..8e319d5dfa6a 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator.java
@@ -31,9 +31,8 @@
 
 package net.adaptivebox.goodness;
 
-import net.adaptivebox.knowledge.*;
-import net.adaptivebox.global.*;
-
+import net.adaptivebox.global.IUpdateCycleEngine;
+import net.adaptivebox.knowledge.Library;
 
 public class ACRComparator implements IGoodnessCompareEngine, IUpdateCycleEngine {
   private final Library socialPool;
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library.java
index cca7f0d4a069..3a0f82659295 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library.java
@@ -24,9 +24,10 @@
  */
 package net.adaptivebox.knowledge;
 
-import net.adaptivebox.global.*;
-import net.adaptivebox.goodness.*;
-import net.adaptivebox.problem.*;
+import net.adaptivebox.global.BasicBound;
+import net.adaptivebox.global.RandomGenerator;
+import net.adaptivebox.goodness.IGoodnessCompareEngine;
+import net.adaptivebox.problem.ProblemEncoder;
 
 public class Library {
   private final SearchPoint[] libPoints;
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/SearchPoint.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/SearchPoint.java
index dbd472f043e3..b1b96163465f 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/SearchPoint.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/SearchPoint.java
@@ -19,9 +19,9 @@
  */
 package net.adaptivebox.knowledge;
 
-import net.adaptivebox.global.*;
-import net.adaptivebox.space.*;
-import net.adaptivebox.encode.*;
+import net.adaptivebox.encode.IEncodeEngine;
+import net.adaptivebox.global.BasicBound;
+import net.adaptivebox.space.BasicPoint;
 
 public class SearchPoint extends BasicPoint implements IEncodeEngine {
   //store the encode information for goodness evaluation
@@ -68,5 +68,4 @@ public class SearchPoint extends BasicPoint implements IEncodeEngine {
       return encodeInfo[0] == 0; //no constraint violations
   }
 
-
 }
\ No newline at end of file
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java
index bc5c20f87a55..58b7ab4c907d 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java
@@ -26,10 +26,12 @@
 
 package net.adaptivebox.problem;
 
-import net.adaptivebox.global.*;
-import net.adaptivebox.space.*;
-import net.adaptivebox.encode.*;
-import net.adaptivebox.knowledge.*;
+import net.adaptivebox.encode.EvalElement;
+import net.adaptivebox.encode.EvalStruct;
+import net.adaptivebox.global.BasicBound;
+import net.adaptivebox.knowledge.SearchPoint;
+import net.adaptivebox.space.DesignDim;
+import net.adaptivebox.space.DesignSpace;
 
 public abstract class ProblemEncoder {
   //Store the calculated results for the responses
@@ -61,8 +63,6 @@ public abstract class ProblemEncoder {
     designSpace.setElemAt(dd, i);
   }
 
-
-
   //set the default information for evaluation each response
   protected void setDefaultYAt(int i,  double min, double max) {
     EvalElement ee = new EvalElement();
@@ -70,8 +70,6 @@ public abstract class ProblemEncoder {
     evalStruct.setElemAt(ee, i);
   }
 
-
-
   //get a fresh point
   public SearchPoint getFreshSearchPoint() {
     return new SearchPoint(designSpace.getDimension());
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java
index 809211e31ddf..3de78939cb10 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java
@@ -33,12 +33,13 @@ package net.adaptivebox.sco;
  * optimization. Genetic and Evolutionary Computation Conference, 2004: 261-262
  */
 
-
-import net.adaptivebox.global.*;
-import net.adaptivebox.space.*;
-import net.adaptivebox.goodness.*;
-import net.adaptivebox.problem.*;
-import net.adaptivebox.knowledge.*;
+import net.adaptivebox.problem.ProblemEncoder;
+import net.adaptivebox.space.DesignSpace;
+import net.adaptivebox.space.ILocationEngine;
+import net.adaptivebox.global.RandomGenerator;
+import net.adaptivebox.goodness.IGoodnessCompareEngine;
+import net.adaptivebox.knowledge.Library;
+import net.adaptivebox.knowledge.SearchPoint;
 
 public class SCAgent {
 
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignDim.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignDim.java
index 1089b850e8cb..ce6790402a4e 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignDim.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignDim.java
@@ -20,7 +20,8 @@
  */
 
 package net.adaptivebox.space;
-import net.adaptivebox.global.*;
+
+import net.adaptivebox.global.BasicBound;
 
 public class DesignDim {
   // To discrete space with the given step. For example, for an integer variable,
@@ -28,9 +29,6 @@ public class DesignDim {
   public double grain = 0;
   public BasicBound paramBound = new BasicBound(); //the range of a parameter
 
-
-
-
   public boolean isDiscrete() {
     return grain!=0;
   }


More information about the Libreoffice-commits mailing list