Package es.urjc.etsii.grafo.mo.pareto
Class ParetoSet<S extends Solution<S,I>,I extends Instance>
java.lang.Object
es.urjc.etsii.grafo.mo.pareto.ParetoSet<S,I>
- Direct Known Subclasses:
NDTree,ParetoSimpleList
-
Constructor Summary
ConstructorsConstructorDescriptionParetoSet(int nObjectives) Create a new Pareto set that will track solutions with n objectives -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanadd(double[] solution) booleanTry to add multiple solutions to the Pareto frontbooleanTry add solution to Pareto front.voidclear()protected SejectedSolution(double[] ejectedSolution) longvoidabstract intsize()abstract Stream<double[]> stream()double[][]toMatrix()toText()tryAddToElite(S newSol, TreeSet<S> elite) static booleanweaklyDominates(double[] a, double[] b) Check if a solution weakly dominates another
-
Constructor Details
-
ParetoSet
public ParetoSet(int nObjectives) Create a new Pareto set that will track solutions with n objectives- Parameters:
nObjectives-
-
-
Method Details
-
resetElites
public void resetElites() -
getLastModifiedTime
public long getLastModifiedTime() -
add
Try to add multiple solutions to the Pareto front- Parameters:
solutions- solutions to try to add- Returns:
- true if the Pareto front has been modified, false otherwise (all solutions are dominated by those in the Pareto front)
-
add
Try add solution to Pareto front. Solution is only added if it is not dominated by any other solution in the Pareto front.- Parameters:
newSol- solution to try to add to Pareto front- Returns:
- true if the solution was added to the pareto front and therefore the Pareto front has been updated, false otherwise
-
weaklyDominates
public static boolean weaklyDominates(double[] a, double[] b) Check if a solution weakly dominates another- Parameters:
a- solution A scoresb- solution B scores- Returns:
- true if A weakly dominates B, false otherwise
-
tryAddToElite
-
clear
public void clear() -
add
public abstract boolean add(double[] solution) -
size
public abstract int size() -
stream
-
toText
-
toMatrix
public double[][] toMatrix() -
getElites
-
getTrackedSolutions
-
ejectedSolution
-