repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java
MOEADD.norm_vector
public double norm_vector(double[] z) { double sum = 0; for (int i = 0; i < problem.getNumberOfObjectives(); i++) { sum += z[i] * z[i]; } return Math.sqrt(sum); }
java
public double norm_vector(double[] z) { double sum = 0; for (int i = 0; i < problem.getNumberOfObjectives(); i++) { sum += z[i] * z[i]; } return Math.sqrt(sum); }
[ "public", "double", "norm_vector", "(", "double", "[", "]", "z", ")", "{", "double", "sum", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "problem", ".", "getNumberOfObjectives", "(", ")", ";", "i", "++", ")", "{", "sum", "+=", ...
Calculate the norm of the vector
[ "Calculate", "the", "norm", "of", "the", "vector" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java#L1377-L1385
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/Epsilon.java
Epsilon.epsilon
private double epsilon(Front front, Front referenceFront) throws JMetalException { double eps, epsJ = 0.0, epsK = 0.0, epsTemp; int numberOfObjectives = front.getPointDimensions() ; eps = Double.MIN_VALUE; for (int i = 0; i < referenceFront.getNumberOfPoints(); i++) { for (int j = 0; j < front...
java
private double epsilon(Front front, Front referenceFront) throws JMetalException { double eps, epsJ = 0.0, epsK = 0.0, epsTemp; int numberOfObjectives = front.getPointDimensions() ; eps = Double.MIN_VALUE; for (int i = 0; i < referenceFront.getNumberOfPoints(); i++) { for (int j = 0; j < front...
[ "private", "double", "epsilon", "(", "Front", "front", ",", "Front", "referenceFront", ")", "throws", "JMetalException", "{", "double", "eps", ",", "epsJ", "=", "0.0", ",", "epsK", "=", "0.0", ",", "epsTemp", ";", "int", "numberOfObjectives", "=", "front", ...
Returns the value of the epsilon indicator. @param front Solution front @param referenceFront Optimal Pareto front @return the value of the epsilon indicator @throws JMetalException
[ "Returns", "the", "value", "of", "the", "epsilon", "indicator", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/Epsilon.java#L78-L110
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/zdt/ZDT3.java
ZDT3.evalH
protected double evalH(double f, double g) { double h ; h = 1.0 - Math.sqrt(f / g) - (f / g) * Math.sin(10.0 * Math.PI * f); return h; }
java
protected double evalH(double f, double g) { double h ; h = 1.0 - Math.sqrt(f / g) - (f / g) * Math.sin(10.0 * Math.PI * f); return h; }
[ "protected", "double", "evalH", "(", "double", "f", ",", "double", "g", ")", "{", "double", "h", ";", "h", "=", "1.0", "-", "Math", ".", "sqrt", "(", "f", "/", "g", ")", "-", "(", "f", "/", "g", ")", "*", "Math", ".", "sin", "(", "10.0", "*...
Returns the value of the ZDT3 function H. @param f First argument of the function H. @param g Second argument of the function H.
[ "Returns", "the", "value", "of", "the", "ZDT3", "function", "H", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/zdt/ZDT3.java#L51-L56
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADSTM.java
MOEADSTM.prefers
public boolean prefers(int x, int y, int[] womanPref, int size) { for (int i = 0; i < size; i++) { int pref = womanPref[i]; if (pref == x) { return true; } if (pref == y) { return false; } } // this should never happen. System.out.println("Error in womanPre...
java
public boolean prefers(int x, int y, int[] womanPref, int size) { for (int i = 0; i < size; i++) { int pref = womanPref[i]; if (pref == x) { return true; } if (pref == y) { return false; } } // this should never happen. System.out.println("Error in womanPre...
[ "public", "boolean", "prefers", "(", "int", "x", ",", "int", "y", ",", "int", "[", "]", "womanPref", ",", "int", "size", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "size", ";", "i", "++", ")", "{", "int", "pref", "=", "womanPr...
Returns true in case that a given woman prefers x to y.
[ "Returns", "true", "in", "case", "that", "a", "given", "woman", "prefers", "x", "to", "y", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADSTM.java#L300-L314
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java
ABYSS.referenceSetUpdate
@Override public void referenceSetUpdate(DoubleSolution solution) { if (refSet1Test(solution)) { for (DoubleSolution solutionInRefSet2 : referenceSet2) { double aux = SolutionUtils.distanceBetweenSolutionsInObjectiveSpace(solution, solutionInRefSet2); DoubleSolution auxSolution = solutionInRef...
java
@Override public void referenceSetUpdate(DoubleSolution solution) { if (refSet1Test(solution)) { for (DoubleSolution solutionInRefSet2 : referenceSet2) { double aux = SolutionUtils.distanceBetweenSolutionsInObjectiveSpace(solution, solutionInRefSet2); DoubleSolution auxSolution = solutionInRef...
[ "@", "Override", "public", "void", "referenceSetUpdate", "(", "DoubleSolution", "solution", ")", "{", "if", "(", "refSet1Test", "(", "solution", ")", ")", "{", "for", "(", "DoubleSolution", "solutionInRefSet2", ":", "referenceSet2", ")", "{", "double", "aux", ...
Update the reference set with a new solution @param solution
[ "Update", "the", "reference", "set", "with", "a", "new", "solution" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java#L182-L194
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java
ABYSS.buildNewReferenceSet1
public void buildNewReferenceSet1() { DoubleSolution individual; strengthRawFitness.computeDensityEstimator(getPopulation()); Collections.sort(getPopulation(), fitnessComparator); for (int i = 0; i < referenceSet1Size; i++) { individual = getPopulation().get(0); getPopulation().remove(0); ...
java
public void buildNewReferenceSet1() { DoubleSolution individual; strengthRawFitness.computeDensityEstimator(getPopulation()); Collections.sort(getPopulation(), fitnessComparator); for (int i = 0; i < referenceSet1Size; i++) { individual = getPopulation().get(0); getPopulation().remove(0); ...
[ "public", "void", "buildNewReferenceSet1", "(", ")", "{", "DoubleSolution", "individual", ";", "strengthRawFitness", ".", "computeDensityEstimator", "(", "getPopulation", "(", ")", ")", ";", "Collections", ".", "sort", "(", "getPopulation", "(", ")", ",", "fitness...
Build the referenceSet1 by moving the best referenceSet1Size individuals, according to a fitness comparator, from the population to the referenceSet1
[ "Build", "the", "referenceSet1", "by", "moving", "the", "best", "referenceSet1Size", "individuals", "according", "to", "a", "fitness", "comparator", "from", "the", "population", "to", "the", "referenceSet1" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java#L200-L211
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java
ABYSS.buildNewReferenceSet2
public void buildNewReferenceSet2() { for (int i = 0; i < getPopulation().size(); i++) { DoubleSolution individual = getPopulation().get(i); double distanceAux = SolutionUtils .distanceToSolutionListInSolutionSpace(individual, referenceSet1); distanceToSolutionListAttribute.setAttribute(...
java
public void buildNewReferenceSet2() { for (int i = 0; i < getPopulation().size(); i++) { DoubleSolution individual = getPopulation().get(i); double distanceAux = SolutionUtils .distanceToSolutionListInSolutionSpace(individual, referenceSet1); distanceToSolutionListAttribute.setAttribute(...
[ "public", "void", "buildNewReferenceSet2", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "getPopulation", "(", ")", ".", "size", "(", ")", ";", "i", "++", ")", "{", "DoubleSolution", "individual", "=", "getPopulation", "(", ")", "."...
Build the referenceSet2 by moving to it the most diverse referenceSet2Size individuals from the population in respect to the referenceSet1. The size of the referenceSet2 can be lower than referenceSet2Size depending on the current size of the population
[ "Build", "the", "referenceSet2", "by", "moving", "to", "it", "the", "most", "diverse", "referenceSet2Size", "individuals", "from", "the", "population", "in", "respect", "to", "the", "referenceSet1", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java#L220-L275
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java
ABYSS.subsetGeneration
@Override public List<List<DoubleSolution>> subsetGeneration() { List<List<DoubleSolution>> solutionGroupsList ; solutionGroupsList = generatePairsFromSolutionList(referenceSet1) ; solutionGroupsList.addAll(generatePairsFromSolutionList(referenceSet2)); return solutionGroupsList ; }
java
@Override public List<List<DoubleSolution>> subsetGeneration() { List<List<DoubleSolution>> solutionGroupsList ; solutionGroupsList = generatePairsFromSolutionList(referenceSet1) ; solutionGroupsList.addAll(generatePairsFromSolutionList(referenceSet2)); return solutionGroupsList ; }
[ "@", "Override", "public", "List", "<", "List", "<", "DoubleSolution", ">", ">", "subsetGeneration", "(", ")", "{", "List", "<", "List", "<", "DoubleSolution", ">>", "solutionGroupsList", ";", "solutionGroupsList", "=", "generatePairsFromSolutionList", "(", "refer...
Subset generation method @return
[ "Subset", "generation", "method" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java#L379-L388
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java
ABYSS.generatePairsFromSolutionList
public List<List<DoubleSolution>> generatePairsFromSolutionList(List<DoubleSolution> solutionList) { List<List<DoubleSolution>> subset = new ArrayList<>() ; for (int i = 0; i < solutionList.size(); i++) { DoubleSolution solution1 = solutionList.get(i); for (int j = i + 1; j < solutionList.size(); j+...
java
public List<List<DoubleSolution>> generatePairsFromSolutionList(List<DoubleSolution> solutionList) { List<List<DoubleSolution>> subset = new ArrayList<>() ; for (int i = 0; i < solutionList.size(); i++) { DoubleSolution solution1 = solutionList.get(i); for (int j = i + 1; j < solutionList.size(); j+...
[ "public", "List", "<", "List", "<", "DoubleSolution", ">", ">", "generatePairsFromSolutionList", "(", "List", "<", "DoubleSolution", ">", "solutionList", ")", "{", "List", "<", "List", "<", "DoubleSolution", ">>", "subset", "=", "new", "ArrayList", "<>", "(", ...
Generate all pair combinations of the referenceSet1
[ "Generate", "all", "pair", "combinations", "of", "the", "referenceSet1" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java#L393-L414
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/experiment/component/ComputeQualityIndicators.java
ComputeQualityIndicators.resetIndicatorFiles
private void resetIndicatorFiles() { for (GenericIndicator<S> indicator : experiment.getIndicatorList()) { for (ExperimentAlgorithm<?, Result> algorithm : experiment.getAlgorithmList()) { for (ExperimentProblem<?> problem: experiment.getProblemList()) { String algorithmDirectory; a...
java
private void resetIndicatorFiles() { for (GenericIndicator<S> indicator : experiment.getIndicatorList()) { for (ExperimentAlgorithm<?, Result> algorithm : experiment.getAlgorithmList()) { for (ExperimentProblem<?> problem: experiment.getProblemList()) { String algorithmDirectory; a...
[ "private", "void", "resetIndicatorFiles", "(", ")", "{", "for", "(", "GenericIndicator", "<", "S", ">", "indicator", ":", "experiment", ".", "getIndicatorList", "(", ")", ")", "{", "for", "(", "ExperimentAlgorithm", "<", "?", ",", "Result", ">", "algorithm",...
Deletes the files containing the indicator values if the exist.
[ "Deletes", "the", "files", "containing", "the", "indicator", "values", "if", "the", "exist", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/experiment/component/ComputeQualityIndicators.java#L189-L202
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/experiment/component/ComputeQualityIndicators.java
ComputeQualityIndicators.resetFile
private void resetFile(String file) { File f = new File(file); if (f.exists()) { JMetalLogger.logger.info("Already existing file " + file); if (f.isDirectory()) { JMetalLogger.logger.info("Deleting directory " + file); if (f.delete()) { JMetalLogger.logger.info("Directory ...
java
private void resetFile(String file) { File f = new File(file); if (f.exists()) { JMetalLogger.logger.info("Already existing file " + file); if (f.isDirectory()) { JMetalLogger.logger.info("Deleting directory " + file); if (f.delete()) { JMetalLogger.logger.info("Directory ...
[ "private", "void", "resetFile", "(", "String", "file", ")", "{", "File", "f", "=", "new", "File", "(", "file", ")", ";", "if", "(", "f", ".", "exists", "(", ")", ")", "{", "JMetalLogger", ".", "logger", ".", "info", "(", "\"Already existing file \"", ...
Deletes a file or directory if it does exist @param file
[ "Deletes", "a", "file", "or", "directory", "if", "it", "does", "exist" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/experiment/component/ComputeQualityIndicators.java#L209-L232
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/maf/MaF09.java
MaF09.lines_of_polygon
public double[][] lines_of_polygon(double[][] p) { double[][] c9 = new double[p.length][3]; for (int i = 0; i < p.length - 1; i++) {// evaluate formula of the straight line l1,...,m-1 c9[i] = line_of_twoP(p[i], p[i + 1]); } // evaluate formula of the straight line lm c9[p.length - 1] = ...
java
public double[][] lines_of_polygon(double[][] p) { double[][] c9 = new double[p.length][3]; for (int i = 0; i < p.length - 1; i++) {// evaluate formula of the straight line l1,...,m-1 c9[i] = line_of_twoP(p[i], p[i + 1]); } // evaluate formula of the straight line lm c9[p.length - 1] = ...
[ "public", "double", "[", "]", "[", "]", "lines_of_polygon", "(", "double", "[", "]", "[", "]", "p", ")", "{", "double", "[", "]", "[", "]", "c9", "=", "new", "double", "[", "p", ".", "length", "]", "[", "3", "]", ";", "for", "(", "int", "i", ...
given vertexes,evaluate the straight lines of a polygon
[ "given", "vertexes", "evaluate", "the", "straight", "lines", "of", "a", "polygon" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/maf/MaF09.java#L224-L232
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/maf/MaF09.java
MaF09.generV
public static double generV(double lb, double ub) { double p; p = JMetalRandom.getInstance().nextDouble() * (ub - lb) + lb; return p; }
java
public static double generV(double lb, double ub) { double p; p = JMetalRandom.getInstance().nextDouble() * (ub - lb) + lb; return p; }
[ "public", "static", "double", "generV", "(", "double", "lb", ",", "double", "ub", ")", "{", "double", "p", ";", "p", "=", "JMetalRandom", ".", "getInstance", "(", ")", ".", "nextDouble", "(", ")", "*", "(", "ub", "-", "lb", ")", "+", "lb", ";", "...
generate a random variable with boundary lb,ub
[ "generate", "a", "random", "variable", "with", "boundary", "lb", "ub" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/maf/MaF09.java#L324-L328
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/operator/impl/mutation/UniformMutation.java
UniformMutation.doMutation
public void doMutation(double probability, DoubleSolution solution) { for (int i = 0; i < solution.getNumberOfVariables(); i++) { if (randomGenenerator.getRandomValue() < probability) { double rand = randomGenenerator.getRandomValue(); double tmp = (rand - 0.5) * perturbation; tmp +=...
java
public void doMutation(double probability, DoubleSolution solution) { for (int i = 0; i < solution.getNumberOfVariables(); i++) { if (randomGenenerator.getRandomValue() < probability) { double rand = randomGenenerator.getRandomValue(); double tmp = (rand - 0.5) * perturbation; tmp +=...
[ "public", "void", "doMutation", "(", "double", "probability", ",", "DoubleSolution", "solution", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "solution", ".", "getNumberOfVariables", "(", ")", ";", "i", "++", ")", "{", "if", "(", "randomG...
Perform the operation @param probability Mutation setProbability @param solution The solution to mutate
[ "Perform", "the", "operation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/operator/impl/mutation/UniformMutation.java#L57-L74
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/mop/MOP6.java
MOP6.evalG
private double evalG(DoubleSolution solution) { double g = 0.0; for (int i = 2; i < solution.getNumberOfVariables(); i++) { double t = solution.getVariableValue(i) - solution.getVariableValue(0) * solution.getVariableValue(1); g += -0.9 * t * t + Math.pow(Math.abs(t), 0.6); } g = 2 * Math.si...
java
private double evalG(DoubleSolution solution) { double g = 0.0; for (int i = 2; i < solution.getNumberOfVariables(); i++) { double t = solution.getVariableValue(i) - solution.getVariableValue(0) * solution.getVariableValue(1); g += -0.9 * t * t + Math.pow(Math.abs(t), 0.6); } g = 2 * Math.si...
[ "private", "double", "evalG", "(", "DoubleSolution", "solution", ")", "{", "double", "g", "=", "0.0", ";", "for", "(", "int", "i", "=", "2", ";", "i", "<", "solution", ".", "getNumberOfVariables", "(", ")", ";", "i", "++", ")", "{", "double", "t", ...
Returns the value of the MOP6 function G. @param solution Solution
[ "Returns", "the", "value", "of", "the", "MOP6", "function", "G", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/mop/MOP6.java#L67-L75
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/mombi/util/MOMBI2History.java
MOMBI2History.add
public void add(List<Double> maxs) { List<Double> aux = new ArrayList<>(this.numberOfObjectives); aux.addAll(maxs); this.history.add(aux); if (history.size() > MAX_LENGHT) history.remove(0); }
java
public void add(List<Double> maxs) { List<Double> aux = new ArrayList<>(this.numberOfObjectives); aux.addAll(maxs); this.history.add(aux); if (history.size() > MAX_LENGHT) history.remove(0); }
[ "public", "void", "add", "(", "List", "<", "Double", ">", "maxs", ")", "{", "List", "<", "Double", ">", "aux", "=", "new", "ArrayList", "<>", "(", "this", ".", "numberOfObjectives", ")", ";", "aux", ".", "addAll", "(", "maxs", ")", ";", "this", "."...
Adds a new vector of maxs values to the history. The method ensures that only the newest MAX_LENGTH vectors will be kept in the history @param maxs
[ "Adds", "a", "new", "vector", "of", "maxs", "values", "to", "the", "history", ".", "The", "method", "ensures", "that", "only", "the", "newest", "MAX_LENGTH", "vectors", "will", "be", "kept", "in", "the", "history" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/mombi/util/MOMBI2History.java#L34-L40
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/mombi/util/MOMBI2History.java
MOMBI2History.mean
public List<Double> mean() { List<Double> result = new ArrayList<>(this.numberOfObjectives); for (int i = 0; i < this.numberOfObjectives; i++) result.add(0.0); for (List<Double> historyMember : this.history) for (int i = 0; i < this.numberOfObjectives;i++) result.set(i, result.get(i) + ...
java
public List<Double> mean() { List<Double> result = new ArrayList<>(this.numberOfObjectives); for (int i = 0; i < this.numberOfObjectives; i++) result.add(0.0); for (List<Double> historyMember : this.history) for (int i = 0; i < this.numberOfObjectives;i++) result.set(i, result.get(i) + ...
[ "public", "List", "<", "Double", ">", "mean", "(", ")", "{", "List", "<", "Double", ">", "result", "=", "new", "ArrayList", "<>", "(", "this", ".", "numberOfObjectives", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "num...
Returns the mean of the values contained in the history
[ "Returns", "the", "mean", "of", "the", "values", "contained", "in", "the", "history" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/mombi/util/MOMBI2History.java#L45-L59
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.setScalarizationValue
private static <S extends Solution<?>> void setScalarizationValue(S solution, double scalarizationValue) { solution.setAttribute(new ScalarizationValue<S>().getAttributeIdentifier(), scalarizationValue); }
java
private static <S extends Solution<?>> void setScalarizationValue(S solution, double scalarizationValue) { solution.setAttribute(new ScalarizationValue<S>().getAttributeIdentifier(), scalarizationValue); }
[ "private", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "setScalarizationValue", "(", "S", "solution", ",", "double", "scalarizationValue", ")", "{", "solution", ".", "setAttribute", "(", "new", "ScalarizationValue", "<", "S", ">", ...
Sets the scalarization value of a solution. Used for for simplified static access. @param solution The solution whose scalarization value is set. @param scalarizationValue The scalarization value of the solution.
[ "Sets", "the", "scalarization", "value", "of", "a", "solution", ".", "Used", "for", "for", "simplified", "static", "access", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L30-L32
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.toArray
private static double[] toArray(List<Double> list) { double[] values = new double[list.size()]; for (int i = 0; i < values.length; i++) { values[i] = list.get(i); } return values; }
java
private static double[] toArray(List<Double> list) { double[] values = new double[list.size()]; for (int i = 0; i < values.length; i++) { values[i] = list.get(i); } return values; }
[ "private", "static", "double", "[", "]", "toArray", "(", "List", "<", "Double", ">", "list", ")", "{", "double", "[", "]", "values", "=", "new", "double", "[", "list", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i",...
Method for turning a list of doubles to an array. @param list List of doubles @return Array of doubles.
[ "Method", "for", "turning", "a", "list", "of", "doubles", "to", "an", "array", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L51-L57
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.getIdealValues
private static <S extends Solution<?>> double[] getIdealValues(List<S> solutionsList) { ArrayFront front = new ArrayFront(solutionsList); FrontExtremeValues extremeValues = new FrontExtremeValues(); List<Double> list = extremeValues.findLowestValues(front); return toArray(list); }
java
private static <S extends Solution<?>> double[] getIdealValues(List<S> solutionsList) { ArrayFront front = new ArrayFront(solutionsList); FrontExtremeValues extremeValues = new FrontExtremeValues(); List<Double> list = extremeValues.findLowestValues(front); return toArray(list); }
[ "private", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "double", "[", "]", "getIdealValues", "(", "List", "<", "S", ">", "solutionsList", ")", "{", "ArrayFront", "front", "=", "new", "ArrayFront", "(", "solutionsList", ")", ";", "Front...
Computes the ideal point based on a list of solutions @param solutionsList A list of solutions @return The ideal point
[ "Computes", "the", "ideal", "point", "based", "on", "a", "list", "of", "solutions" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L65-L70
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.getNadirValues
private static <S extends Solution<?>> double[] getNadirValues(List<S> solutionsList) { ArrayFront front = new ArrayFront(solutionsList); FrontExtremeValues extremeValues = new FrontExtremeValues(); List<Double> list = extremeValues.findHighestValues(front); return toArray(list); }
java
private static <S extends Solution<?>> double[] getNadirValues(List<S> solutionsList) { ArrayFront front = new ArrayFront(solutionsList); FrontExtremeValues extremeValues = new FrontExtremeValues(); List<Double> list = extremeValues.findHighestValues(front); return toArray(list); }
[ "private", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "double", "[", "]", "getNadirValues", "(", "List", "<", "S", ">", "solutionsList", ")", "{", "ArrayFront", "front", "=", "new", "ArrayFront", "(", "solutionsList", ")", ";", "Front...
Computes the nadir point based on a list of solutions @param solutionsList A list of solutions @return The nadir point.
[ "Computes", "the", "nadir", "point", "based", "on", "a", "list", "of", "solutions" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L78-L83
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.getExtremePoints
private static <S extends Solution<?>> double[][] getExtremePoints(List<S> solutionsList) { // One extreme point for each objective double[][] extremePoints = new double[solutionsList.get(0).getNumberOfObjectives()][]; for (int i = 0; i < extremePoints.length; i++) { S extreme = Collections.min(...
java
private static <S extends Solution<?>> double[][] getExtremePoints(List<S> solutionsList) { // One extreme point for each objective double[][] extremePoints = new double[solutionsList.get(0).getNumberOfObjectives()][]; for (int i = 0; i < extremePoints.length; i++) { S extreme = Collections.min(...
[ "private", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "double", "[", "]", "[", "]", "getExtremePoints", "(", "List", "<", "S", ">", "solutionsList", ")", "{", "// One extreme point for each objective\r", "double", "[", "]", "[", "]", "e...
Computes the extreme points on achievement scalarization values @param solutionsList A list of solutions. @return Extreme points of the list of solutions.
[ "Computes", "the", "extreme", "points", "on", "achievement", "scalarization", "values" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L91-L104
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.sumOfObjectives
public static <S extends Solution<?>> void sumOfObjectives(List<S> solutionsList) { for (S solution : solutionsList) { double sum = solution.getObjective(0); for (int i = 1; i < solution.getNumberOfObjectives(); i++) { sum += solution.getObjective(i); } setScalarizationValue(so...
java
public static <S extends Solution<?>> void sumOfObjectives(List<S> solutionsList) { for (S solution : solutionsList) { double sum = solution.getObjective(0); for (int i = 1; i < solution.getNumberOfObjectives(); i++) { sum += solution.getObjective(i); } setScalarizationValue(so...
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "sumOfObjectives", "(", "List", "<", "S", ">", "solutionsList", ")", "{", "for", "(", "S", "solution", ":", "solutionsList", ")", "{", "double", "sum", "=", "solution", "....
Scalarization values is computed by summing objective values. @param solutionsList A list of solutions.
[ "Scalarization", "values", "is", "computed", "by", "summing", "objective", "values", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L111-L119
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.weightedSum
public static <S extends Solution<?>> void weightedSum(List<S> solutionsList, double[] weights) { for (S solution : solutionsList) { double sum = weights[0] * solution.getObjective(0); for (int i = 1; i < solution.getNumberOfObjectives(); i++) { sum += weights[i] * solution.getObjective(i); ...
java
public static <S extends Solution<?>> void weightedSum(List<S> solutionsList, double[] weights) { for (S solution : solutionsList) { double sum = weights[0] * solution.getObjective(0); for (int i = 1; i < solution.getNumberOfObjectives(); i++) { sum += weights[i] * solution.getObjective(i); ...
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "weightedSum", "(", "List", "<", "S", ">", "solutionsList", ",", "double", "[", "]", "weights", ")", "{", "for", "(", "S", "solution", ":", "solutionsList", ")", "{", "d...
Objective values are multiplied by weights and summed. Weights should always be positive. @param solutionsList A list of solutions. @param weights Positive constants by which objectives are summed.
[ "Objective", "values", "are", "multiplied", "by", "weights", "and", "summed", ".", "Weights", "should", "always", "be", "positive", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L128-L137
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.productOfObjectives
public static <S extends Solution<?>> void productOfObjectives(List<S> solutionsList) { for (S solution : solutionsList) { double product = solution.getObjective(0); for (int i = 1; i < solution.getNumberOfObjectives(); i++) { product *= solution.getObjective(i); } setScalariza...
java
public static <S extends Solution<?>> void productOfObjectives(List<S> solutionsList) { for (S solution : solutionsList) { double product = solution.getObjective(0); for (int i = 1; i < solution.getNumberOfObjectives(); i++) { product *= solution.getObjective(i); } setScalariza...
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "productOfObjectives", "(", "List", "<", "S", ">", "solutionsList", ")", "{", "for", "(", "S", "solution", ":", "solutionsList", ")", "{", "double", "product", "=", "solutio...
Objective values are multiplied. @param solutionsList A list of solutions.
[ "Objective", "values", "are", "multiplied", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L144-L152
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.weightedProduct
public static <S extends Solution<?>> void weightedProduct(List<S> solutionsList, double[] weights) { for (S solution : solutionsList) { double product = Math.pow(solution.getObjective(0), weights[0]); for (int i = 1; i < solution.getNumberOfObjectives(); i++) { product *= Math.pow(solution....
java
public static <S extends Solution<?>> void weightedProduct(List<S> solutionsList, double[] weights) { for (S solution : solutionsList) { double product = Math.pow(solution.getObjective(0), weights[0]); for (int i = 1; i < solution.getNumberOfObjectives(); i++) { product *= Math.pow(solution....
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "weightedProduct", "(", "List", "<", "S", ">", "solutionsList", ",", "double", "[", "]", "weights", ")", "{", "for", "(", "S", "solution", ":", "solutionsList", ")", "{", ...
Objectives are exponentiated by a positive weight and afterwards multiplied. @param solutionsList A list of solutions. @param weights Weights by objectives are exponentiated
[ "Objectives", "are", "exponentiated", "by", "a", "positive", "weight", "and", "afterwards", "multiplied", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L161-L169
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.chebyshev
public static <S extends Solution<?>> void chebyshev(List<S> solutionsList) { chebyshev(solutionsList, getIdealValues(solutionsList)); }
java
public static <S extends Solution<?>> void chebyshev(List<S> solutionsList) { chebyshev(solutionsList, getIdealValues(solutionsList)); }
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "chebyshev", "(", "List", "<", "S", ">", "solutionsList", ")", "{", "chebyshev", "(", "solutionsList", ",", "getIdealValues", "(", "solutionsList", ")", ")", ";", "}" ]
Scalarization values based on the Chebyshev function. The ideal point is computed from the list of solutions. @param solutionsList A list of solutions.
[ "Scalarization", "values", "based", "on", "the", "Chebyshev", "function", ".", "The", "ideal", "point", "is", "computed", "from", "the", "list", "of", "solutions", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L177-L179
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.weightedChebyshev
public static <S extends Solution<?>> void weightedChebyshev(List<S> solutionsList, double[] weights) { weightedChebyshev(solutionsList, getIdealValues(solutionsList), weights); }
java
public static <S extends Solution<?>> void weightedChebyshev(List<S> solutionsList, double[] weights) { weightedChebyshev(solutionsList, getIdealValues(solutionsList), weights); }
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "weightedChebyshev", "(", "List", "<", "S", ">", "solutionsList", ",", "double", "[", "]", "weights", ")", "{", "weightedChebyshev", "(", "solutionsList", ",", "getIdealValues",...
Chebyhsev function with weighted objectives. @param solutionsList A list of solutions. @param weights Constants by which ideal values and objective values are multiplied.
[ "Chebyhsev", "function", "with", "weighted", "objectives", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L188-L190
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.chebyshev
public static <S extends Solution<?>> void chebyshev(List<S> solutionsList, double[] idealValues) { for (S solution : solutionsList) { double max = solution.getObjective(0) - idealValues[0]; for (int i = 1; i < solution.getNumberOfObjectives(); i++) { max = Math.max(max, solution.getObjectiv...
java
public static <S extends Solution<?>> void chebyshev(List<S> solutionsList, double[] idealValues) { for (S solution : solutionsList) { double max = solution.getObjective(0) - idealValues[0]; for (int i = 1; i < solution.getNumberOfObjectives(); i++) { max = Math.max(max, solution.getObjectiv...
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "chebyshev", "(", "List", "<", "S", ">", "solutionsList", ",", "double", "[", "]", "idealValues", ")", "{", "for", "(", "S", "solution", ":", "solutionsList", ")", "{", ...
Scalarization values based on the Chebyshev function. @param solutionsList A list of solutions. @param idealValues The ideal point
[ "Scalarization", "values", "based", "on", "the", "Chebyshev", "function", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L198-L206
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.nash
public static <S extends Solution<?>> void nash(List<S> solutionsList) { nash(solutionsList, getNadirValues(solutionsList)); }
java
public static <S extends Solution<?>> void nash(List<S> solutionsList) { nash(solutionsList, getNadirValues(solutionsList)); }
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "nash", "(", "List", "<", "S", ">", "solutionsList", ")", "{", "nash", "(", "solutionsList", ",", "getNadirValues", "(", "solutionsList", ")", ")", ";", "}" ]
Scalarization values based on the Nash bargaining solution. The disagreement point is computed based on the list of solutions. @param solutionsList A list of solutions.
[ "Scalarization", "values", "based", "on", "the", "Nash", "bargaining", "solution", ".", "The", "disagreement", "point", "is", "computed", "based", "on", "the", "list", "of", "solutions", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L232-L234
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.nash
public static <S extends Solution<?>> void nash(List<S> solutionsList, double[] nadirValues) { for (S solution : solutionsList) { double nash = nadirValues[0] - solution.getObjective(0); for (int i = 1; i < nadirValues.length; i++) { nash *= (nadirValues[i] - solution.getObjective(i)); ...
java
public static <S extends Solution<?>> void nash(List<S> solutionsList, double[] nadirValues) { for (S solution : solutionsList) { double nash = nadirValues[0] - solution.getObjective(0); for (int i = 1; i < nadirValues.length; i++) { nash *= (nadirValues[i] - solution.getObjective(i)); ...
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "nash", "(", "List", "<", "S", ">", "solutionsList", ",", "double", "[", "]", "nadirValues", ")", "{", "for", "(", "S", "solution", ":", "solutionsList", ")", "{", "doub...
Scalarization values based on the Nash bargaining solution. @param solutionsList A list of solutions. @param nadirValues The disagreement point.
[ "Scalarization", "values", "based", "on", "the", "Nash", "bargaining", "solution", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L242-L252
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.uniform
public static <S extends Solution<?>> void uniform(List<S> solutionsList) { for (S solution : solutionsList) { setScalarizationValue(solution, 1.0); } }
java
public static <S extends Solution<?>> void uniform(List<S> solutionsList) { for (S solution : solutionsList) { setScalarizationValue(solution, 1.0); } }
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "uniform", "(", "List", "<", "S", ">", "solutionsList", ")", "{", "for", "(", "S", "solution", ":", "solutionsList", ")", "{", "setScalarizationValue", "(", "solution", ",",...
Uniform preferences. Each solution is assigned a scalarization value of 1.0. @param solutionsList A list of solutions.
[ "Uniform", "preferences", ".", "Each", "solution", "is", "assigned", "a", "scalarization", "value", "of", "1", ".", "0", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L337-L341
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG1.java
WFG1.t2
public float[] t2(float[] z, int k) { float[] result = new float[z.length]; System.arraycopy(z, 0, result, 0, k); for (int i = k; i < z.length; i++) { result[i] = (new Transformations()).bFlat(z[i], (float) 0.8, (float) 0.75, (float) 0.85); } return result; }
java
public float[] t2(float[] z, int k) { float[] result = new float[z.length]; System.arraycopy(z, 0, result, 0, k); for (int i = k; i < z.length; i++) { result[i] = (new Transformations()).bFlat(z[i], (float) 0.8, (float) 0.75, (float) 0.85); } return result; }
[ "public", "float", "[", "]", "t2", "(", "float", "[", "]", "z", ",", "int", "k", ")", "{", "float", "[", "]", "result", "=", "new", "float", "[", "z", ".", "length", "]", ";", "System", ".", "arraycopy", "(", "z", ",", "0", ",", "result", ","...
WFG1 t2 transformation
[ "WFG1", "t2", "transformation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG1.java#L96-L106
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG1.java
WFG1.t3
public float[] t3(float[] z) throws JMetalException { float[] result = new float[z.length]; for (int i = 0; i < z.length; i++) { result[i] = (new Transformations()).bPoly(z[i], (float) 0.02); } return result; }
java
public float[] t3(float[] z) throws JMetalException { float[] result = new float[z.length]; for (int i = 0; i < z.length; i++) { result[i] = (new Transformations()).bPoly(z[i], (float) 0.02); } return result; }
[ "public", "float", "[", "]", "t3", "(", "float", "[", "]", "z", ")", "throws", "JMetalException", "{", "float", "[", "]", "result", "=", "new", "float", "[", "z", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "z", ...
WFG1 t3 transformation @throws org.uma.jmetal.util.JMetalException
[ "WFG1", "t3", "transformation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG1.java#L113-L121
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG1.java
WFG1.t4
public float[] t4(float[] z, int k, int M) { float[] result = new float[M]; float[] w = new float[z.length]; for (int i = 0; i < z.length; i++) { w[i] = (float) 2.0 * (i + 1); } for (int i = 1; i <= M - 1; i++) { int head = (i - 1) * k / (M - 1) + 1; int tail = i * k / ...
java
public float[] t4(float[] z, int k, int M) { float[] result = new float[M]; float[] w = new float[z.length]; for (int i = 0; i < z.length; i++) { w[i] = (float) 2.0 * (i + 1); } for (int i = 1; i <= M - 1; i++) { int head = (i - 1) * k / (M - 1) + 1; int tail = i * k / ...
[ "public", "float", "[", "]", "t4", "(", "float", "[", "]", "z", ",", "int", "k", ",", "int", "M", ")", "{", "float", "[", "]", "result", "=", "new", "float", "[", "M", "]", ";", "float", "[", "]", "w", "=", "new", "float", "[", "z", ".", ...
WFG1 t4 transformation
[ "WFG1", "t4", "transformation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG1.java#L126-L150
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java
WeightVectors.validate
public static boolean validate (double[][] weights, int numberOfComponents) { int i; boolean correct; correct = (weights != null && weights.length > 0); i = 0; while (correct && i < weights.length) { correct = (weights[i].length == numberOfComponents); i++; } return correct; }
java
public static boolean validate (double[][] weights, int numberOfComponents) { int i; boolean correct; correct = (weights != null && weights.length > 0); i = 0; while (correct && i < weights.length) { correct = (weights[i].length == numberOfComponents); i++; } return correct; }
[ "public", "static", "boolean", "validate", "(", "double", "[", "]", "[", "]", "weights", ",", "int", "numberOfComponents", ")", "{", "int", "i", ";", "boolean", "correct", ";", "correct", "=", "(", "weights", "!=", "null", "&&", "weights", ".", "length",...
Validate if the number of components of all weight vectors has the expected dimensionality. @param weights Weight vectors to validate @param numberOfComponents Number of components each weight vector must have @return True if the weight vectors are correct, False if the weight vectors are incorrect
[ "Validate", "if", "the", "number", "of", "components", "of", "all", "weight", "vectors", "has", "the", "expected", "dimensionality", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java#L24-L37
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java
WeightVectors.initializeUniformlyInTwoDimensions
public static double[][] initializeUniformlyInTwoDimensions(double epsilon, int numberOfWeights) { double[][] weights = new double[numberOfWeights][2]; int indexOfWeight; double w, jump; jump = (1 - (2 * epsilon)) / (numberOfWeights - 1); indexOfWeight = 0; w = epsilon; //while(w <= (1-epsilon...
java
public static double[][] initializeUniformlyInTwoDimensions(double epsilon, int numberOfWeights) { double[][] weights = new double[numberOfWeights][2]; int indexOfWeight; double w, jump; jump = (1 - (2 * epsilon)) / (numberOfWeights - 1); indexOfWeight = 0; w = epsilon; //while(w <= (1-epsilon...
[ "public", "static", "double", "[", "]", "[", "]", "initializeUniformlyInTwoDimensions", "(", "double", "epsilon", ",", "int", "numberOfWeights", ")", "{", "double", "[", "]", "[", "]", "weights", "=", "new", "double", "[", "numberOfWeights", "]", "[", "2", ...
Generate uniform weight vectors in two dimension @param epsilon Distance between each component of the weight vector @param numberOfWeights Number of weight vectors to generate @return A set of weight vectors
[ "Generate", "uniform", "weight", "vectors", "in", "two", "dimension" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java#L46-L68
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java
WeightVectors.readFromResourcesInJMetal
public static double[][] readFromResourcesInJMetal(String filePath) { double[][] weights; Vector<double[]> listOfWeights = new Vector<>(); try { InputStream in = WeightVectors.class.getResourceAsStream("/" + filePath); InputStreamReader isr = new InputStreamReader(in); BufferedReader br = new BufferedR...
java
public static double[][] readFromResourcesInJMetal(String filePath) { double[][] weights; Vector<double[]> listOfWeights = new Vector<>(); try { InputStream in = WeightVectors.class.getResourceAsStream("/" + filePath); InputStreamReader isr = new InputStreamReader(in); BufferedReader br = new BufferedR...
[ "public", "static", "double", "[", "]", "[", "]", "readFromResourcesInJMetal", "(", "String", "filePath", ")", "{", "double", "[", "]", "[", "]", "weights", ";", "Vector", "<", "double", "[", "]", ">", "listOfWeights", "=", "new", "Vector", "<>", "(", ...
Read a set of weight vector from a file in the resources folder in jMetal @param filePath The name of file in the resources folder of jMetal @return A set of weight vectors
[ "Read", "a", "set", "of", "weight", "vector", "from", "a", "file", "in", "the", "resources", "folder", "in", "jMetal" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java#L76-L114
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java
WeightVectors.readFromFile
public static double[][] readFromFile(String filePath) { double[][] weights; Vector<double[]> listOfWeights = new Vector<>(); try { // Open the file FileInputStream fis = new FileInputStream(filePath); InputStreamReader isr = new InputStreamReader(fis); BufferedReader br = new BufferedReader(isr...
java
public static double[][] readFromFile(String filePath) { double[][] weights; Vector<double[]> listOfWeights = new Vector<>(); try { // Open the file FileInputStream fis = new FileInputStream(filePath); InputStreamReader isr = new InputStreamReader(fis); BufferedReader br = new BufferedReader(isr...
[ "public", "static", "double", "[", "]", "[", "]", "readFromFile", "(", "String", "filePath", ")", "{", "double", "[", "]", "[", "]", "weights", ";", "Vector", "<", "double", "[", "]", ">", "listOfWeights", "=", "new", "Vector", "<>", "(", ")", ";", ...
Read a set of weight vector from a file @param filePath A file containing the weight vectors @return A set of weight vectors
[ "Read", "a", "set", "of", "weight", "vector", "from", "a", "file" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java#L122-L161
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java
WeightVectors.invert
public static double[][] invert(double[][] weights, boolean normalize) { double[][] result = new double[weights.length][weights[0].length]; for (int indexOfWeight = 0; indexOfWeight < weights.length; indexOfWeight++) { if (normalize) { double sum = 0; for (int indexOfComponent = 0; indexOfCompone...
java
public static double[][] invert(double[][] weights, boolean normalize) { double[][] result = new double[weights.length][weights[0].length]; for (int indexOfWeight = 0; indexOfWeight < weights.length; indexOfWeight++) { if (normalize) { double sum = 0; for (int indexOfComponent = 0; indexOfCompone...
[ "public", "static", "double", "[", "]", "[", "]", "invert", "(", "double", "[", "]", "[", "]", "weights", ",", "boolean", "normalize", ")", "{", "double", "[", "]", "[", "]", "result", "=", "new", "double", "[", "weights", ".", "length", "]", "[", ...
Calculate the inverse of a set of weight vectors @param weights A set of weight vectors @param normalize True if the weights should be normalize by the sum of the components @return A set of weight vectors
[ "Calculate", "the", "inverse", "of", "a", "set", "of", "weight", "vectors" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java#L170-L191
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/zdt/ZDT1.java
ZDT1.evalG
protected double evalG(DoubleSolution solution) { double g = 0.0; for (int i = 1; i < solution.getNumberOfVariables(); i++) { g += solution.getVariableValue(i); } double constant = 9.0 / (solution.getNumberOfVariables() - 1); return constant * g + 1.0; }
java
protected double evalG(DoubleSolution solution) { double g = 0.0; for (int i = 1; i < solution.getNumberOfVariables(); i++) { g += solution.getVariableValue(i); } double constant = 9.0 / (solution.getNumberOfVariables() - 1); return constant * g + 1.0; }
[ "protected", "double", "evalG", "(", "DoubleSolution", "solution", ")", "{", "double", "g", "=", "0.0", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "solution", ".", "getNumberOfVariables", "(", ")", ";", "i", "++", ")", "{", "g", "+=", "s...
Returns the value of the ZDT1 function G. @param solution Solution
[ "Returns", "the", "value", "of", "the", "ZDT1", "function", "G", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/zdt/ZDT1.java#L79-L87
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/zdt/ZDT1.java
ZDT1.evalH
protected double evalH(double f, double g) { double h ; h = 1.0 - Math.sqrt(f / g); return h; }
java
protected double evalH(double f, double g) { double h ; h = 1.0 - Math.sqrt(f / g); return h; }
[ "protected", "double", "evalH", "(", "double", "f", ",", "double", "g", ")", "{", "double", "h", ";", "h", "=", "1.0", "-", "Math", ".", "sqrt", "(", "f", "/", "g", ")", ";", "return", "h", ";", "}" ]
Returns the value of the ZDT1 function H. @param f First argument of the function H. @param g Second argument of the function H.
[ "Returns", "the", "value", "of", "the", "ZDT1", "function", "H", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/zdt/ZDT1.java#L95-L99
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/GenerationalDistance.java
GenerationalDistance.generationalDistance
public double generationalDistance(Front front, Front referenceFront) { double sum = 0.0; for (int i = 0; i < front.getNumberOfPoints(); i++) { sum += Math.pow(FrontUtils.distanceToClosestPoint(front.getPoint(i), referenceFront), pow); } sum = Math.pow(sum, 1.0 / pow); return sum /...
java
public double generationalDistance(Front front, Front referenceFront) { double sum = 0.0; for (int i = 0; i < front.getNumberOfPoints(); i++) { sum += Math.pow(FrontUtils.distanceToClosestPoint(front.getPoint(i), referenceFront), pow); } sum = Math.pow(sum, 1.0 / pow); return sum /...
[ "public", "double", "generationalDistance", "(", "Front", "front", ",", "Front", "referenceFront", ")", "{", "double", "sum", "=", "0.0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "front", ".", "getNumberOfPoints", "(", ")", ";", "i", "++",...
Returns the generational distance value for a given front @param front The front @param referenceFront The reference pareto front
[ "Returns", "the", "generational", "distance", "value", "for", "a", "given", "front" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/GenerationalDistance.java#L82-L92
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/Shapes.java
Shapes.linear
public float linear(float[] x, int m) { float result = (float) 1.0; int M = x.length; for (int i = 1; i <= M - m; i++) { result *= x[i - 1]; } if (m != 1) { result *= (1 - x[M - m]); } return result; }
java
public float linear(float[] x, int m) { float result = (float) 1.0; int M = x.length; for (int i = 1; i <= M - m; i++) { result *= x[i - 1]; } if (m != 1) { result *= (1 - x[M - m]); } return result; }
[ "public", "float", "linear", "(", "float", "[", "]", "x", ",", "int", "m", ")", "{", "float", "result", "=", "(", "float", ")", "1.0", ";", "int", "M", "=", "x", ".", "length", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<=", "M", "-"...
Calculate a linear shape
[ "Calculate", "a", "linear", "shape" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/Shapes.java#L16-L29
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/Shapes.java
Shapes.convex
public float convex(float[] x, int m) { float result = (float) 1.0; int M = x.length; for (int i = 1; i <= M - m; i++) { result *= (1 - Math.cos(x[i - 1] * Math.PI * 0.5)); } if (m != 1) { result *= (1 - Math.sin(x[M - m] * Math.PI * 0.5)); } return result; }
java
public float convex(float[] x, int m) { float result = (float) 1.0; int M = x.length; for (int i = 1; i <= M - m; i++) { result *= (1 - Math.cos(x[i - 1] * Math.PI * 0.5)); } if (m != 1) { result *= (1 - Math.sin(x[M - m] * Math.PI * 0.5)); } return result; }
[ "public", "float", "convex", "(", "float", "[", "]", "x", ",", "int", "m", ")", "{", "float", "result", "=", "(", "float", ")", "1.0", ";", "int", "M", "=", "x", ".", "length", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<=", "M", "-"...
Calculate a convex shape
[ "Calculate", "a", "convex", "shape" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/Shapes.java#L34-L47
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/Shapes.java
Shapes.mixed
public float mixed(float[] x, int A, float alpha) { float tmp; tmp = (float) Math.cos((float) 2.0 * A * (float) Math.PI * x[0] + (float) Math.PI * (float) 0.5); tmp /= (2.0 * (float) A * Math.PI); return (float) Math.pow(((float) 1.0 - x[0] - tmp), alpha); }
java
public float mixed(float[] x, int A, float alpha) { float tmp; tmp = (float) Math.cos((float) 2.0 * A * (float) Math.PI * x[0] + (float) Math.PI * (float) 0.5); tmp /= (2.0 * (float) A * Math.PI); return (float) Math.pow(((float) 1.0 - x[0] - tmp), alpha); }
[ "public", "float", "mixed", "(", "float", "[", "]", "x", ",", "int", "A", ",", "float", "alpha", ")", "{", "float", "tmp", ";", "tmp", "=", "(", "float", ")", "Math", ".", "cos", "(", "(", "float", ")", "2.0", "*", "A", "*", "(", "float", ")"...
Calculate a mixed shape
[ "Calculate", "a", "mixed", "shape" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/Shapes.java#L70-L77
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/Shapes.java
Shapes.disc
public float disc(float[] x, int A, float alpha, float beta) { float tmp; tmp = (float) Math.cos((float) A * Math.pow(x[0], beta) * Math.PI); return (float) 1.0 - (float) Math.pow(x[0], alpha) * (float) Math.pow(tmp, 2.0); }
java
public float disc(float[] x, int A, float alpha, float beta) { float tmp; tmp = (float) Math.cos((float) A * Math.pow(x[0], beta) * Math.PI); return (float) 1.0 - (float) Math.pow(x[0], alpha) * (float) Math.pow(tmp, 2.0); }
[ "public", "float", "disc", "(", "float", "[", "]", "x", ",", "int", "A", ",", "float", "alpha", ",", "float", "beta", ")", "{", "float", "tmp", ";", "tmp", "=", "(", "float", ")", "Math", ".", "cos", "(", "(", "float", ")", "A", "*", "Math", ...
Calculate a disc shape
[ "Calculate", "a", "disc", "shape" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/Shapes.java#L82-L87
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java
Benchmark.sphere_noise
static public double sphere_noise(double[] x) { double sum = 0.0; for (int i = 0; i < x.length; i++) { sum += x[i] * x[i]; } // NOISE // Comment the next line to remove the noise sum *= (1.0 + 0.1 * Math.abs(random.nextGaussian())); return (sum); }
java
static public double sphere_noise(double[] x) { double sum = 0.0; for (int i = 0; i < x.length; i++) { sum += x[i] * x[i]; } // NOISE // Comment the next line to remove the noise sum *= (1.0 + 0.1 * Math.abs(random.nextGaussian())); return (sum); }
[ "static", "public", "double", "sphere_noise", "(", "double", "[", "]", "x", ")", "{", "double", "sum", "=", "0.0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "x", ".", "length", ";", "i", "++", ")", "{", "sum", "+=", "x", "[", "i",...
Sphere function with noise
[ "Sphere", "function", "with", "noise" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java#L161-L174
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java
Benchmark.schwefel_102
static public double schwefel_102(double[] x) { double prev_sum, curr_sum, outer_sum; curr_sum = x[0]; outer_sum = (curr_sum * curr_sum); for (int i = 1; i < x.length; i++) { prev_sum = curr_sum; curr_sum = prev_sum + x[i]; outer_sum += (curr_sum * curr_sum); } return (oute...
java
static public double schwefel_102(double[] x) { double prev_sum, curr_sum, outer_sum; curr_sum = x[0]; outer_sum = (curr_sum * curr_sum); for (int i = 1; i < x.length; i++) { prev_sum = curr_sum; curr_sum = prev_sum + x[i]; outer_sum += (curr_sum * curr_sum); } return (oute...
[ "static", "public", "double", "schwefel_102", "(", "double", "[", "]", "x", ")", "{", "double", "prev_sum", ",", "curr_sum", ",", "outer_sum", ";", "curr_sum", "=", "x", "[", "0", "]", ";", "outer_sum", "=", "(", "curr_sum", "*", "curr_sum", ")", ";", ...
Schwefel's problem 1.2
[ "Schwefel", "s", "problem", "1", ".", "2" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java#L177-L191
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java
Benchmark.rosenbrock
static public double rosenbrock(double[] x) { double sum = 0.0; for (int i = 0; i < (x.length - 1); i++) { double temp1 = (x[i] * x[i]) - x[i + 1]; double temp2 = x[i] - 1.0; sum += (100.0 * temp1 * temp1) + (temp2 * temp2); } return (sum); }
java
static public double rosenbrock(double[] x) { double sum = 0.0; for (int i = 0; i < (x.length - 1); i++) { double temp1 = (x[i] * x[i]) - x[i + 1]; double temp2 = x[i] - 1.0; sum += (100.0 * temp1 * temp1) + (temp2 * temp2); } return (sum); }
[ "static", "public", "double", "rosenbrock", "(", "double", "[", "]", "x", ")", "{", "double", "sum", "=", "0.0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "(", "x", ".", "length", "-", "1", ")", ";", "i", "++", ")", "{", "double",...
Rosenbrock's function
[ "Rosenbrock", "s", "function" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java#L198-L209
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java
Benchmark.griewank
static public double griewank(double[] x) { double sum = 0.0; double product = 1.0; for (int i = 0; i < x.length; i++) { sum += ((x[i] * x[i]) / 4000.0); product *= Math.cos(x[i] / m_iSqrt[i]); } return (sum - product + 1.0); }
java
static public double griewank(double[] x) { double sum = 0.0; double product = 1.0; for (int i = 0; i < x.length; i++) { sum += ((x[i] * x[i]) / 4000.0); product *= Math.cos(x[i] / m_iSqrt[i]); } return (sum - product + 1.0); }
[ "static", "public", "double", "griewank", "(", "double", "[", "]", "x", ")", "{", "double", "sum", "=", "0.0", ";", "double", "product", "=", "1.0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "x", ".", "length", ";", "i", "++", ")", ...
Griewank's function
[ "Griewank", "s", "function" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java#L219-L230
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java
Benchmark.ackley
static public double ackley(double[] x) { double sum1 = 0.0; double sum2 = 0.0; for (int i = 0; i < x.length; i++) { sum1 += (x[i] * x[i]); sum2 += (Math.cos(PIx2 * x[i])); } return (-20.0 * Math.exp(-0.2 * Math.sqrt(sum1 / ((double) x.length))) - Math .exp(sum2 / ((double) x.le...
java
static public double ackley(double[] x) { double sum1 = 0.0; double sum2 = 0.0; for (int i = 0; i < x.length; i++) { sum1 += (x[i] * x[i]); sum2 += (Math.cos(PIx2 * x[i])); } return (-20.0 * Math.exp(-0.2 * Math.sqrt(sum1 / ((double) x.length))) - Math .exp(sum2 / ((double) x.le...
[ "static", "public", "double", "ackley", "(", "double", "[", "]", "x", ")", "{", "double", "sum1", "=", "0.0", ";", "double", "sum2", "=", "0.0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "x", ".", "length", ";", "i", "++", ")", "{...
Ackley's function
[ "Ackley", "s", "function" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java#L238-L250
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java
Benchmark.myRound
static public double myRound(double x) { return (Math.signum(x) * Math.round(Math.abs(x))); }
java
static public double myRound(double x) { return (Math.signum(x) * Math.round(Math.abs(x))); }
[ "static", "public", "double", "myRound", "(", "double", "x", ")", "{", "return", "(", "Math", ".", "signum", "(", "x", ")", "*", "Math", ".", "round", "(", "Math", ".", "abs", "(", "x", ")", ")", ")", ";", "}" ]
0. Use the Matlab version for rounding numbers
[ "0", ".", "Use", "the", "Matlab", "version", "for", "rounding", "numbers" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java#L254-L256
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java
Benchmark.myXRound
static public double myXRound(double x, double o) { return ((Math.abs(x - o) < 0.5) ? x : (myRound(2.0 * x) / 2.0)); }
java
static public double myXRound(double x, double o) { return ((Math.abs(x - o) < 0.5) ? x : (myRound(2.0 * x) / 2.0)); }
[ "static", "public", "double", "myXRound", "(", "double", "x", ",", "double", "o", ")", "{", "return", "(", "(", "Math", ".", "abs", "(", "x", "-", "o", ")", "<", "0.5", ")", "?", "x", ":", "(", "myRound", "(", "2.0", "*", "x", ")", "/", "2.0"...
1. "o" is provided
[ "1", ".", "o", "is", "provided" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java#L259-L261
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java
Benchmark.rastrigin
static public double rastrigin(double[] x) { double sum = 0.0; for (int i = 0; i < x.length; i++) { sum += (x[i] * x[i]) - (10.0 * Math.cos(PIx2 * x[i])) + 10.0; } return (sum); }
java
static public double rastrigin(double[] x) { double sum = 0.0; for (int i = 0; i < x.length; i++) { sum += (x[i] * x[i]) - (10.0 * Math.cos(PIx2 * x[i])) + 10.0; } return (sum); }
[ "static", "public", "double", "rastrigin", "(", "double", "[", "]", "x", ")", "{", "double", "sum", "=", "0.0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "x", ".", "length", ";", "i", "++", ")", "{", "sum", "+=", "(", "x", "[", ...
Rastrigin's function
[ "Rastrigin", "s", "function" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java#L269-L278
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java
Benchmark.rastriginNonCont
static public double rastriginNonCont(double[] x) { double sum = 0.0; double currX; for (int i = 0; i < x.length; i++) { currX = myXRound(x[i]); sum += (currX * currX) - (10.0 * Math.cos(PIx2 * currX)) + 10.0; } return (sum); }
java
static public double rastriginNonCont(double[] x) { double sum = 0.0; double currX; for (int i = 0; i < x.length; i++) { currX = myXRound(x[i]); sum += (currX * currX) - (10.0 * Math.cos(PIx2 * currX)) + 10.0; } return (sum); }
[ "static", "public", "double", "rastriginNonCont", "(", "double", "[", "]", "x", ")", "{", "double", "sum", "=", "0.0", ";", "double", "currX", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "x", ".", "length", ";", "i", "++", ")", "{", "...
Non-Continuous Rastrigin's function
[ "Non", "-", "Continuous", "Rastrigin", "s", "function" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java#L281-L292
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java
Benchmark.ScafferF6
static public double ScafferF6(double x, double y) { double temp1 = x * x + y * y; double temp2 = Math.sin(Math.sqrt(temp1)); double temp3 = 1.0 + 0.001 * temp1; return (0.5 + ((temp2 * temp2 - 0.5) / (temp3 * temp3))); }
java
static public double ScafferF6(double x, double y) { double temp1 = x * x + y * y; double temp2 = Math.sin(Math.sqrt(temp1)); double temp3 = 1.0 + 0.001 * temp1; return (0.5 + ((temp2 * temp2 - 0.5) / (temp3 * temp3))); }
[ "static", "public", "double", "ScafferF6", "(", "double", "x", ",", "double", "y", ")", "{", "double", "temp1", "=", "x", "*", "x", "+", "y", "*", "y", ";", "double", "temp2", "=", "Math", ".", "sin", "(", "Math", ".", "sqrt", "(", "temp1", ")", ...
Scaffer's F6 function
[ "Scaffer", "s", "F6", "function" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java#L330-L335
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java
Benchmark.EScafferF6
static public double EScafferF6(double[] x) { double sum = 0.0; for (int i = 1; i < x.length; i++) { sum += ScafferF6(x[i - 1], x[i]); } sum += ScafferF6(x[x.length - 1], x[0]); return (sum); }
java
static public double EScafferF6(double[] x) { double sum = 0.0; for (int i = 1; i < x.length; i++) { sum += ScafferF6(x[i - 1], x[i]); } sum += ScafferF6(x[x.length - 1], x[0]); return (sum); }
[ "static", "public", "double", "EScafferF6", "(", "double", "[", "]", "x", ")", "{", "double", "sum", "=", "0.0", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "x", ".", "length", ";", "i", "++", ")", "{", "sum", "+=", "ScafferF6", "(", ...
Expanded Scaffer's F6 function
[ "Expanded", "Scaffer", "s", "F6", "function" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java#L338-L348
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java
Benchmark.EScafferF6NonCont
static public double EScafferF6NonCont(double[] x) { double sum = 0.0; double prevX, currX; currX = myXRound(x[0]); for (int i = 1; i < x.length; i++) { prevX = currX; currX = myXRound(x[i]); sum += ScafferF6(prevX, currX); } prevX = currX; currX = myXRound(x[0]); sum...
java
static public double EScafferF6NonCont(double[] x) { double sum = 0.0; double prevX, currX; currX = myXRound(x[0]); for (int i = 1; i < x.length; i++) { prevX = currX; currX = myXRound(x[i]); sum += ScafferF6(prevX, currX); } prevX = currX; currX = myXRound(x[0]); sum...
[ "static", "public", "double", "EScafferF6NonCont", "(", "double", "[", "]", "x", ")", "{", "double", "sum", "=", "0.0", ";", "double", "prevX", ",", "currX", ";", "currX", "=", "myXRound", "(", "x", "[", "0", "]", ")", ";", "for", "(", "int", "i", ...
Non-Continuous Expanded Scaffer's F6 function
[ "Non", "-", "Continuous", "Expanded", "Scaffer", "s", "F6", "function" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/singleobjective/cec2005competitioncode/Benchmark.java#L351-L367
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/mochc/MOCHC.java
MOCHC.hammingDistance
private int hammingDistance(BinarySolution solutionOne, BinarySolution solutionTwo) { int distance = 0; for (int i = 0; i < problem.getNumberOfVariables(); i++) { distance += hammingDistance(solutionOne.getVariableValue(i), solutionTwo.getVariableValue(i)); } return distance; }
java
private int hammingDistance(BinarySolution solutionOne, BinarySolution solutionTwo) { int distance = 0; for (int i = 0; i < problem.getNumberOfVariables(); i++) { distance += hammingDistance(solutionOne.getVariableValue(i), solutionTwo.getVariableValue(i)); } return distance; }
[ "private", "int", "hammingDistance", "(", "BinarySolution", "solutionOne", ",", "BinarySolution", "solutionTwo", ")", "{", "int", "distance", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "problem", ".", "getNumberOfVariables", "(", ")", ...
Calculate the hamming distance between two solutions @param solutionOne A <code>Solution</code> @param solutionTwo A <code>Solution</code> @return the hamming distance between solutions
[ "Calculate", "the", "hamming", "distance", "between", "two", "solutions" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/mochc/MOCHC.java#L192-L199
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/ErrorRatio.java
ErrorRatio.er
private double er(Front front, Front referenceFront) throws JMetalException { int numberOfObjectives = referenceFront.getPointDimensions() ; double sum = 0; for (int i = 0; i < front.getNumberOfPoints(); i++) { Point currentPoint = front.getPoint(i); boolean thePointIsInTheParetoFront = f...
java
private double er(Front front, Front referenceFront) throws JMetalException { int numberOfObjectives = referenceFront.getPointDimensions() ; double sum = 0; for (int i = 0; i < front.getNumberOfPoints(); i++) { Point currentPoint = front.getPoint(i); boolean thePointIsInTheParetoFront = f...
[ "private", "double", "er", "(", "Front", "front", ",", "Front", "referenceFront", ")", "throws", "JMetalException", "{", "int", "numberOfObjectives", "=", "referenceFront", ".", "getPointDimensions", "(", ")", ";", "double", "sum", "=", "0", ";", "for", "(", ...
Returns the value of the error ratio indicator. @param front Solution front @param referenceFront True Pareto front @return the value of the error ratio indicator @throws JMetalException
[ "Returns", "the", "value", "of", "the", "error", "ratio", "indicator", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/ErrorRatio.java#L83-L110
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/point/util/comparator/LexicographicalPointComparator.java
LexicographicalPointComparator.compare
@Override public int compare(Point pointOne, Point pointTwo) { if (pointOne == null) { throw new JMetalException("PointOne is null") ; } else if (pointTwo == null) { throw new JMetalException("PointTwo is null"); } // Determine the first i such as pointOne[i] != pointTwo[i]; int inde...
java
@Override public int compare(Point pointOne, Point pointTwo) { if (pointOne == null) { throw new JMetalException("PointOne is null") ; } else if (pointTwo == null) { throw new JMetalException("PointTwo is null"); } // Determine the first i such as pointOne[i] != pointTwo[i]; int inde...
[ "@", "Override", "public", "int", "compare", "(", "Point", "pointOne", ",", "Point", "pointTwo", ")", "{", "if", "(", "pointOne", "==", "null", ")", "{", "throw", "new", "JMetalException", "(", "\"PointOne is null\"", ")", ";", "}", "else", "if", "(", "p...
The compare method compare the objects o1 and o2. @param pointOne An object that reference a double[] @param pointTwo An object that reference a double[] @return The following value: -1 if point1 < point2, 1 if point1 > point2 or 0 in other case.
[ "The", "compare", "method", "compare", "the", "objects", "o1", "and", "o2", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/point/util/comparator/LexicographicalPointComparator.java#L25-L50
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/pseudorandom/impl/ExtendedPseudoRandomGenerator.java
ExtendedPseudoRandomGenerator.randNormal
public double randNormal(double mean, double standardDeviation) { double x1, x2, w, y1; do { x1 = 2.0 * randomGenerator.nextDouble() - 1.0; x2 = 2.0 * randomGenerator.nextDouble() - 1.0; w = x1 * x1 + x2 * x2; } while (w >= 1.0); w = Math.sqrt((-2.0 * Math.log(w)) / w); y1 = x1 *...
java
public double randNormal(double mean, double standardDeviation) { double x1, x2, w, y1; do { x1 = 2.0 * randomGenerator.nextDouble() - 1.0; x2 = 2.0 * randomGenerator.nextDouble() - 1.0; w = x1 * x1 + x2 * x2; } while (w >= 1.0); w = Math.sqrt((-2.0 * Math.log(w)) / w); y1 = x1 *...
[ "public", "double", "randNormal", "(", "double", "mean", ",", "double", "standardDeviation", ")", "{", "double", "x1", ",", "x2", ",", "w", ",", "y1", ";", "do", "{", "x1", "=", "2.0", "*", "randomGenerator", ".", "nextDouble", "(", ")", "-", "1.0", ...
Use the polar form of the Box-Muller transformation to obtain a pseudo random number from a Gaussian distribution Code taken from Maurice Clerc's implementation @param mean @param standardDeviation @return A pseudo random number
[ "Use", "the", "polar", "form", "of", "the", "Box", "-", "Muller", "transformation", "to", "obtain", "a", "pseudo", "random", "number", "from", "a", "Gaussian", "distribution", "Code", "taken", "from", "Maurice", "Clerc", "s", "implementation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/pseudorandom/impl/ExtendedPseudoRandomGenerator.java#L58-L71
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/pseudorandom/impl/ExtendedPseudoRandomGenerator.java
ExtendedPseudoRandomGenerator.randSphere
public double[] randSphere(int dimension, double center, double radius) { int d = dimension; double[] x = new double[dimension]; double length = 0; for (int i = 0; i < dimension; i++) { x[i] = 0.0; } // --------- Step 1. Direction for (int i = 0; i < d; i++) { x[i] = randNorma...
java
public double[] randSphere(int dimension, double center, double radius) { int d = dimension; double[] x = new double[dimension]; double length = 0; for (int i = 0; i < dimension; i++) { x[i] = 0.0; } // --------- Step 1. Direction for (int i = 0; i < d; i++) { x[i] = randNorma...
[ "public", "double", "[", "]", "randSphere", "(", "int", "dimension", ",", "double", "center", ",", "double", "radius", ")", "{", "int", "d", "=", "dimension", ";", "double", "[", "]", "x", "=", "new", "double", "[", "dimension", "]", ";", "double", "...
Ger a random point from an hypersphere Code taken from Maurice Clerc's implementation @param center @param radius @return A pseudo random number
[ "Ger", "a", "random", "point", "from", "an", "hypersphere", "Code", "taken", "from", "Maurice", "Clerc", "s", "implementation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/pseudorandom/impl/ExtendedPseudoRandomGenerator.java#L117-L144
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG9.java
WFG9.t1
public float[] t1(float[] z, int k) { float[] result = new float[z.length]; float[] w = new float[z.length]; for (int i = 0; i < w.length; i++) { w[i] = (float) 1.0; } for (int i = 0; i < z.length - 1; i++) { int head = i + 1; int tail = z.length - 1; float[] sub...
java
public float[] t1(float[] z, int k) { float[] result = new float[z.length]; float[] w = new float[z.length]; for (int i = 0; i < w.length; i++) { w[i] = (float) 1.0; } for (int i = 0; i < z.length - 1; i++) { int head = i + 1; int tail = z.length - 1; float[] sub...
[ "public", "float", "[", "]", "t1", "(", "float", "[", "]", "z", ",", "int", "k", ")", "{", "float", "[", "]", "result", "=", "new", "float", "[", "z", ".", "length", "]", ";", "float", "[", "]", "w", "=", "new", "float", "[", "z", ".", "len...
WFG9 t1 transformation
[ "WFG9", "t1", "transformation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG9.java#L65-L85
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG9.java
WFG9.t2
public float[] t2(float[] z, int k) { float[] result = new float[z.length]; for (int i = 0; i < k; i++) { result[i] = (new Transformations()).sDecept(z[i], (float) 0.35, (float) 0.001, (float) 0.05); } for (int i = k; i < z.length; i++) { result[i] = (new Transformations()).sMulti(...
java
public float[] t2(float[] z, int k) { float[] result = new float[z.length]; for (int i = 0; i < k; i++) { result[i] = (new Transformations()).sDecept(z[i], (float) 0.35, (float) 0.001, (float) 0.05); } for (int i = k; i < z.length; i++) { result[i] = (new Transformations()).sMulti(...
[ "public", "float", "[", "]", "t2", "(", "float", "[", "]", "z", ",", "int", "k", ")", "{", "float", "[", "]", "result", "=", "new", "float", "[", "z", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "k", ";", "i"...
WFG9 t2 transformation
[ "WFG9", "t2", "transformation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG9.java#L90-L102
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG9.java
WFG9.t3
public float[] t3(float[] z, int k, int M) { float[] result = new float[M]; for (int i = 1; i <= M - 1; i++) { int head = (i - 1) * k / (M - 1) + 1; int tail = i * k / (M - 1); float[] subZ = subVector(z, head - 1, tail - 1); result[i - 1] = (new Transformations()).rNonsep(subZ, ...
java
public float[] t3(float[] z, int k, int M) { float[] result = new float[M]; for (int i = 1; i <= M - 1; i++) { int head = (i - 1) * k / (M - 1) + 1; int tail = i * k / (M - 1); float[] subZ = subVector(z, head - 1, tail - 1); result[i - 1] = (new Transformations()).rNonsep(subZ, ...
[ "public", "float", "[", "]", "t3", "(", "float", "[", "]", "z", ",", "int", "k", ",", "int", "M", ")", "{", "float", "[", "]", "result", "=", "new", "float", "[", "M", "]", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<=", "M", "-", ...
WFG9 t3 transformation
[ "WFG9", "t3", "transformation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG9.java#L107-L124
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/solution/util/RepairDoubleSolutionAtBounds.java
RepairDoubleSolutionAtBounds.repairSolutionVariableValue
public double repairSolutionVariableValue(double value, double lowerBound, double upperBound) { if (lowerBound > upperBound) { throw new JMetalException("The lower bound (" + lowerBound + ") is greater than the " + "upper bound (" + upperBound+")") ; } double result = value ; if (value ...
java
public double repairSolutionVariableValue(double value, double lowerBound, double upperBound) { if (lowerBound > upperBound) { throw new JMetalException("The lower bound (" + lowerBound + ") is greater than the " + "upper bound (" + upperBound+")") ; } double result = value ; if (value ...
[ "public", "double", "repairSolutionVariableValue", "(", "double", "value", ",", "double", "lowerBound", ",", "double", "upperBound", ")", "{", "if", "(", "lowerBound", ">", "upperBound", ")", "{", "throw", "new", "JMetalException", "(", "\"The lower bound (\"", "+...
Checks if the value is between its bounds; if not, the lower or upper bound is returned @param value The value to be checked @param lowerBound @param upperBound @return The same value if it is in the limits or a repaired value otherwise
[ "Checks", "if", "the", "value", "is", "between", "its", "bounds", ";", "if", "not", "the", "lower", "or", "upper", "bound", "is", "returned" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/solution/util/RepairDoubleSolutionAtBounds.java#L18-L33
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/zdt/ZDT4.java
ZDT4.evalG
public double evalG(DoubleSolution solution) { double g = 0.0; for (int var = 1; var < solution.getNumberOfVariables(); var++) { g += Math.pow(solution.getVariableValue(var), 2.0) + -10.0 * Math.cos(4.0 * Math.PI * solution.getVariableValue(var)); } double constant = 1.0 + 10.0 * (...
java
public double evalG(DoubleSolution solution) { double g = 0.0; for (int var = 1; var < solution.getNumberOfVariables(); var++) { g += Math.pow(solution.getVariableValue(var), 2.0) + -10.0 * Math.cos(4.0 * Math.PI * solution.getVariableValue(var)); } double constant = 1.0 + 10.0 * (...
[ "public", "double", "evalG", "(", "DoubleSolution", "solution", ")", "{", "double", "g", "=", "0.0", ";", "for", "(", "int", "var", "=", "1", ";", "var", "<", "solution", ".", "getNumberOfVariables", "(", ")", ";", "var", "++", ")", "{", "g", "+=", ...
Returns the value of the ZDT4 function G. @param solution Solution
[ "Returns", "the", "value", "of", "the", "ZDT4", "function", "G", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/zdt/ZDT4.java#L67-L76
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/neighborhood/impl/AdaptiveRandomNeighborhood.java
AdaptiveRandomNeighborhood.createNeighborhoods
private void createNeighborhoods() { neighbours = new ArrayList<List<Integer>>(solutionListSize); for (int i = 0; i < solutionListSize; i++) { neighbours.add(new ArrayList<Integer>()); neighbours.get(i).add(i); } }
java
private void createNeighborhoods() { neighbours = new ArrayList<List<Integer>>(solutionListSize); for (int i = 0; i < solutionListSize; i++) { neighbours.add(new ArrayList<Integer>()); neighbours.get(i).add(i); } }
[ "private", "void", "createNeighborhoods", "(", ")", "{", "neighbours", "=", "new", "ArrayList", "<", "List", "<", "Integer", ">", ">", "(", "solutionListSize", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "solutionListSize", ";", "i", "++...
Initialize all the neighborhoods, adding the current solution to them.
[ "Initialize", "all", "the", "neighborhoods", "adding", "the", "current", "solution", "to", "them", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/neighborhood/impl/AdaptiveRandomNeighborhood.java#L59-L66
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/neighborhood/impl/AdaptiveRandomNeighborhood.java
AdaptiveRandomNeighborhood.addRandomNeighbors
private void addRandomNeighbors() { for (int i = 0; i < solutionListSize; i++) { while(neighbours.get(i).size() <= numberOfRandomNeighbours) { int random = randomGenerator.getRandomValue(0, solutionListSize - 1); neighbours.get(i).add(random) ; } } }
java
private void addRandomNeighbors() { for (int i = 0; i < solutionListSize; i++) { while(neighbours.get(i).size() <= numberOfRandomNeighbours) { int random = randomGenerator.getRandomValue(0, solutionListSize - 1); neighbours.get(i).add(random) ; } } }
[ "private", "void", "addRandomNeighbors", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "solutionListSize", ";", "i", "++", ")", "{", "while", "(", "neighbours", ".", "get", "(", "i", ")", ".", "size", "(", ")", "<=", "numberOfRand...
Add random neighbors to all the neighborhoods
[ "Add", "random", "neighbors", "to", "all", "the", "neighborhoods" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/neighborhood/impl/AdaptiveRandomNeighborhood.java#L71-L78
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/zdt/ZDT6.java
ZDT6.evalG
protected double evalG(DoubleSolution solution) { double g = 0.0; for (int var = 1; var < solution.getNumberOfVariables(); var++) { g += solution.getVariableValue(var); } g = g / (solution.getNumberOfVariables() - 1); g = Math.pow(g, 0.25); g = 9.0 * g; g = 1.0 + g; return g; }
java
protected double evalG(DoubleSolution solution) { double g = 0.0; for (int var = 1; var < solution.getNumberOfVariables(); var++) { g += solution.getVariableValue(var); } g = g / (solution.getNumberOfVariables() - 1); g = Math.pow(g, 0.25); g = 9.0 * g; g = 1.0 + g; return g; }
[ "protected", "double", "evalG", "(", "DoubleSolution", "solution", ")", "{", "double", "g", "=", "0.0", ";", "for", "(", "int", "var", "=", "1", ";", "var", "<", "solution", ".", "getNumberOfVariables", "(", ")", ";", "var", "++", ")", "{", "g", "+="...
Returns the value of the ZDT6 function G. @param solution Solution
[ "Returns", "the", "value", "of", "the", "ZDT6", "function", "G", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/zdt/ZDT6.java#L52-L62
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/operator/impl/crossover/SinglePointCrossover.java
SinglePointCrossover.doCrossover
public List<BinarySolution> doCrossover(double probability, BinarySolution parent1, BinarySolution parent2) { List<BinarySolution> offspring = new ArrayList<>(2); offspring.add((BinarySolution) parent1.copy()) ; offspring.add((BinarySolution) parent2.copy()) ; if (crossoverRandomGenerator.getRand...
java
public List<BinarySolution> doCrossover(double probability, BinarySolution parent1, BinarySolution parent2) { List<BinarySolution> offspring = new ArrayList<>(2); offspring.add((BinarySolution) parent1.copy()) ; offspring.add((BinarySolution) parent2.copy()) ; if (crossoverRandomGenerator.getRand...
[ "public", "List", "<", "BinarySolution", ">", "doCrossover", "(", "double", "probability", ",", "BinarySolution", "parent1", ",", "BinarySolution", "parent2", ")", "{", "List", "<", "BinarySolution", ">", "offspring", "=", "new", "ArrayList", "<>", "(", "2", "...
Perform the crossover operation. @param probability Crossover setProbability @param parent1 The first parent @param parent2 The second parent @return An array containing the two offspring
[ "Perform", "the", "crossover", "operation", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/operator/impl/crossover/SinglePointCrossover.java#L74-L120
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/neighborhood/util/TwoDimensionalMesh.java
TwoDimensionalMesh.getNeighbor
private int getNeighbor(int solution, int [] neighbor) { int row = getRow(solution) ; int col = getColumn((solution)) ; int r ; int c ; r = (row + neighbor[0]) % this.rows ; if (r < 0) r = rows - 1; c = (col + neighbor[1]) % this.columns ; if (c < 0) c = columns - 1 ; ...
java
private int getNeighbor(int solution, int [] neighbor) { int row = getRow(solution) ; int col = getColumn((solution)) ; int r ; int c ; r = (row + neighbor[0]) % this.rows ; if (r < 0) r = rows - 1; c = (col + neighbor[1]) % this.columns ; if (c < 0) c = columns - 1 ; ...
[ "private", "int", "getNeighbor", "(", "int", "solution", ",", "int", "[", "]", "neighbor", ")", "{", "int", "row", "=", "getRow", "(", "solution", ")", ";", "int", "col", "=", "getColumn", "(", "(", "solution", ")", ")", ";", "int", "r", ";", "int"...
Returns the neighbor of solution @param solution Represents the location of the solution @param neighbor Represents the neighbor we want to get as a shift of solution. The first component represents the shift on rows, and the second the shift on column @return
[ "Returns", "the", "neighbor", "of", "solution" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/neighborhood/util/TwoDimensionalMesh.java#L77-L93
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/neighborhood/util/TwoDimensionalMesh.java
TwoDimensionalMesh.findNeighbors
private List<S> findNeighbors(List<S> solutionSet, int solution, int [][] neighborhood) { List<S> neighbors = new ArrayList<>(neighborhood.length+1); for (int [] neighbor : neighborhood) { int index = getNeighbor(solution, neighbor) ; neighbors.add(solutionSet.get(index)); } return neighbo...
java
private List<S> findNeighbors(List<S> solutionSet, int solution, int [][] neighborhood) { List<S> neighbors = new ArrayList<>(neighborhood.length+1); for (int [] neighbor : neighborhood) { int index = getNeighbor(solution, neighbor) ; neighbors.add(solutionSet.get(index)); } return neighbo...
[ "private", "List", "<", "S", ">", "findNeighbors", "(", "List", "<", "S", ">", "solutionSet", ",", "int", "solution", ",", "int", "[", "]", "[", "]", "neighborhood", ")", "{", "List", "<", "S", ">", "neighbors", "=", "new", "ArrayList", "<>", "(", ...
Returns a solutionSet containing the neighbors of a given solution @param solutionSet From where neighbors will be obtained @param solution The solution for which the neighbors will be computed @param neighborhood The list of neighbors we want to obtain as shift regarding to solution @return
[ "Returns", "a", "solutionSet", "containing", "the", "neighbors", "of", "a", "given", "solution" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/neighborhood/util/TwoDimensionalMesh.java#L102-L111
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/lz09/LZ09.java
LZ09.betaFunction
double betaFunction(List<Double> x, int type) { double beta; beta = 0; int dim = x.size(); if (dim == 0) { beta = 0; } if (type == 1) { beta = 0; for (int i = 0; i < dim; i++) { beta += x.get(i) * x.get(i); } beta = 2.0 * beta / dim; } if (type ==...
java
double betaFunction(List<Double> x, int type) { double beta; beta = 0; int dim = x.size(); if (dim == 0) { beta = 0; } if (type == 1) { beta = 0; for (int i = 0; i < dim; i++) { beta += x.get(i) * x.get(i); } beta = 2.0 * beta / dim; } if (type ==...
[ "double", "betaFunction", "(", "List", "<", "Double", ">", "x", ",", "int", "type", ")", "{", "double", "beta", ";", "beta", "=", "0", ";", "int", "dim", "=", "x", ".", "size", "(", ")", ";", "if", "(", "dim", "==", "0", ")", "{", "beta", "="...
control the distance
[ "control", "the", "distance" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/lz09/LZ09.java#L82-L127
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/lz09/LZ09.java
LZ09.psfunc3
double psfunc3(double x, double t1, double t2, int dim, int type) { // type: the type of curve // css: the class of index double beta; beta = 0.0; dim++; if (type == 31) { double xy = 4 * (x - 0.5); double rate = 1.0 * dim / nvar; beta = xy - 4 * (t1 * t1 * rate + t2 * (1...
java
double psfunc3(double x, double t1, double t2, int dim, int type) { // type: the type of curve // css: the class of index double beta; beta = 0.0; dim++; if (type == 31) { double xy = 4 * (x - 0.5); double rate = 1.0 * dim / nvar; beta = xy - 4 * (t1 * t1 * rate + t2 * (1...
[ "double", "psfunc3", "(", "double", "x", ",", "double", "t1", ",", "double", "t2", ",", "int", "dim", ",", "int", "type", ")", "{", "// type: the type of curve ", "// css: the class of index", "double", "beta", ";", "beta", "=", "0.0", ";", "dim", "++", ...
control the PS shapes of 3-D instances
[ "control", "the", "PS", "shapes", "of", "3", "-", "D", "instances" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/lz09/LZ09.java#L200-L221
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/comparator/ObjectiveComparator.java
ObjectiveComparator.compare
@Override public int compare(S solution1, S solution2) { int result ; if (solution1 == null) { if (solution2 == null) { result = 0; } else { result = 1; } } else if (solution2 == null) { result = -1; } else if (solution1.getNumberOfObjectives() <= o...
java
@Override public int compare(S solution1, S solution2) { int result ; if (solution1 == null) { if (solution2 == null) { result = 0; } else { result = 1; } } else if (solution2 == null) { result = -1; } else if (solution1.getNumberOfObjectives() <= o...
[ "@", "Override", "public", "int", "compare", "(", "S", "solution1", ",", "S", "solution2", ")", "{", "int", "result", ";", "if", "(", "solution1", "==", "null", ")", "{", "if", "(", "solution2", "==", "null", ")", "{", "result", "=", "0", ";", "}",...
Compares two solutions according to a given objective. @param solution1 The first solution @param solution2 The second solution @return -1, or 0, or 1 if solution1 is less than, equal, or greater than solution2, respectively, according to the established order
[ "Compares", "two", "solutions", "according", "to", "a", "given", "objective", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/comparator/ObjectiveComparator.java#L49-L76
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/archive/impl/NonDominatedSolutionListArchive.java
NonDominatedSolutionListArchive.add
@Override public boolean add(S solution) { boolean solutionInserted = false ; if (solutionList.size() == 0) { solutionList.add(solution) ; solutionInserted = true ; } else { Iterator<S> iterator = solutionList.iterator(); boolean isDominated = false; boolean isContaine...
java
@Override public boolean add(S solution) { boolean solutionInserted = false ; if (solutionList.size() == 0) { solutionList.add(solution) ; solutionInserted = true ; } else { Iterator<S> iterator = solutionList.iterator(); boolean isDominated = false; boolean isContaine...
[ "@", "Override", "public", "boolean", "add", "(", "S", "solution", ")", "{", "boolean", "solutionInserted", "=", "false", ";", "if", "(", "solutionList", ".", "size", "(", ")", "==", "0", ")", "{", "solutionList", ".", "add", "(", "solution", ")", ";",...
Inserts a solution in the list @param solution The solution to be inserted. @return true if the operation success, and false if the solution is dominated or if an identical individual exists. The decision variables can be null if the solution is read from a file; in that case, the domination tests are omitted
[ "Inserts", "a", "solution", "in", "the", "list" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/archive/impl/NonDominatedSolutionListArchive.java#L54-L88
train
jMetal/jMetal
jmetal-exec/src/main/java/org/uma/jmetal/qualityIndicator/CommandLineIndicatorRunner.java
CommandLineIndicatorRunner.checkAboutNormalization
private static boolean checkAboutNormalization(String args[]) { boolean normalize = false ; if (args.length == 4) { if (args[3].equals("TRUE")) { normalize = true; } else if (args[3].equals("FALSE")) { normalize = false; } else { throw new JMetalException("The value for...
java
private static boolean checkAboutNormalization(String args[]) { boolean normalize = false ; if (args.length == 4) { if (args[3].equals("TRUE")) { normalize = true; } else if (args[3].equals("FALSE")) { normalize = false; } else { throw new JMetalException("The value for...
[ "private", "static", "boolean", "checkAboutNormalization", "(", "String", "args", "[", "]", ")", "{", "boolean", "normalize", "=", "false", ";", "if", "(", "args", ".", "length", "==", "4", ")", "{", "if", "(", "args", "[", "3", "]", ".", "equals", "...
Checks if normalization is set @param args @return
[ "Checks", "if", "normalization", "is", "set" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-exec/src/main/java/org/uma/jmetal/qualityIndicator/CommandLineIndicatorRunner.java#L55-L68
train
jMetal/jMetal
jmetal-exec/src/main/java/org/uma/jmetal/qualityIndicator/CommandLineIndicatorRunner.java
CommandLineIndicatorRunner.getIndicatorFromName
private static QualityIndicator<List<PointSolution>, Double> getIndicatorFromName( String name, List<QualityIndicator<List<PointSolution>, Double>> list) { QualityIndicator<List<PointSolution>, Double> result = null ; for (QualityIndicator<List<PointSolution>, Double> indicator : list) { if (indica...
java
private static QualityIndicator<List<PointSolution>, Double> getIndicatorFromName( String name, List<QualityIndicator<List<PointSolution>, Double>> list) { QualityIndicator<List<PointSolution>, Double> result = null ; for (QualityIndicator<List<PointSolution>, Double> indicator : list) { if (indica...
[ "private", "static", "QualityIndicator", "<", "List", "<", "PointSolution", ">", ",", "Double", ">", "getIndicatorFromName", "(", "String", "name", ",", "List", "<", "QualityIndicator", "<", "List", "<", "PointSolution", ">", ",", "Double", ">", ">", "list", ...
Given an indicator name, finds the indicator in the list of indicator @param name @param list @return
[ "Given", "an", "indicator", "name", "finds", "the", "indicator", "in", "the", "list", "of", "indicator" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-exec/src/main/java/org/uma/jmetal/qualityIndicator/CommandLineIndicatorRunner.java#L157-L172
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/distance/impl/DistanceBetweenSolutionAndKNearestNeighbors.java
DistanceBetweenSolutionAndKNearestNeighbors.getDistance
@Override public double getDistance(S solution, L solutionList) { List<Double> listOfDistances = knnDistances(solution, solutionList) ; listOfDistances.sort(Comparator.naturalOrder()); int limit = Math.min(k, listOfDistances.size()) ; double result ; if (limit == 0) { result = 0.0 ; } ...
java
@Override public double getDistance(S solution, L solutionList) { List<Double> listOfDistances = knnDistances(solution, solutionList) ; listOfDistances.sort(Comparator.naturalOrder()); int limit = Math.min(k, listOfDistances.size()) ; double result ; if (limit == 0) { result = 0.0 ; } ...
[ "@", "Override", "public", "double", "getDistance", "(", "S", "solution", ",", "L", "solutionList", ")", "{", "List", "<", "Double", ">", "listOfDistances", "=", "knnDistances", "(", "solution", ",", "solutionList", ")", ";", "listOfDistances", ".", "sort", ...
Computes the knn distance. If the solution list size is lower than k, then k = size in the computation @param solution @param solutionList @return
[ "Computes", "the", "knn", "distance", ".", "If", "the", "solution", "list", "size", "is", "lower", "than", "k", "then", "k", "=", "size", "in", "the", "computation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/distance/impl/DistanceBetweenSolutionAndKNearestNeighbors.java#L37-L55
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/distance/impl/DistanceBetweenSolutionAndKNearestNeighbors.java
DistanceBetweenSolutionAndKNearestNeighbors.knnDistances
private List<Double> knnDistances(S solution, L solutionList) { List<Double> listOfDistances = new ArrayList<>() ; for (int i = 0 ; i< solutionList.size(); i++) { double distanceBetweenSolutions = distance.getDistance(solution, solutionList.get(i)) ; if (distanceBetweenSolutions != 0) { list...
java
private List<Double> knnDistances(S solution, L solutionList) { List<Double> listOfDistances = new ArrayList<>() ; for (int i = 0 ; i< solutionList.size(); i++) { double distanceBetweenSolutions = distance.getDistance(solution, solutionList.get(i)) ; if (distanceBetweenSolutions != 0) { list...
[ "private", "List", "<", "Double", ">", "knnDistances", "(", "S", "solution", ",", "L", "solutionList", ")", "{", "List", "<", "Double", ">", "listOfDistances", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", ...
Computes the distance between a solution and the solutions of a list. Distances equal to 0 are ignored. @param solution @param solutionList @return A list with the distances
[ "Computes", "the", "distance", "between", "a", "solution", "and", "the", "solutions", "of", "a", "list", ".", "Distances", "equal", "to", "0", "are", "ignored", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/distance/impl/DistanceBetweenSolutionAndKNearestNeighbors.java#L63-L73
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/comparator/RankingComparator.java
RankingComparator.compare
@Override public int compare(S solution1, S solution2) { int result ; if (solution1 == null) { if (solution2 == null) { result = 0; } else { result = 1; } } else if (solution2 == null) { result = -1; } else { int rank1 = Integer.MAX_VALUE; ...
java
@Override public int compare(S solution1, S solution2) { int result ; if (solution1 == null) { if (solution2 == null) { result = 0; } else { result = 1; } } else if (solution2 == null) { result = -1; } else { int rank1 = Integer.MAX_VALUE; ...
[ "@", "Override", "public", "int", "compare", "(", "S", "solution1", ",", "S", "solution2", ")", "{", "int", "result", ";", "if", "(", "solution1", "==", "null", ")", "{", "if", "(", "solution2", "==", "null", ")", "{", "result", "=", "0", ";", "}",...
Compares two solutions according to the ranking attribute. The lower the ranking the better @param solution1 Object representing the first solution. @param solution2 Object representing the second solution. @return -1, or 0, or 1 if o1 is less than, equal, or greater than o2, respectively.
[ "Compares", "two", "solutions", "according", "to", "the", "ranking", "attribute", ".", "The", "lower", "the", "ranking", "the", "better" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/comparator/RankingComparator.java#L27-L60
train
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG.java
WFG.calculateX
public float[] calculateX(float[] t) { float[] x = new float[m]; for (int i = 0; i < m - 1; i++) { x[i] = Math.max(t[m - 1], a[i]) * (t[i] - (float) 0.5) + (float) 0.5; } x[m - 1] = t[m - 1]; return x; }
java
public float[] calculateX(float[] t) { float[] x = new float[m]; for (int i = 0; i < m - 1; i++) { x[i] = Math.max(t[m - 1], a[i]) * (t[i] - (float) 0.5) + (float) 0.5; } x[m - 1] = t[m - 1]; return x; }
[ "public", "float", "[", "]", "calculateX", "(", "float", "[", "]", "t", ")", "{", "float", "[", "]", "x", "=", "new", "float", "[", "m", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "m", "-", "1", ";", "i", "++", ")", "{", ...
Gets the x vector
[ "Gets", "the", "x", "vector" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG.java#L72-L82
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/SolutionListUtils.java
SolutionListUtils.findIndexOfBestSolution
public static <S> int findIndexOfBestSolution(List<S> solutionList, Comparator<S> comparator) { if (solutionList == null) { throw new NullSolutionListException(); } else if (solutionList.isEmpty()) { throw new EmptySolutionListException(); } else if (comparator == null) { throw new JMetalE...
java
public static <S> int findIndexOfBestSolution(List<S> solutionList, Comparator<S> comparator) { if (solutionList == null) { throw new NullSolutionListException(); } else if (solutionList.isEmpty()) { throw new EmptySolutionListException(); } else if (comparator == null) { throw new JMetalE...
[ "public", "static", "<", "S", ">", "int", "findIndexOfBestSolution", "(", "List", "<", "S", ">", "solutionList", ",", "Comparator", "<", "S", ">", "comparator", ")", "{", "if", "(", "solutionList", "==", "null", ")", "{", "throw", "new", "NullSolutionListE...
Finds the index of the best solution in the list according to a comparator @param solutionList @param comparator @return The index of the best solution
[ "Finds", "the", "index", "of", "the", "best", "solution", "in", "the", "list", "according", "to", "a", "comparator" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/SolutionListUtils.java#L46-L70
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/SolutionListUtils.java
SolutionListUtils.normalize
public static List<? extends Solution<?>> normalize(List<? extends Solution<?>> solutions, double[] minValues, double[] maxValues) { List<Solution<?>> normalizedSolutions = new ArrayList<>(solutions.size()); for (Solution<?> solution : solutions) { normalizedSolutions.add(SolutionUtils.normalize(solution...
java
public static List<? extends Solution<?>> normalize(List<? extends Solution<?>> solutions, double[] minValues, double[] maxValues) { List<Solution<?>> normalizedSolutions = new ArrayList<>(solutions.size()); for (Solution<?> solution : solutions) { normalizedSolutions.add(SolutionUtils.normalize(solution...
[ "public", "static", "List", "<", "?", "extends", "Solution", "<", "?", ">", ">", "normalize", "(", "List", "<", "?", "extends", "Solution", "<", "?", ">", ">", "solutions", ",", "double", "[", "]", "minValues", ",", "double", "[", "]", "maxValues", "...
This method receives a list of non-dominated solutions and maximum and minimum values of the objectives, and returns a normalized set of solutions. @param solutions A list of non-dominated solutions @param maxValues The maximum values of the objectives @param minValues The minimum values of the objectives @return the ...
[ "This", "method", "receives", "a", "list", "of", "non", "-", "dominated", "solutions", "and", "maximum", "and", "minimum", "values", "of", "the", "objectives", "and", "returns", "a", "normalized", "set", "of", "solutions", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/SolutionListUtils.java#L137-L145
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/SolutionListUtils.java
SolutionListUtils.distanceMatrix
public static <S extends Solution<?>> double[][] distanceMatrix(List<S> solutionSet) { double[][] distance = new double[solutionSet.size()][solutionSet.size()]; for (int i = 0; i < solutionSet.size(); i++) { distance[i][i] = 0.0; for (int j = i + 1; j < solutionSet.size(); j++) { distance[i]...
java
public static <S extends Solution<?>> double[][] distanceMatrix(List<S> solutionSet) { double[][] distance = new double[solutionSet.size()][solutionSet.size()]; for (int i = 0; i < solutionSet.size(); i++) { distance[i][i] = 0.0; for (int j = i + 1; j < solutionSet.size(); j++) { distance[i]...
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "double", "[", "]", "[", "]", "distanceMatrix", "(", "List", "<", "S", ">", "solutionSet", ")", "{", "double", "[", "]", "[", "]", "distance", "=", "new", "double", "[", "solu...
Returns a matrix with the euclidean distance between each pair of solutions in the population. Distances are measured in the objective space @param solutionSet @return
[ "Returns", "a", "matrix", "with", "the", "euclidean", "distance", "between", "each", "pair", "of", "solutions", "in", "the", "population", ".", "Distances", "are", "measured", "in", "the", "objective", "space" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/SolutionListUtils.java#L248-L258
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/SolutionListUtils.java
SolutionListUtils.solutionListsAreEquals
public static <S> boolean solutionListsAreEquals(List<S> solutionList, List<S> newSolutionList) { boolean found; for (int i = 0; i < solutionList.size(); i++) { int j = 0; found = false; while (j < newSolutionList.size()) { if (soluti...
java
public static <S> boolean solutionListsAreEquals(List<S> solutionList, List<S> newSolutionList) { boolean found; for (int i = 0; i < solutionList.size(); i++) { int j = 0; found = false; while (j < newSolutionList.size()) { if (soluti...
[ "public", "static", "<", "S", ">", "boolean", "solutionListsAreEquals", "(", "List", "<", "S", ">", "solutionList", ",", "List", "<", "S", ">", "newSolutionList", ")", "{", "boolean", "found", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "so...
Compares two solution lists to determine if both are equals @param solutionList A <code>Solution list</code> @param newSolutionList A <code>Solution list</code> @return true if both are contains the same solutions, false in other case
[ "Compares", "two", "solution", "lists", "to", "determine", "if", "both", "are", "equals" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/SolutionListUtils.java#L278-L296
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/SolutionListUtils.java
SolutionListUtils.restart
public static <S> void restart(List<S> solutionList, Problem<S> problem, int percentageOfSolutionsToRemove) { if (solutionList == null) { throw new NullSolutionListException(); } else if (problem == null) { throw new JMetalException("The problem is null"); } else...
java
public static <S> void restart(List<S> solutionList, Problem<S> problem, int percentageOfSolutionsToRemove) { if (solutionList == null) { throw new NullSolutionListException(); } else if (problem == null) { throw new JMetalException("The problem is null"); } else...
[ "public", "static", "<", "S", ">", "void", "restart", "(", "List", "<", "S", ">", "solutionList", ",", "Problem", "<", "S", ">", "problem", ",", "int", "percentageOfSolutionsToRemove", ")", "{", "if", "(", "solutionList", "==", "null", ")", "{", "throw",...
This methods takes a list of solutions, removes a percentage of its solutions, and it is filled with new random generated solutions @param solutionList @param problem @param percentageOfSolutionsToRemove
[ "This", "methods", "takes", "a", "list", "of", "solutions", "removes", "a", "percentage", "of", "its", "solutions", "and", "it", "is", "filled", "with", "new", "random", "generated", "solutions" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/SolutionListUtils.java#L306-L321
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/SolutionListUtils.java
SolutionListUtils.removeSolutionsFromList
public static <S> void removeSolutionsFromList(List<S> solutionList, int numberOfSolutionsToRemove) { if (solutionList.size() < numberOfSolutionsToRemove) { throw new JMetalException("The list size (" + solutionList.size() + ") is lower than " + "the number of solutions to remove (" + numberOfSoluti...
java
public static <S> void removeSolutionsFromList(List<S> solutionList, int numberOfSolutionsToRemove) { if (solutionList.size() < numberOfSolutionsToRemove) { throw new JMetalException("The list size (" + solutionList.size() + ") is lower than " + "the number of solutions to remove (" + numberOfSoluti...
[ "public", "static", "<", "S", ">", "void", "removeSolutionsFromList", "(", "List", "<", "S", ">", "solutionList", ",", "int", "numberOfSolutionsToRemove", ")", "{", "if", "(", "solutionList", ".", "size", "(", ")", "<", "numberOfSolutionsToRemove", ")", "{", ...
Removes a number of solutions from a list @param solutionList The list of solutions @param numberOfSolutionsToRemove
[ "Removes", "a", "number", "of", "solutions", "from", "a", "list" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/SolutionListUtils.java#L329-L338
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/SolutionListUtils.java
SolutionListUtils.fillPopulationWithNewSolutions
public static <S> void fillPopulationWithNewSolutions( List<S> solutionList, Problem<S> problem, int maxListSize) { while (solutionList.size() < maxListSize) { solutionList.add(problem.createSolution()); } }
java
public static <S> void fillPopulationWithNewSolutions( List<S> solutionList, Problem<S> problem, int maxListSize) { while (solutionList.size() < maxListSize) { solutionList.add(problem.createSolution()); } }
[ "public", "static", "<", "S", ">", "void", "fillPopulationWithNewSolutions", "(", "List", "<", "S", ">", "solutionList", ",", "Problem", "<", "S", ">", "problem", ",", "int", "maxListSize", ")", "{", "while", "(", "solutionList", ".", "size", "(", ")", "...
Fills a population with new solutions until its size is maxListSize @param solutionList The list of solutions @param problem The problem being solved @param maxListSize The target size of the list @param <S> The type of the solutions to be created
[ "Fills", "a", "population", "with", "new", "solutions", "until", "its", "size", "is", "maxListSize" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/SolutionListUtils.java#L348-L355
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/solution/util/RepairDoubleSolutionAtRandom.java
RepairDoubleSolutionAtRandom.repairSolutionVariableValue
public double repairSolutionVariableValue(double value, double lowerBound, double upperBound) { if (lowerBound > upperBound) { throw new JMetalException("The lower bound (" + lowerBound + ") is greater than the " + "upper bound (" + upperBound+")") ; } double result = value ; if (value <...
java
public double repairSolutionVariableValue(double value, double lowerBound, double upperBound) { if (lowerBound > upperBound) { throw new JMetalException("The lower bound (" + lowerBound + ") is greater than the " + "upper bound (" + upperBound+")") ; } double result = value ; if (value <...
[ "public", "double", "repairSolutionVariableValue", "(", "double", "value", ",", "double", "lowerBound", ",", "double", "upperBound", ")", "{", "if", "(", "lowerBound", ">", "upperBound", ")", "{", "throw", "new", "JMetalException", "(", "\"The lower bound (\"", "+...
Checks if the value is between its bounds; if not, a random value between the limits is returned @param value The value to be checked @param lowerBound @param upperBound @return The same value if it is between the limits or a repaired value otherwise
[ "Checks", "if", "the", "value", "is", "between", "its", "bounds", ";", "if", "not", "a", "random", "value", "between", "the", "limits", "is", "returned" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/solution/util/RepairDoubleSolutionAtRandom.java#L35-L49
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/SolutionUtils.java
SolutionUtils.getBestSolution
public static <S extends Solution<?>> S getBestSolution(S solution1, S solution2, Comparator<S> comparator, BinaryOperator<S> equalityPolicy) { S result; int flag = comparator.compare(solution1, solution2); if (flag == -1) { result = solution1; } else if (flag == 1) { result = solution2; ...
java
public static <S extends Solution<?>> S getBestSolution(S solution1, S solution2, Comparator<S> comparator, BinaryOperator<S> equalityPolicy) { S result; int flag = comparator.compare(solution1, solution2); if (flag == -1) { result = solution1; } else if (flag == 1) { result = solution2; ...
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "S", "getBestSolution", "(", "S", "solution1", ",", "S", "solution2", ",", "Comparator", "<", "S", ">", "comparator", ",", "BinaryOperator", "<", "S", ">", "equalityPolicy", ")", "{...
Return the best solution between those passed as arguments. If they are equal or incomparable one of them is chosen based on the given policy. @return The best solution
[ "Return", "the", "best", "solution", "between", "those", "passed", "as", "arguments", ".", "If", "they", "are", "equal", "or", "incomparable", "one", "of", "them", "is", "chosen", "based", "on", "the", "given", "policy", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/SolutionUtils.java#L44-L56
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/SolutionUtils.java
SolutionUtils.distanceBetweenObjectives
public static <S extends Solution<?>> double distanceBetweenObjectives(S firstSolution, S secondSolution) { double diff; double distance = 0.0; //euclidean distance for (int nObj = 0; nObj < firstSolution.getNumberOfObjectives(); nObj++) { diff = firstSolution.getObjective(nObj) - secondSolution...
java
public static <S extends Solution<?>> double distanceBetweenObjectives(S firstSolution, S secondSolution) { double diff; double distance = 0.0; //euclidean distance for (int nObj = 0; nObj < firstSolution.getNumberOfObjectives(); nObj++) { diff = firstSolution.getObjective(nObj) - secondSolution...
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "double", "distanceBetweenObjectives", "(", "S", "firstSolution", ",", "S", "secondSolution", ")", "{", "double", "diff", ";", "double", "distance", "=", "0.0", ";", "//euclidean distance...
Returns the euclidean distance between a pair of solutions in the objective space
[ "Returns", "the", "euclidean", "distance", "between", "a", "pair", "of", "solutions", "in", "the", "objective", "space" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/SolutionUtils.java#L61-L73
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/SolutionUtils.java
SolutionUtils.distanceBetweenSolutionsInObjectiveSpace
public static double distanceBetweenSolutionsInObjectiveSpace(DoubleSolution solutionI, DoubleSolution solutionJ) { double distance = 0.0; double diff; for (int i = 0; i < solutionI.getNumberOfVariables(); i++) { diff = solutionI.getVariableValue(i) - solutionJ.getVariableValue(i); distance += ...
java
public static double distanceBetweenSolutionsInObjectiveSpace(DoubleSolution solutionI, DoubleSolution solutionJ) { double distance = 0.0; double diff; for (int i = 0; i < solutionI.getNumberOfVariables(); i++) { diff = solutionI.getVariableValue(i) - solutionJ.getVariableValue(i); distance += ...
[ "public", "static", "double", "distanceBetweenSolutionsInObjectiveSpace", "(", "DoubleSolution", "solutionI", ",", "DoubleSolution", "solutionJ", ")", "{", "double", "distance", "=", "0.0", ";", "double", "diff", ";", "for", "(", "int", "i", "=", "0", ";", "i", ...
Returns the distance between two solutions in the search space. @param solutionI The first <code>Solution</code>. @param solutionJ The second <code>Solution</code>. @return the distance between solutions.
[ "Returns", "the", "distance", "between", "two", "solutions", "in", "the", "search", "space", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/SolutionUtils.java#L117-L127
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/SolutionUtils.java
SolutionUtils.averageDistanceToSolutionList
public static <S extends Solution<?>> double averageDistanceToSolutionList( S solution, List<S> solutionList) { double sumOfDistances = 0.0; for (S sol : solutionList) { sumOfDistances += distanceBetweenObjectives( solution, sol); } return sumOfDis...
java
public static <S extends Solution<?>> double averageDistanceToSolutionList( S solution, List<S> solutionList) { double sumOfDistances = 0.0; for (S sol : solutionList) { sumOfDistances += distanceBetweenObjectives( solution, sol); } return sumOfDis...
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "double", "averageDistanceToSolutionList", "(", "S", "solution", ",", "List", "<", "S", ">", "solutionList", ")", "{", "double", "sumOfDistances", "=", "0.0", ";", "for", "(", "S", ...
Returns the average euclidean distance of a solution to the solutions of a list.
[ "Returns", "the", "average", "euclidean", "distance", "of", "a", "solution", "to", "the", "solutions", "of", "a", "list", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/SolutionUtils.java#L132-L144
train
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/SolutionUtils.java
SolutionUtils.normalize
public static Solution<?> normalize(Solution<?> solution, double[] minValues, double[] maxValues) { if (solution == null) { throw new JMetalException("The solution should not be null"); } if (minValues == null || maxValues == null) { throw new JMetalException("The minValues and maxValues should not be n...
java
public static Solution<?> normalize(Solution<?> solution, double[] minValues, double[] maxValues) { if (solution == null) { throw new JMetalException("The solution should not be null"); } if (minValues == null || maxValues == null) { throw new JMetalException("The minValues and maxValues should not be n...
[ "public", "static", "Solution", "<", "?", ">", "normalize", "(", "Solution", "<", "?", ">", "solution", ",", "double", "[", "]", "minValues", ",", "double", "[", "]", "maxValues", ")", "{", "if", "(", "solution", "==", "null", ")", "{", "throw", "new...
It returns the normalized solution given the minimum and maximum values for each objective @param solution to be normalized @param minValues minimum values for each objective @param maxValues maximum value for each objective @return normalized solution
[ "It", "returns", "the", "normalized", "solution", "given", "the", "minimum", "and", "maximum", "values", "for", "each", "objective" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/SolutionUtils.java#L155-L184
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/singleobjective/evolutionstrategy/util/CMAESUtils.java
CMAESUtils.tred2
public static void tred2(int n, double v[][], double d[], double e[]) { // This is derived from the Algol procedures tred2 by // Bowdler, Martin, Reinsch, and Wilkinson, Handbook for // Auto. Comp., Vol.ii-Linear Algebra, and the corresponding // Fortran subroutine in EISPACK. System.arraycopy...
java
public static void tred2(int n, double v[][], double d[], double e[]) { // This is derived from the Algol procedures tred2 by // Bowdler, Martin, Reinsch, and Wilkinson, Handbook for // Auto. Comp., Vol.ii-Linear Algebra, and the corresponding // Fortran subroutine in EISPACK. System.arraycopy...
[ "public", "static", "void", "tred2", "(", "int", "n", ",", "double", "v", "[", "]", "[", "]", ",", "double", "d", "[", "]", ",", "double", "e", "[", "]", ")", "{", "// This is derived from the Algol procedures tred2 by", "// Bowdler, Martin, Reinsch, and Wilki...
Symmetric Householder reduction to tridiagonal form, taken from JAMA package.
[ "Symmetric", "Householder", "reduction", "to", "tridiagonal", "form", "taken", "from", "JAMA", "package", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/singleobjective/evolutionstrategy/util/CMAESUtils.java#L12-L51
train
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/singleobjective/evolutionstrategy/util/CMAESUtils.java
CMAESUtils.tql2
public static void tql2(int n, double d[], double e[], double v[][]) { // This is derived from the Algol procedures tql2, by // Bowdler, Martin, Reinsch, and Wilkinson, Handbook for // Auto. Comp., Vol.ii-Linear Algebra, and the corresponding // Fortran subroutine in EISPACK. System.arraycopy(...
java
public static void tql2(int n, double d[], double e[], double v[][]) { // This is derived from the Algol procedures tql2, by // Bowdler, Martin, Reinsch, and Wilkinson, Handbook for // Auto. Comp., Vol.ii-Linear Algebra, and the corresponding // Fortran subroutine in EISPACK. System.arraycopy(...
[ "public", "static", "void", "tql2", "(", "int", "n", ",", "double", "d", "[", "]", ",", "double", "e", "[", "]", ",", "double", "v", "[", "]", "[", "]", ")", "{", "// This is derived from the Algol procedures tql2, by", "// Bowdler, Martin, Reinsch, and Wilkin...
Symmetric tridiagonal QL algorithm, taken from JAMA package.
[ "Symmetric", "tridiagonal", "QL", "algorithm", "taken", "from", "JAMA", "package", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/singleobjective/evolutionstrategy/util/CMAESUtils.java#L143-L194
train