id
int32
0
165k
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
54,700
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
54,701
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
54,702
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
54,703
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
54,704
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
54,705
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
54,706
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
54,707
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
54,708
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
54,709
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
54,710
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
54,711
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
54,712
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
54,713
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
54,714
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
54,715
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
54,716
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
54,717
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
54,718
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
54,719
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
54,720
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
54,721
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
54,722
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
54,723
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
54,724
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
54,725
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
54,726
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
54,727
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
54,728
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
54,729
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
54,730
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
54,731
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
54,732
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
54,733
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
54,734
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
54,735
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
54,736
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
54,737
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
54,738
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
54,739
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
54,740
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
54,741
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
54,742
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
54,743
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
54,744
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
54,745
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
54,746
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
54,747
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
54,748
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
54,749
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
54,750
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
54,751
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
54,752
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
54,753
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG5.java
WFG5.t1
public float[] t1(float[] z, int k) { float[] result = new float[z.length]; for (int i = 0; i < z.length; i++) { result[i] = (new Transformations()).sDecept(z[i], (float) 0.35, (float) 0.001, (float) 0.05); } return result; }
java
public float[] t1(float[] z, int k) { float[] result = new float[z.length]; for (int i = 0; i < z.length; i++) { result[i] = (new Transformations()).sDecept(z[i], (float) 0.35, (float) 0.001, (float) 0.05); } return result; }
[ "public", "float", "[", "]", "t1", "(", "float", "[", "]", "z", ",", "int", "k", ")", "{", "float", "[", "]", "result", "=", "new", "float", "[", "z", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "z", ".", "le...
WFG5 t1 transformation
[ "WFG5", "t1", "transformation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG5.java#L67-L75
54,754
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/ibea/IBEA.java
IBEA.calculateHypervolumeIndicator
double calculateHypervolumeIndicator(Solution<?> solutionA, Solution<?> solutionB, int d, double maximumValues[], double minimumValues[]) { double a, b, r, max; double volume ; double rho = 2.0; r = rho * (maximumValues[d - 1] - minimumValues[d - 1]); max = minimumValues[d - 1] + r; a = ...
java
double calculateHypervolumeIndicator(Solution<?> solutionA, Solution<?> solutionB, int d, double maximumValues[], double minimumValues[]) { double a, b, r, max; double volume ; double rho = 2.0; r = rho * (maximumValues[d - 1] - minimumValues[d - 1]); max = minimumValues[d - 1] + r; a = ...
[ "double", "calculateHypervolumeIndicator", "(", "Solution", "<", "?", ">", "solutionA", ",", "Solution", "<", "?", ">", "solutionB", ",", "int", "d", ",", "double", "maximumValues", "[", "]", ",", "double", "minimumValues", "[", "]", ")", "{", "double", "a...
Calculates the hypervolume of that portion of the objective space that is dominated by individual a but not by individual b
[ "Calculates", "the", "hypervolume", "of", "that", "portion", "of", "the", "objective", "space", "that", "is", "dominated", "by", "individual", "a", "but", "not", "by", "individual", "b" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/ibea/IBEA.java#L126-L164
54,755
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/ibea/IBEA.java
IBEA.computeIndicatorValuesHD
public void computeIndicatorValuesHD(List<S> solutionSet, double[] maximumValues, double[] minimumValues) { List<S> A, B; // Initialize the structures indicatorValues = new ArrayList<List<Double>>(); maxIndicatorValue = -Double.MAX_VALUE; for (int j = 0; j < solutionSet.size(); j++) { A...
java
public void computeIndicatorValuesHD(List<S> solutionSet, double[] maximumValues, double[] minimumValues) { List<S> A, B; // Initialize the structures indicatorValues = new ArrayList<List<Double>>(); maxIndicatorValue = -Double.MAX_VALUE; for (int j = 0; j < solutionSet.size(); j++) { A...
[ "public", "void", "computeIndicatorValuesHD", "(", "List", "<", "S", ">", "solutionSet", ",", "double", "[", "]", "maximumValues", ",", "double", "[", "]", "minimumValues", ")", "{", "List", "<", "S", ">", "A", ",", "B", ";", "// Initialize the structures", ...
This structure stores the indicator values of each pair of elements
[ "This", "structure", "stores", "the", "indicator", "values", "of", "each", "pair", "of", "elements" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/ibea/IBEA.java#L169-L205
54,756
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/ibea/IBEA.java
IBEA.fitness
public void fitness(List<S> solutionSet, int pos) { double fitness = 0.0; double kappa = 0.05; for (int i = 0; i < solutionSet.size(); i++) { if (i != pos) { fitness += Math.exp((-1 * indicatorValues.get(i).get(pos) / maxIndicatorValue) / kappa); } } solutionFitness.setAttribute...
java
public void fitness(List<S> solutionSet, int pos) { double fitness = 0.0; double kappa = 0.05; for (int i = 0; i < solutionSet.size(); i++) { if (i != pos) { fitness += Math.exp((-1 * indicatorValues.get(i).get(pos) / maxIndicatorValue) / kappa); } } solutionFitness.setAttribute...
[ "public", "void", "fitness", "(", "List", "<", "S", ">", "solutionSet", ",", "int", "pos", ")", "{", "double", "fitness", "=", "0.0", ";", "double", "kappa", "=", "0.05", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "solutionSet", ".", "...
Calculate the fitness for the individual at position pos
[ "Calculate", "the", "fitness", "for", "the", "individual", "at", "position", "pos" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/ibea/IBEA.java#L210-L220
54,757
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/ibea/IBEA.java
IBEA.calculateFitness
public void calculateFitness(List<S> solutionSet) { // Obtains the lower and upper bounds of the population double[] maximumValues = new double[problem.getNumberOfObjectives()]; double[] minimumValues = new double[problem.getNumberOfObjectives()]; for (int i = 0; i < problem.getNumberOfObjectives(); i+...
java
public void calculateFitness(List<S> solutionSet) { // Obtains the lower and upper bounds of the population double[] maximumValues = new double[problem.getNumberOfObjectives()]; double[] minimumValues = new double[problem.getNumberOfObjectives()]; for (int i = 0; i < problem.getNumberOfObjectives(); i+...
[ "public", "void", "calculateFitness", "(", "List", "<", "S", ">", "solutionSet", ")", "{", "// Obtains the lower and upper bounds of the population", "double", "[", "]", "maximumValues", "=", "new", "double", "[", "problem", ".", "getNumberOfObjectives", "(", ")", "...
Calculate the fitness for the entire population.
[ "Calculate", "the", "fitness", "for", "the", "entire", "population", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/ibea/IBEA.java#L225-L251
54,758
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/ibea/IBEA.java
IBEA.removeWorst
public void removeWorst(List<S> solutionSet) { // Find the worst; double worst = (double) solutionFitness.getAttribute(solutionSet.get(0)); int worstIndex = 0; double kappa = 0.05; for (int i = 1; i < solutionSet.size(); i++) { if ((double) solutionFitness.getAttribute(solutionSet.get(i)) > ...
java
public void removeWorst(List<S> solutionSet) { // Find the worst; double worst = (double) solutionFitness.getAttribute(solutionSet.get(0)); int worstIndex = 0; double kappa = 0.05; for (int i = 1; i < solutionSet.size(); i++) { if ((double) solutionFitness.getAttribute(solutionSet.get(i)) > ...
[ "public", "void", "removeWorst", "(", "List", "<", "S", ">", "solutionSet", ")", "{", "// Find the worst;", "double", "worst", "=", "(", "double", ")", "solutionFitness", ".", "getAttribute", "(", "solutionSet", ".", "get", "(", "0", ")", ")", ";", "int", ...
Update the fitness before removing an individual
[ "Update", "the", "fitness", "before", "removing", "an", "individual" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/ibea/IBEA.java#L256-L286
54,759
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/SetCoverage.java
SetCoverage.evaluate
public double evaluate(List<? extends Solution<?>> set1, List<? extends Solution<?>> set2) { double result ; int sum = 0 ; if (set2.size()==0) { if (set1.size()==0) { result = 0.0 ; } else { result = 1.0 ; } } else { for (Solution<?> solution : set2) { if...
java
public double evaluate(List<? extends Solution<?>> set1, List<? extends Solution<?>> set2) { double result ; int sum = 0 ; if (set2.size()==0) { if (set1.size()==0) { result = 0.0 ; } else { result = 1.0 ; } } else { for (Solution<?> solution : set2) { if...
[ "public", "double", "evaluate", "(", "List", "<", "?", "extends", "Solution", "<", "?", ">", ">", "set1", ",", "List", "<", "?", "extends", "Solution", "<", "?", ">", ">", "set2", ")", "{", "double", "result", ";", "int", "sum", "=", "0", ";", "i...
Calculates the set coverage of set1 over set2 @param set1 @param set2 @return The value of the set coverage
[ "Calculates", "the", "set", "coverage", "of", "set1", "over", "set2" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/SetCoverage.java#L52-L71
54,760
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/algorithm/impl/AbstractGeneticAlgorithm.java
AbstractGeneticAlgorithm.checkNumberOfParents
protected void checkNumberOfParents(List<S> population, int numberOfParentsForCrossover) { if ((population.size() % numberOfParentsForCrossover) != 0) { throw new JMetalException("Wrong number of parents: the remainder if the " + "population size (" + population.size() + ") is not divisible by "...
java
protected void checkNumberOfParents(List<S> population, int numberOfParentsForCrossover) { if ((population.size() % numberOfParentsForCrossover) != 0) { throw new JMetalException("Wrong number of parents: the remainder if the " + "population size (" + population.size() + ") is not divisible by "...
[ "protected", "void", "checkNumberOfParents", "(", "List", "<", "S", ">", "population", ",", "int", "numberOfParentsForCrossover", ")", "{", "if", "(", "(", "population", ".", "size", "(", ")", "%", "numberOfParentsForCrossover", ")", "!=", "0", ")", "{", "th...
A crossover operator is applied to a number of parents, and it assumed that the population contains a valid number of solutions. This method checks that. @param population @param numberOfParentsForCrossover
[ "A", "crossover", "operator", "is", "applied", "to", "a", "number", "of", "parents", "and", "it", "assumed", "that", "the", "population", "contains", "a", "valid", "number", "of", "solutions", ".", "This", "method", "checks", "that", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/algorithm/impl/AbstractGeneticAlgorithm.java#L122-L128
54,761
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/AdaptiveGrid.java
AdaptiveGrid.location
public int location(S solution) { //Create a int [] to store the range of each objective int[] position = new int[numberOfObjectives]; //Calculate the position for each objective for (int obj = 0; obj < numberOfObjectives; obj++) { if ((solution.getObjective(obj) > gridUpperLimits[obj]) ...
java
public int location(S solution) { //Create a int [] to store the range of each objective int[] position = new int[numberOfObjectives]; //Calculate the position for each objective for (int obj = 0; obj < numberOfObjectives; obj++) { if ((solution.getObjective(obj) > gridUpperLimits[obj]) ...
[ "public", "int", "location", "(", "S", "solution", ")", "{", "//Create a int [] to store the range of each objective\r", "int", "[", "]", "position", "=", "new", "int", "[", "numberOfObjectives", "]", ";", "//Calculate the position for each objective\r", "for", "(", "in...
Calculates the hypercube of a solution @param solution The <code>Solution</code>.
[ "Calculates", "the", "hypercube", "of", "a", "solution" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/AdaptiveGrid.java#L175-L210
54,762
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/AdaptiveGrid.java
AdaptiveGrid.removeSolution
public void removeSolution(int location) { //Decrease the solutions in the location specified. hypercubes[location]--; //Update the most populated hypercube if (location == mostPopulatedHypercube) { for (int i = 0; i < hypercubes.length; i++) { if (hypercubes[i] > hypercubes[mostPo...
java
public void removeSolution(int location) { //Decrease the solutions in the location specified. hypercubes[location]--; //Update the most populated hypercube if (location == mostPopulatedHypercube) { for (int i = 0; i < hypercubes.length; i++) { if (hypercubes[i] > hypercubes[mostPo...
[ "public", "void", "removeSolution", "(", "int", "location", ")", "{", "//Decrease the solutions in the location specified.\r", "hypercubes", "[", "location", "]", "--", ";", "//Update the most populated hypercube\r", "if", "(", "location", "==", "mostPopulatedHypercube", ")...
Decreases the number of solutions into a specific hypercube. @param location Number of hypercube.
[ "Decreases", "the", "number", "of", "solutions", "into", "a", "specific", "hypercube", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/AdaptiveGrid.java#L236-L253
54,763
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/AdaptiveGrid.java
AdaptiveGrid.addSolution
public void addSolution(int location) { //Increase the solutions in the location specified. hypercubes[location]++; //Update the most populated hypercube if (hypercubes[location] > hypercubes[mostPopulatedHypercube]) { mostPopulatedHypercube = location; } //if hypercubes[locatio...
java
public void addSolution(int location) { //Increase the solutions in the location specified. hypercubes[location]++; //Update the most populated hypercube if (hypercubes[location] > hypercubes[mostPopulatedHypercube]) { mostPopulatedHypercube = location; } //if hypercubes[locatio...
[ "public", "void", "addSolution", "(", "int", "location", ")", "{", "//Increase the solutions in the location specified.\r", "hypercubes", "[", "location", "]", "++", ";", "//Update the most populated hypercube\r", "if", "(", "hypercubes", "[", "location", "]", ">", "hyp...
Increases the number of solutions into a specific hypercube. @param location Number of hypercube.
[ "Increases", "the", "number", "of", "solutions", "into", "a", "specific", "hypercube", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/AdaptiveGrid.java#L260-L274
54,764
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/AdaptiveGrid.java
AdaptiveGrid.rouletteWheel
public int rouletteWheel(BoundedRandomGenerator<Double> randomGenerator) { //Calculate the inverse sum double inverseSum = 0.0; for (int hypercube : hypercubes) { if (hypercube > 0) { inverseSum += 1.0 / (double) hypercube; } } //Calculate a random value between 0 and s...
java
public int rouletteWheel(BoundedRandomGenerator<Double> randomGenerator) { //Calculate the inverse sum double inverseSum = 0.0; for (int hypercube : hypercubes) { if (hypercube > 0) { inverseSum += 1.0 / (double) hypercube; } } //Calculate a random value between 0 and s...
[ "public", "int", "rouletteWheel", "(", "BoundedRandomGenerator", "<", "Double", ">", "randomGenerator", ")", "{", "//Calculate the inverse sum\r", "double", "inverseSum", "=", "0.0", ";", "for", "(", "int", "hypercube", ":", "hypercubes", ")", "{", "if", "(", "h...
Returns a random hypercube using a rouleteWheel method. @param randomGenerator the {@link BoundedRandomGenerator} to use for the roulette @return the number of the selected hypercube.
[ "Returns", "a", "random", "hypercube", "using", "a", "rouleteWheel", "method", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/AdaptiveGrid.java#L315-L341
54,765
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/AdaptiveGrid.java
AdaptiveGrid.calculateOccupied
public void calculateOccupied() { int total = 0; for (int hypercube : hypercubes) { if (hypercube > 0) { total++; } } occupied = new int[total]; int base = 0; for (int i = 0; i < hypercubes.length; i++) { if (hypercubes[i] > 0) { occupied[base] = i;...
java
public void calculateOccupied() { int total = 0; for (int hypercube : hypercubes) { if (hypercube > 0) { total++; } } occupied = new int[total]; int base = 0; for (int i = 0; i < hypercubes.length; i++) { if (hypercubes[i] > 0) { occupied[base] = i;...
[ "public", "void", "calculateOccupied", "(", ")", "{", "int", "total", "=", "0", ";", "for", "(", "int", "hypercube", ":", "hypercubes", ")", "{", "if", "(", "hypercube", ">", "0", ")", "{", "total", "++", ";", "}", "}", "occupied", "=", "new", "int...
Calculates the number of hypercubes having one or more solutions. return the number of hypercubes with more than zero solutions.
[ "Calculates", "the", "number", "of", "hypercubes", "having", "one", "or", "more", "solutions", ".", "return", "the", "number", "of", "hypercubes", "with", "more", "than", "zero", "solutions", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/AdaptiveGrid.java#L347-L363
54,766
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/AdaptiveGrid.java
AdaptiveGrid.randomOccupiedHypercube
public int randomOccupiedHypercube(BoundedRandomGenerator<Integer> randomGenerator) { int rand = randomGenerator.getRandomValue(0, occupied.length - 1); return occupied[rand]; }
java
public int randomOccupiedHypercube(BoundedRandomGenerator<Integer> randomGenerator) { int rand = randomGenerator.getRandomValue(0, occupied.length - 1); return occupied[rand]; }
[ "public", "int", "randomOccupiedHypercube", "(", "BoundedRandomGenerator", "<", "Integer", ">", "randomGenerator", ")", "{", "int", "rand", "=", "randomGenerator", ".", "getRandomValue", "(", "0", ",", "occupied", ".", "length", "-", "1", ")", ";", "return", "...
Returns a random hypercube that has more than zero solutions. @param randomGenerator the {@link BoundedRandomGenerator} to use for selecting the hypercube @return The hypercube.
[ "Returns", "a", "random", "hypercube", "that", "has", "more", "than", "zero", "solutions", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/AdaptiveGrid.java#L391-L394
54,767
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/AdaptiveGrid.java
AdaptiveGrid.getAverageOccupation
public double getAverageOccupation() { calculateOccupied(); double result; if (occupiedHypercubes() == 0) { result = 0.0; } else { double sum = 0.0; for (int value : occupied) { sum += hypercubes[value]; } result = sum / occupiedHypercubes(); } ...
java
public double getAverageOccupation() { calculateOccupied(); double result; if (occupiedHypercubes() == 0) { result = 0.0; } else { double sum = 0.0; for (int value : occupied) { sum += hypercubes[value]; } result = sum / occupiedHypercubes(); } ...
[ "public", "double", "getAverageOccupation", "(", ")", "{", "calculateOccupied", "(", ")", ";", "double", "result", ";", "if", "(", "occupiedHypercubes", "(", ")", "==", "0", ")", "{", "result", "=", "0.0", ";", "}", "else", "{", "double", "sum", "=", "...
Return the average number of solutions in the occupied hypercubes
[ "Return", "the", "average", "number", "of", "solutions", "in", "the", "occupied", "hypercubes" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/AdaptiveGrid.java#L399-L415
54,768
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/front/util/FrontUtils.java
FrontUtils.getMaximumValues
public static double[] getMaximumValues(Front front) { if (front == null) { throw new NullFrontException() ; } else if (front.getNumberOfPoints() == 0) { throw new EmptyFrontException() ; } int numberOfObjectives = front.getPoint(0).getDimension() ; double[] maximumValue = new double[n...
java
public static double[] getMaximumValues(Front front) { if (front == null) { throw new NullFrontException() ; } else if (front.getNumberOfPoints() == 0) { throw new EmptyFrontException() ; } int numberOfObjectives = front.getPoint(0).getDimension() ; double[] maximumValue = new double[n...
[ "public", "static", "double", "[", "]", "getMaximumValues", "(", "Front", "front", ")", "{", "if", "(", "front", "==", "null", ")", "{", "throw", "new", "NullFrontException", "(", ")", ";", "}", "else", "if", "(", "front", ".", "getNumberOfPoints", "(", ...
Gets the maximum values for each objectives in a front @param front A front of objective values @return double [] An array with the maximum values for each objective
[ "Gets", "the", "maximum", "values", "for", "each", "objectives", "in", "a", "front" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/front/util/FrontUtils.java#L28-L51
54,769
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/front/util/FrontUtils.java
FrontUtils.getMinimumValues
public static double[] getMinimumValues(Front front) { if (front == null) { throw new NullFrontException() ; } else if (front.getNumberOfPoints() == 0) { throw new EmptyFrontException() ; } int numberOfObjectives = front.getPoint(0).getDimension() ; double[] minimumValue = new double[n...
java
public static double[] getMinimumValues(Front front) { if (front == null) { throw new NullFrontException() ; } else if (front.getNumberOfPoints() == 0) { throw new EmptyFrontException() ; } int numberOfObjectives = front.getPoint(0).getDimension() ; double[] minimumValue = new double[n...
[ "public", "static", "double", "[", "]", "getMinimumValues", "(", "Front", "front", ")", "{", "if", "(", "front", "==", "null", ")", "{", "throw", "new", "NullFrontException", "(", ")", ";", "}", "else", "if", "(", "front", ".", "getNumberOfPoints", "(", ...
Gets the minimum values for each objectives in a given front @param front The front @return double [] An array with the minimum value for each objective
[ "Gets", "the", "minimum", "values", "for", "each", "objectives", "in", "a", "given", "front" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/front/util/FrontUtils.java#L59-L82
54,770
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/front/util/FrontUtils.java
FrontUtils.distanceToNearestPoint
public static double distanceToNearestPoint(Point point, Front front, PointDistance distance) { if (front == null) { throw new NullFrontException(); } else if (front.getNumberOfPoints() == 0) { throw new EmptyFrontException(); } else if (point == null) { throw new JMetalException("The poin...
java
public static double distanceToNearestPoint(Point point, Front front, PointDistance distance) { if (front == null) { throw new NullFrontException(); } else if (front.getNumberOfPoints() == 0) { throw new EmptyFrontException(); } else if (point == null) { throw new JMetalException("The poin...
[ "public", "static", "double", "distanceToNearestPoint", "(", "Point", "point", ",", "Front", "front", ",", "PointDistance", "distance", ")", "{", "if", "(", "front", "==", "null", ")", "{", "throw", "new", "NullFrontException", "(", ")", ";", "}", "else", ...
Gets the distance between a point and the nearest one in a front. If a distance equals to 0 is found, that means that the point is in the front, so it is excluded @param point The point @param front The front that contains the other points to calculate the distances @return The minimum distance between the point and t...
[ "Gets", "the", "distance", "between", "a", "point", "and", "the", "nearest", "one", "in", "a", "front", ".", "If", "a", "distance", "equals", "to", "0", "is", "found", "that", "means", "that", "the", "point", "is", "in", "the", "front", "so", "it", "...
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/front/util/FrontUtils.java#L104-L123
54,771
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/front/util/FrontUtils.java
FrontUtils.getInvertedFront
public static Front getInvertedFront(Front front) { if (front == null) { throw new NullFrontException(); } else if (front.getNumberOfPoints() == 0) { throw new EmptyFrontException(); } int numberOfDimensions = front.getPoint(0).getDimension() ; Front invertedFront = new ArrayFront(front...
java
public static Front getInvertedFront(Front front) { if (front == null) { throw new NullFrontException(); } else if (front.getNumberOfPoints() == 0) { throw new EmptyFrontException(); } int numberOfDimensions = front.getPoint(0).getDimension() ; Front invertedFront = new ArrayFront(front...
[ "public", "static", "Front", "getInvertedFront", "(", "Front", "front", ")", "{", "if", "(", "front", "==", "null", ")", "{", "throw", "new", "NullFrontException", "(", ")", ";", "}", "else", "if", "(", "front", ".", "getNumberOfPoints", "(", ")", "==", ...
This method receives a normalized pareto front and return the inverted one. This method is for minimization problems @param front The pareto front to inverse @return The inverted pareto front
[ "This", "method", "receives", "a", "normalized", "pareto", "front", "and", "return", "the", "inverted", "one", ".", "This", "method", "is", "for", "minimization", "problems" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/front/util/FrontUtils.java#L174-L197
54,772
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/front/util/FrontUtils.java
FrontUtils.convertFrontToArray
public static double[][] convertFrontToArray(Front front) { if (front == null) { throw new NullFrontException(); } double[][] arrayFront = new double[front.getNumberOfPoints()][] ; for (int i = 0; i < front.getNumberOfPoints(); i++) { arrayFront[i] = new double[front.getPoint(i).getDimensi...
java
public static double[][] convertFrontToArray(Front front) { if (front == null) { throw new NullFrontException(); } double[][] arrayFront = new double[front.getNumberOfPoints()][] ; for (int i = 0; i < front.getNumberOfPoints(); i++) { arrayFront[i] = new double[front.getPoint(i).getDimensi...
[ "public", "static", "double", "[", "]", "[", "]", "convertFrontToArray", "(", "Front", "front", ")", "{", "if", "(", "front", "==", "null", ")", "{", "throw", "new", "NullFrontException", "(", ")", ";", "}", "double", "[", "]", "[", "]", "arrayFront", ...
Given a front, converts it to an array of double values @param front @return A front as double[][] array
[ "Given", "a", "front", "converts", "it", "to", "an", "array", "of", "double", "values" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/front/util/FrontUtils.java#L205-L220
54,773
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/front/util/FrontUtils.java
FrontUtils.convertFrontToSolutionList
public static List<PointSolution> convertFrontToSolutionList(Front front) { if (front == null) { throw new NullFrontException(); } int numberOfObjectives ; int solutionSetSize = front.getNumberOfPoints() ; if (front.getNumberOfPoints() == 0) { numberOfObjectives = 0 ; } else { ...
java
public static List<PointSolution> convertFrontToSolutionList(Front front) { if (front == null) { throw new NullFrontException(); } int numberOfObjectives ; int solutionSetSize = front.getNumberOfPoints() ; if (front.getNumberOfPoints() == 0) { numberOfObjectives = 0 ; } else { ...
[ "public", "static", "List", "<", "PointSolution", ">", "convertFrontToSolutionList", "(", "Front", "front", ")", "{", "if", "(", "front", "==", "null", ")", "{", "throw", "new", "NullFrontException", "(", ")", ";", "}", "int", "numberOfObjectives", ";", "int...
Given a front, converts it to a Solution set of PointSolutions @param front @return A front as a List<FrontSolution>
[ "Given", "a", "front", "converts", "it", "to", "a", "Solution", "set", "of", "PointSolutions" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/front/util/FrontUtils.java#L262-L286
54,774
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/operator/impl/crossover/PMXCrossover.java
PMXCrossover.execute
public List<PermutationSolution<Integer>> execute(List<PermutationSolution<Integer>> parents) { if (null == parents) { throw new JMetalException("Null parameter") ; } else if (parents.size() != 2) { throw new JMetalException("There must be two parents instead of " + parents.size()) ; } ...
java
public List<PermutationSolution<Integer>> execute(List<PermutationSolution<Integer>> parents) { if (null == parents) { throw new JMetalException("Null parameter") ; } else if (parents.size() != 2) { throw new JMetalException("There must be two parents instead of " + parents.size()) ; } ...
[ "public", "List", "<", "PermutationSolution", "<", "Integer", ">", ">", "execute", "(", "List", "<", "PermutationSolution", "<", "Integer", ">", ">", "parents", ")", "{", "if", "(", "null", "==", "parents", ")", "{", "throw", "new", "JMetalException", "(",...
Executes the operation @param parents An object containing an array of two solutions
[ "Executes", "the", "operation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/operator/impl/crossover/PMXCrossover.java#L67-L75
54,775
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/point/util/comparator/PointComparator.java
PointComparator.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") ; } else if (pointOne.getDimension() != pointTwo.getDimension()) { throw ne...
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") ; } else if (pointOne.getDimension() != pointTwo.getDimension()) { throw ne...
[ "@", "Override", "public", "int", "compare", "(", "Point", "pointOne", ",", "Point", "pointTwo", ")", "{", "if", "(", "pointOne", "==", "null", ")", "{", "throw", "new", "JMetalException", "(", "\"PointOne is null\"", ")", ";", "}", "else", "if", "(", "p...
Compares two Point objects @param pointOne An object that reference a Point @param pointTwo An object that reference a Point @return -1 if o1 < o1, 1 if o1 > o2 or 0 in other case.
[ "Compares", "two", "Point", "objects" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/point/util/comparator/PointComparator.java#L34-L54
54,776
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/Spread.java
Spread.spread
public double spread(Front front, Front referenceFront) { PointDistance distance = new EuclideanDistance() ; // STEP 1. Sort normalizedFront and normalizedParetoFront; front.sort(new LexicographicalPointComparator()); referenceFront.sort(new LexicographicalPointComparator()); // STEP 2. Compute df...
java
public double spread(Front front, Front referenceFront) { PointDistance distance = new EuclideanDistance() ; // STEP 1. Sort normalizedFront and normalizedParetoFront; front.sort(new LexicographicalPointComparator()); referenceFront.sort(new LexicographicalPointComparator()); // STEP 2. Compute df...
[ "public", "double", "spread", "(", "Front", "front", ",", "Front", "referenceFront", ")", "{", "PointDistance", "distance", "=", "new", "EuclideanDistance", "(", ")", ";", "// STEP 1. Sort normalizedFront and normalizedParetoFront;", "front", ".", "sort", "(", "new", ...
Calculates the Spread metric. @param front The front. @param referenceFront The true pareto front.
[ "Calculates", "the", "Spread", "metric", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/Spread.java#L65-L101
54,777
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/hypervolume/PISAHypervolume.java
PISAHypervolume.hypervolume
private double hypervolume(Front front, Front referenceFront) { Front invertedFront; invertedFront = FrontUtils.getInvertedFront(front); int numberOfObjectives = referenceFront.getPoint(0).getDimension() ; // STEP4. The hypervolume (control is passed to the Java version of Zitzler code) return th...
java
private double hypervolume(Front front, Front referenceFront) { Front invertedFront; invertedFront = FrontUtils.getInvertedFront(front); int numberOfObjectives = referenceFront.getPoint(0).getDimension() ; // STEP4. The hypervolume (control is passed to the Java version of Zitzler code) return th...
[ "private", "double", "hypervolume", "(", "Front", "front", ",", "Front", "referenceFront", ")", "{", "Front", "invertedFront", ";", "invertedFront", "=", "FrontUtils", ".", "getInvertedFront", "(", "front", ")", ";", "int", "numberOfObjectives", "=", "referenceFro...
Returns the hypervolume value of a front of points @param front The front @param referenceFront The true pareto front
[ "Returns", "the", "hypervolume", "value", "of", "a", "front", "of", "points" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/hypervolume/PISAHypervolume.java#L209-L219
54,778
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/hypervolume/PISAHypervolume.java
PISAHypervolume.hvContributions
private double[] hvContributions(double[][] front) { int numberOfObjectives = front[0].length ; double[] contributions = new double[front.length]; double[][] frontSubset = new double[front.length - 1][front[0].length]; LinkedList<double[]> frontCopy = new LinkedList<double[]>(); Collections.addAll(...
java
private double[] hvContributions(double[][] front) { int numberOfObjectives = front[0].length ; double[] contributions = new double[front.length]; double[][] frontSubset = new double[front.length - 1][front[0].length]; LinkedList<double[]> frontCopy = new LinkedList<double[]>(); Collections.addAll(...
[ "private", "double", "[", "]", "hvContributions", "(", "double", "[", "]", "[", "]", "front", ")", "{", "int", "numberOfObjectives", "=", "front", "[", "0", "]", ".", "length", ";", "double", "[", "]", "contributions", "=", "new", "double", "[", "front...
Calculates how much hypervolume each point dominates exclusively. The points have to be transformed beforehand, to accommodate the assumptions of Zitzler's hypervolume code. @param front transformed objective values @return HV contributions
[ "Calculates", "how", "much", "hypervolume", "each", "point", "dominates", "exclusively", ".", "The", "points", "have", "to", "be", "transformed", "beforehand", "to", "accommodate", "the", "assumptions", "of", "Zitzler", "s", "hypervolume", "code", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/hypervolume/PISAHypervolume.java#L290-L311
54,779
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/InvertedGenerationalDistancePlus.java
InvertedGenerationalDistancePlus.invertedGenerationalDistancePlus
public double invertedGenerationalDistancePlus(Front front, Front referenceFront) { double sum = 0.0; for (int i = 0 ; i < referenceFront.getNumberOfPoints(); i++) { sum += FrontUtils.distanceToClosestPoint(referenceFront.getPoint(i), front, new DominanceDistance()); } // STEP 4. Divid...
java
public double invertedGenerationalDistancePlus(Front front, Front referenceFront) { double sum = 0.0; for (int i = 0 ; i < referenceFront.getNumberOfPoints(); i++) { sum += FrontUtils.distanceToClosestPoint(referenceFront.getPoint(i), front, new DominanceDistance()); } // STEP 4. Divid...
[ "public", "double", "invertedGenerationalDistancePlus", "(", "Front", "front", ",", "Front", "referenceFront", ")", "{", "double", "sum", "=", "0.0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "referenceFront", ".", "getNumberOfPoints", "(", ")", ...
Returns the inverted generational distance plus value for a given front @param front The front @param referenceFront The reference pareto front
[ "Returns", "the", "inverted", "generational", "distance", "plus", "value", "for", "a", "given", "front" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/InvertedGenerationalDistancePlus.java#L67-L77
54,780
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/experiment/component/GenerateLatexTablesWithStatistics.java
GenerateLatexTablesWithStatistics.computeStatistics
private Map<String, Double> computeStatistics(List<Double> values) { Map<String, Double> results = new HashMap<>() ; DescriptiveStatistics stats = new DescriptiveStatistics(); for (Double value : values) { stats.addValue(value); } results.put("mean", stats.getMean()) ; results.put("media...
java
private Map<String, Double> computeStatistics(List<Double> values) { Map<String, Double> results = new HashMap<>() ; DescriptiveStatistics stats = new DescriptiveStatistics(); for (Double value : values) { stats.addValue(value); } results.put("mean", stats.getMean()) ; results.put("media...
[ "private", "Map", "<", "String", ",", "Double", ">", "computeStatistics", "(", "List", "<", "Double", ">", "values", ")", "{", "Map", "<", "String", ",", "Double", ">", "results", "=", "new", "HashMap", "<>", "(", ")", ";", "DescriptiveStatistics", "stat...
Computes the statistical values @param values @return
[ "Computes", "the", "statistical", "values" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/experiment/component/GenerateLatexTablesWithStatistics.java#L156-L173
54,781
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/gwasfga/util/GWASFGARanking.java
GWASFGARanking.rankUnfeasibleSolutions
protected int[] rankUnfeasibleSolutions(List<S> population){ int numberOfViolatedConstraintsBySolution1, numberOfViolatedConstraintsBySolution2; int indexOfFirstSolution, indexOfSecondSolution, indexOfWeight; double overallConstraintViolationSolution1, overallConstraintViolationSolution2; ...
java
protected int[] rankUnfeasibleSolutions(List<S> population){ int numberOfViolatedConstraintsBySolution1, numberOfViolatedConstraintsBySolution2; int indexOfFirstSolution, indexOfSecondSolution, indexOfWeight; double overallConstraintViolationSolution1, overallConstraintViolationSolution2; ...
[ "protected", "int", "[", "]", "rankUnfeasibleSolutions", "(", "List", "<", "S", ">", "population", ")", "{", "int", "numberOfViolatedConstraintsBySolution1", ",", "numberOfViolatedConstraintsBySolution2", ";", "int", "indexOfFirstSolution", ",", "indexOfSecondSolution", "...
Obtain the rank of each solution in a list of unfeasible solutions @param population List of unfeasible solutions @return The rank of each unfeasible solutions
[ "Obtain", "the", "rank", "of", "each", "solution", "in", "a", "list", "of", "unfeasible", "solutions" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/gwasfga/util/GWASFGARanking.java#L162-L235
54,782
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/operator/impl/mutation/NonUniformMutation.java
NonUniformMutation.delta
private double delta(double y, double bMutationParameter) { double rand = randomGenenerator.getRandomValue(); int it, maxIt; it = currentIteration; maxIt = maxIterations; return (y * (1.0 - Math.pow(rand, Math.pow((1.0 - it / (double) maxIt), bMutationParameter) ))); }
java
private double delta(double y, double bMutationParameter) { double rand = randomGenenerator.getRandomValue(); int it, maxIt; it = currentIteration; maxIt = maxIterations; return (y * (1.0 - Math.pow(rand, Math.pow((1.0 - it / (double) maxIt), bMutationParameter) ))); }
[ "private", "double", "delta", "(", "double", "y", ",", "double", "bMutationParameter", ")", "{", "double", "rand", "=", "randomGenenerator", ".", "getRandomValue", "(", ")", ";", "int", "it", ",", "maxIt", ";", "it", "=", "currentIteration", ";", "maxIt", ...
Calculates the delta value used in NonUniform mutation operator
[ "Calculates", "the", "delta", "value", "used", "in", "NonUniform", "mutation", "operator" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/operator/impl/mutation/NonUniformMutation.java#L122-L132
54,783
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/EnergyArchive.java
EnergyArchive.scaleToPositive
private void scaleToPositive() { // Obtain min value double minScalarization = Double.MAX_VALUE; for (S solution : getSolutionList()) { if (scalarization.getAttribute(solution) < minScalarization) { minScalarization = scalarization.getAttribute(solution); } } if (minScala...
java
private void scaleToPositive() { // Obtain min value double minScalarization = Double.MAX_VALUE; for (S solution : getSolutionList()) { if (scalarization.getAttribute(solution) < minScalarization) { minScalarization = scalarization.getAttribute(solution); } } if (minScala...
[ "private", "void", "scaleToPositive", "(", ")", "{", "// Obtain min value\r", "double", "minScalarization", "=", "Double", ".", "MAX_VALUE", ";", "for", "(", "S", "solution", ":", "getSolutionList", "(", ")", ")", "{", "if", "(", "scalarization", ".", "getAttr...
The niching mechanism of ESPEA only works if the scalarization values are positive. Otherwise scalarization values cannot be interpreted as charges of a physical system that signal desirability. <p> Scalarization values are scaled to positive values by subtracting the minimum scalariaztion value from all archive membe...
[ "The", "niching", "mechanism", "of", "ESPEA", "only", "works", "if", "the", "scalarization", "values", "are", "positive", ".", "Otherwise", "scalarization", "values", "cannot", "be", "interpreted", "as", "charges", "of", "a", "physical", "system", "that", "signa...
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/EnergyArchive.java#L240-L255
54,784
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/EnergyArchive.java
EnergyArchive.energyVector
private double[] energyVector(double[][] distanceMatrix) { // Ignore the set (maxSize + 1)'th archive member since it's the new // solution that is tested for eligibility of replacement. double[] energyVector = new double[distanceMatrix.length - 1]; for (int i = 0; i < energyVector.length - 1; i++) ...
java
private double[] energyVector(double[][] distanceMatrix) { // Ignore the set (maxSize + 1)'th archive member since it's the new // solution that is tested for eligibility of replacement. double[] energyVector = new double[distanceMatrix.length - 1]; for (int i = 0; i < energyVector.length - 1; i++) ...
[ "private", "double", "[", "]", "energyVector", "(", "double", "[", "]", "[", "]", "distanceMatrix", ")", "{", "// Ignore the set (maxSize + 1)'th archive member since it's the new\r", "// solution that is tested for eligibility of replacement.\r", "double", "[", "]", "energyVec...
Computes the energy contribution of each archive member. Note that the archive member at position maxSize + 1 is the new solution that is tested for eligibility of replacement. @param distanceMatrix Distance between archive members @return The amount of energy that each member contributes to the archive.
[ "Computes", "the", "energy", "contribution", "of", "each", "archive", "member", ".", "Note", "that", "the", "archive", "member", "at", "position", "maxSize", "+", "1", "is", "the", "new", "solution", "that", "is", "tested", "for", "eligibility", "of", "repla...
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/EnergyArchive.java#L265-L277
54,785
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/EnergyArchive.java
EnergyArchive.replacementVector
private double[] replacementVector(double[][] distanceMatrix) { double[] replacementVector = new double[distanceMatrix.length - 1]; // Energy between archive member k and new solution double[] individualEnergy = new double[distanceMatrix.length - 1]; // Sum of all individual energies double tot...
java
private double[] replacementVector(double[][] distanceMatrix) { double[] replacementVector = new double[distanceMatrix.length - 1]; // Energy between archive member k and new solution double[] individualEnergy = new double[distanceMatrix.length - 1]; // Sum of all individual energies double tot...
[ "private", "double", "[", "]", "replacementVector", "(", "double", "[", "]", "[", "]", "distanceMatrix", ")", "{", "double", "[", "]", "replacementVector", "=", "new", "double", "[", "distanceMatrix", ".", "length", "-", "1", "]", ";", "// Energy between arc...
Computes the replacement energy vector. Each component k of the replacement vector states how much energy the new solution would introduce into the archive instead of the archive member at position k. @param distanceMatrix Distance between archive members @return The replacement energy vector.
[ "Computes", "the", "replacement", "energy", "vector", ".", "Each", "component", "k", "of", "the", "replacement", "vector", "states", "how", "much", "energy", "the", "new", "solution", "would", "introduce", "into", "the", "archive", "instead", "of", "the", "arc...
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/EnergyArchive.java#L287-L302
54,786
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/AbstractAlgorithmRunner.java
AbstractAlgorithmRunner.printFinalSolutionSet
public static void printFinalSolutionSet(List<? extends Solution<?>> population) { new SolutionListOutput(population) .setSeparator("\t") .setVarFileOutputContext(new DefaultFileOutputContext("VAR.tsv")) .setFunFileOutputContext(new DefaultFileOutputContext("FUN.tsv")) .print(); ...
java
public static void printFinalSolutionSet(List<? extends Solution<?>> population) { new SolutionListOutput(population) .setSeparator("\t") .setVarFileOutputContext(new DefaultFileOutputContext("VAR.tsv")) .setFunFileOutputContext(new DefaultFileOutputContext("FUN.tsv")) .print(); ...
[ "public", "static", "void", "printFinalSolutionSet", "(", "List", "<", "?", "extends", "Solution", "<", "?", ">", ">", "population", ")", "{", "new", "SolutionListOutput", "(", "population", ")", ".", "setSeparator", "(", "\"\\t\"", ")", ".", "setVarFileOutput...
Write the population into two files and prints some data on screen @param population
[ "Write", "the", "population", "into", "two", "files", "and", "prints", "some", "data", "on", "screen" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/AbstractAlgorithmRunner.java#L28-L39
54,787
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/AbstractAlgorithmRunner.java
AbstractAlgorithmRunner.printQualityIndicators
public static <S extends Solution<?>> void printQualityIndicators(List<S> population, String paretoFrontFile) throws FileNotFoundException { Front referenceFront = new ArrayFront(paretoFrontFile); FrontNormalizer frontNormalizer = new FrontNormalizer(referenceFront) ; Front normalizedReferenceFront =...
java
public static <S extends Solution<?>> void printQualityIndicators(List<S> population, String paretoFrontFile) throws FileNotFoundException { Front referenceFront = new ArrayFront(paretoFrontFile); FrontNormalizer frontNormalizer = new FrontNormalizer(referenceFront) ; Front normalizedReferenceFront =...
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "printQualityIndicators", "(", "List", "<", "S", ">", "population", ",", "String", "paretoFrontFile", ")", "throws", "FileNotFoundException", "{", "Front", "referenceFront", "=", ...
Print all the available quality indicators @param population @param paretoFrontFile @throws FileNotFoundException
[ "Print", "all", "the", "available", "quality", "indicators" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/AbstractAlgorithmRunner.java#L47-L91
54,788
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/operator/impl/mutation/PermutationSwapMutation.java
PermutationSwapMutation.doMutation
public void doMutation(PermutationSolution<T> solution) { int permutationLength ; permutationLength = solution.getNumberOfVariables() ; if ((permutationLength != 0) && (permutationLength != 1)) { if (mutationRandomGenerator.getRandomValue() < mutationProbability) { int pos1 = positionRandomGe...
java
public void doMutation(PermutationSolution<T> solution) { int permutationLength ; permutationLength = solution.getNumberOfVariables() ; if ((permutationLength != 0) && (permutationLength != 1)) { if (mutationRandomGenerator.getRandomValue() < mutationProbability) { int pos1 = positionRandomGe...
[ "public", "void", "doMutation", "(", "PermutationSolution", "<", "T", ">", "solution", ")", "{", "int", "permutationLength", ";", "permutationLength", "=", "solution", ".", "getNumberOfVariables", "(", ")", ";", "if", "(", "(", "permutationLength", "!=", "0", ...
Performs the operation
[ "Performs", "the", "operation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/operator/impl/mutation/PermutationSwapMutation.java#L73-L94
54,789
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/operator/impl/mutation/SimpleRandomMutation.java
SimpleRandomMutation.doMutation
private void doMutation(double probability, DoubleSolution solution) { for (int i = 0; i < solution.getNumberOfVariables(); i++) { if (randomGenerator.getRandomValue() <= probability) { Double value = solution.getLowerBound(i) + ((solution.getUpperBound(i) - solution.getLowerBound(i)) * random...
java
private void doMutation(double probability, DoubleSolution solution) { for (int i = 0; i < solution.getNumberOfVariables(); i++) { if (randomGenerator.getRandomValue() <= probability) { Double value = solution.getLowerBound(i) + ((solution.getUpperBound(i) - solution.getLowerBound(i)) * random...
[ "private", "void", "doMutation", "(", "double", "probability", ",", "DoubleSolution", "solution", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "solution", ".", "getNumberOfVariables", "(", ")", ";", "i", "++", ")", "{", "if", "(", "random...
Implements the mutation operation
[ "Implements", "the", "mutation", "operation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/operator/impl/mutation/SimpleRandomMutation.java#L57-L66
54,790
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/ProblemUtils.java
ProblemUtils.loadProblem
@SuppressWarnings("unchecked") public static <S> Problem<S> loadProblem(String problemName) { Problem<S> problem ; try { problem = (Problem<S>)Class.forName(problemName).getConstructor().newInstance() ; } catch (InstantiationException e) { throw new JMetalException("newInstance() cannot instan...
java
@SuppressWarnings("unchecked") public static <S> Problem<S> loadProblem(String problemName) { Problem<S> problem ; try { problem = (Problem<S>)Class.forName(problemName).getConstructor().newInstance() ; } catch (InstantiationException e) { throw new JMetalException("newInstance() cannot instan...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "S", ">", "Problem", "<", "S", ">", "loadProblem", "(", "String", "problemName", ")", "{", "Problem", "<", "S", ">", "problem", ";", "try", "{", "problem", "=", "(", "Problem", ...
Create an instance of problem passed as argument @param problemName A full qualified problem name @return An instance of the problem
[ "Create", "an", "instance", "of", "problem", "passed", "as", "argument" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/ProblemUtils.java#L17-L35
54,791
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG4.java
WFG4.t1
public float[] t1(float[] z, int k) { float[] result = new float[z.length]; for (int i = 0; i < z.length; i++) { result[i] = (new Transformations()).sMulti(z[i], 30, 10, (float) 0.35); } return result; }
java
public float[] t1(float[] z, int k) { float[] result = new float[z.length]; for (int i = 0; i < z.length; i++) { result[i] = (new Transformations()).sMulti(z[i], 30, 10, (float) 0.35); } return result; }
[ "public", "float", "[", "]", "t1", "(", "float", "[", "]", "z", ",", "int", "k", ")", "{", "float", "[", "]", "result", "=", "new", "float", "[", "z", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "z", ".", "le...
WFG4 t1 transformation
[ "WFG4", "t1", "transformation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG4.java#L68-L76
54,792
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/zdt/ZDT5.java
ZDT5.evalG
public double evalG(BinarySolution solution) { double res = 0.0; for (int i = 1; i < solution.getNumberOfVariables(); i++) { res += evalV(u(solution.getVariableValue(i))); } return res; }
java
public double evalG(BinarySolution solution) { double res = 0.0; for (int i = 1; i < solution.getNumberOfVariables(); i++) { res += evalV(u(solution.getVariableValue(i))); } return res; }
[ "public", "double", "evalG", "(", "BinarySolution", "solution", ")", "{", "double", "res", "=", "0.0", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "solution", ".", "getNumberOfVariables", "(", ")", ";", "i", "++", ")", "{", "res", "+=", "...
Returns the value of the ZDT5 function G. @param solution The solution.
[ "Returns", "the", "value", "of", "the", "ZDT5", "function", "G", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/zdt/ZDT5.java#L85-L92
54,793
auth0/auth0-java
src/main/java/com/auth0/client/mgmt/filter/FieldsFilter.java
FieldsFilter.withFields
public FieldsFilter withFields(String fields, boolean includeFields) { parameters.put("fields", fields); parameters.put("include_fields", includeFields); return this; }
java
public FieldsFilter withFields(String fields, boolean includeFields) { parameters.put("fields", fields); parameters.put("include_fields", includeFields); return this; }
[ "public", "FieldsFilter", "withFields", "(", "String", "fields", ",", "boolean", "includeFields", ")", "{", "parameters", ".", "put", "(", "\"fields\"", ",", "fields", ")", ";", "parameters", ".", "put", "(", "\"include_fields\"", ",", "includeFields", ")", ";...
Only retrieve certain fields from the item. @param fields a list of comma separated fields to retrieve. @param includeFields whether to include or exclude in the response the fields that were given. @return this filter instance
[ "Only", "retrieve", "certain", "fields", "from", "the", "item", "." ]
b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c
https://github.com/auth0/auth0-java/blob/b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c/src/main/java/com/auth0/client/mgmt/filter/FieldsFilter.java#L15-L19
54,794
auth0/auth0-java
src/main/java/com/auth0/json/mgmt/users/User.java
User.getCreatedAt
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") @JsonProperty("created_at") public Date getCreatedAt() { return createdAt; }
java
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") @JsonProperty("created_at") public Date getCreatedAt() { return createdAt; }
[ "@", "JsonFormat", "(", "shape", "=", "JsonFormat", ".", "Shape", ".", "STRING", ",", "pattern", "=", "\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\"", ")", "@", "JsonProperty", "(", "\"created_at\"", ")", "public", "Date", "getCreatedAt", "(", ")", "{", "return", "createdAt"...
Getter for the date this user was created on. @return the created at.
[ "Getter", "for", "the", "date", "this", "user", "was", "created", "on", "." ]
b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c
https://github.com/auth0/auth0-java/blob/b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c/src/main/java/com/auth0/json/mgmt/users/User.java#L333-L337
54,795
auth0/auth0-java
src/main/java/com/auth0/json/mgmt/users/User.java
User.getUpdatedAt
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") @JsonProperty("updated_at") public Date getUpdatedAt() { return updatedAt; }
java
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") @JsonProperty("updated_at") public Date getUpdatedAt() { return updatedAt; }
[ "@", "JsonFormat", "(", "shape", "=", "JsonFormat", ".", "Shape", ".", "STRING", ",", "pattern", "=", "\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\"", ")", "@", "JsonProperty", "(", "\"updated_at\"", ")", "public", "Date", "getUpdatedAt", "(", ")", "{", "return", "updatedAt"...
Getter for the date this user was last updated on. @return the updated at.
[ "Getter", "for", "the", "date", "this", "user", "was", "last", "updated", "on", "." ]
b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c
https://github.com/auth0/auth0-java/blob/b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c/src/main/java/com/auth0/json/mgmt/users/User.java#L344-L348
54,796
auth0/auth0-java
src/main/java/com/auth0/json/mgmt/users/User.java
User.getLastLogin
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") @JsonProperty("last_login") public Date getLastLogin() { return lastLogin; }
java
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") @JsonProperty("last_login") public Date getLastLogin() { return lastLogin; }
[ "@", "JsonFormat", "(", "shape", "=", "JsonFormat", ".", "Shape", ".", "STRING", ",", "pattern", "=", "\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\"", ")", "@", "JsonProperty", "(", "\"last_login\"", ")", "public", "Date", "getLastLogin", "(", ")", "{", "return", "lastLogin"...
Getter for the last login date. @return the last login.
[ "Getter", "for", "the", "last", "login", "date", "." ]
b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c
https://github.com/auth0/auth0-java/blob/b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c/src/main/java/com/auth0/json/mgmt/users/User.java#L425-L429
54,797
auth0/auth0-java
src/main/java/com/auth0/json/mgmt/guardian/TwilioFactorProvider.java
TwilioFactorProvider.setFrom
@Deprecated @JsonProperty("from") public void setFrom(String from) throws IllegalArgumentException { if (messagingServiceSID != null) { throw new IllegalArgumentException("You must specify either `from` or `messagingServiceSID`, but not both"); } this.from = from; }
java
@Deprecated @JsonProperty("from") public void setFrom(String from) throws IllegalArgumentException { if (messagingServiceSID != null) { throw new IllegalArgumentException("You must specify either `from` or `messagingServiceSID`, but not both"); } this.from = from; }
[ "@", "Deprecated", "@", "JsonProperty", "(", "\"from\"", ")", "public", "void", "setFrom", "(", "String", "from", ")", "throws", "IllegalArgumentException", "{", "if", "(", "messagingServiceSID", "!=", "null", ")", "{", "throw", "new", "IllegalArgumentException", ...
Setter for the Twilio From number. @param from the from number to set. @throws IllegalArgumentException when both `from` and `messagingServiceSID` are set @deprecated use the constructor instead
[ "Setter", "for", "the", "Twilio", "From", "number", "." ]
b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c
https://github.com/auth0/auth0-java/blob/b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c/src/main/java/com/auth0/json/mgmt/guardian/TwilioFactorProvider.java#L75-L82
54,798
auth0/auth0-java
src/main/java/com/auth0/json/mgmt/guardian/TwilioFactorProvider.java
TwilioFactorProvider.setMessagingServiceSID
@Deprecated @JsonProperty("messaging_service_sid") public void setMessagingServiceSID(String messagingServiceSID) throws IllegalArgumentException { if (from != null) { throw new IllegalArgumentException("You must specify either `from` or `messagingServiceSID`, but not both"); } ...
java
@Deprecated @JsonProperty("messaging_service_sid") public void setMessagingServiceSID(String messagingServiceSID) throws IllegalArgumentException { if (from != null) { throw new IllegalArgumentException("You must specify either `from` or `messagingServiceSID`, but not both"); } ...
[ "@", "Deprecated", "@", "JsonProperty", "(", "\"messaging_service_sid\"", ")", "public", "void", "setMessagingServiceSID", "(", "String", "messagingServiceSID", ")", "throws", "IllegalArgumentException", "{", "if", "(", "from", "!=", "null", ")", "{", "throw", "new"...
Setter for the Twilio Messaging Service SID. @param messagingServiceSID the messaging service SID. @throws IllegalArgumentException when both `from` and `messagingServiceSID` are set @deprecated use the constructor instead
[ "Setter", "for", "the", "Twilio", "Messaging", "Service", "SID", "." ]
b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c
https://github.com/auth0/auth0-java/blob/b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c/src/main/java/com/auth0/json/mgmt/guardian/TwilioFactorProvider.java#L101-L108
54,799
auth0/auth0-java
src/main/java/com/auth0/client/mgmt/filter/QueryFilter.java
QueryFilter.withQuery
public QueryFilter withQuery(String query) { try { String encodedQuery = urlEncode(query); parameters.put(KEY_QUERY, encodedQuery); return this; } catch (UnsupportedEncodingException ex) { //"Every implementation of the Java platform is required to support...
java
public QueryFilter withQuery(String query) { try { String encodedQuery = urlEncode(query); parameters.put(KEY_QUERY, encodedQuery); return this; } catch (UnsupportedEncodingException ex) { //"Every implementation of the Java platform is required to support...
[ "public", "QueryFilter", "withQuery", "(", "String", "query", ")", "{", "try", "{", "String", "encodedQuery", "=", "urlEncode", "(", "query", ")", ";", "parameters", ".", "put", "(", "KEY_QUERY", ",", "encodedQuery", ")", ";", "return", "this", ";", "}", ...
Filter by a query @param query the query expression to use @return this filter instance
[ "Filter", "by", "a", "query" ]
b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c
https://github.com/auth0/auth0-java/blob/b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c/src/main/java/com/auth0/client/mgmt/filter/QueryFilter.java#L16-L26