public class SolutionUtils extends Object
| Constructor and Description |
|---|
SolutionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <S extends Solution<?>> |
averageDistanceToSolutionList(S solution,
List<S> solutionList)
Returns the average euclidean distance of a solution to the solutions of a list.
|
static <S extends Solution<?>> |
distanceBetweenObjectives(S firstSolution,
S secondSolution)
Returns the euclidean distance between a pair of solutions in the objective space
|
static double |
distanceBetweenSolutionsInObjectiveSpace(DoubleSolution solutionI,
DoubleSolution solutionJ)
Returns the distance between two solutions in the search space.
|
static double |
distanceToSolutionListInSolutionSpace(DoubleSolution solution,
List<DoubleSolution> solutionList)
Returns the minimum distance from a
Solution to a SolutionSet according to
the encodings.variable values. |
static <S extends Solution<?>> |
getBestSolution(S solution1,
S solution2,
Comparator<S> comparator)
Return the best solution between those passed as arguments.
|
static <S extends Solution<?>> |
getBestSolution(S solution1,
S solution2,
Comparator<S> comparator,
BinaryOperator<S> equalityPolicy)
Return the best solution between those passed as arguments.
|
static <S extends Solution<?>> |
getBestSolution(S solution1,
S solution2,
Comparator<S> comparator,
RandomGenerator<Double> randomGenerator)
Return the best solution between those passed as arguments.
|
static Solution<?> |
normalize(Solution<?> solution,
double[] minValues,
double[] maxValues)
It returns the normalized solution given the minimum and maximum values for
each objective
|
public static <S extends Solution<?>> S getBestSolution(S solution1, S solution2, Comparator<S> comparator)
public static <S extends Solution<?>> S getBestSolution(S solution1, S solution2, Comparator<S> comparator, RandomGenerator<Double> randomGenerator)
randomGenerator - RandomGenerator for the equality casepublic static <S extends Solution<?>> S getBestSolution(S solution1, S solution2, Comparator<S> comparator, BinaryOperator<S> equalityPolicy)
public static <S extends Solution<?>> double distanceBetweenObjectives(S firstSolution, S secondSolution)
public static double distanceToSolutionListInSolutionSpace(DoubleSolution solution, List<DoubleSolution> solutionList)
Solution to a SolutionSet according to
the encodings.variable values.solution - The Solution.solutionList - The List> .public static double distanceBetweenSolutionsInObjectiveSpace(DoubleSolution solutionI, DoubleSolution solutionJ)
solutionI - The first Solution.solutionJ - The second Solution.public static <S extends Solution<?>> double averageDistanceToSolutionList(S solution, List<S> solutionList)
public static Solution<?> normalize(Solution<?> solution, double[] minValues, double[] maxValues)
solution - to be normalizedminValues - minimum values for each objectivemaxValues - maximum value for each objectiveCopyright © 2019. All rights reserved.