Kaydet (Commit) 7aeef2e8 authored tarafından Todor Balabanov's avatar Todor Balabanov Kaydeden (comit) Julien Nabet

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: 's avatarJulien Nabet <serval2412@yahoo.fr>
üst 8a26e4b2
......@@ -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 {
......
......@@ -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
......
......@@ -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
......
......@@ -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)
......
......@@ -20,7 +20,7 @@
package net.adaptivebox.encode;
import net.adaptivebox.global.*;
import net.adaptivebox.global.BasicBound;
public class EvalElement {
......
......@@ -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;
......
......@@ -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;
......
......@@ -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
......@@ -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());
......
......@@ -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 {
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment