Package com.complexible.common.collect
Class NonDominatedSolutions<T extends Iterable<? extends Number>>
java.lang.Object
com.complexible.common.collect.NonDominatedSolutions<T>
- Type Parameters:
T- The type of elements in the collection. They combine both the solution x and numeric objective function values fi(x) which can be iterated
- All Implemented Interfaces:
Iterable<T>,Collection<T>
public class NonDominatedSolutions<T extends Iterable<? extends Number>>
extends Object
implements Collection<T>
A collection which keeps all non-dominated solutions in terms of a (multi-objective) optimization problem.
Let X be the search space of an optimization problem, we call x \in X a solution of the problem.
Furthermore, let F = [f1,...,fn] be the objective functions of an optimization problem.
The objective function values of a solution x are given as [f1(x), ... , fn(x)]
A solution x dominates a solution x', iff fi(x) invalid input: '<' fi(x') for at least one fi \in F and at the same time there does not exist a fj \in F
such that fj(x') invalid input: '<' fj(x).
For every solution x in this collection, it holds that there does not exist another solution x' such that x' dominates x.
Note: The term solution in this context does not refer to a SPARQL solution (mapping).
- Since:
- 9.3
- Author:
- Lars Heling
-
Constructor Summary
ConstructorsConstructorDescriptionNonDominatedSolutions(List<Comparator<T>> theComparators) NonDominatedSolutions(List<Comparator<T>> theComparators, int initialCapacity) -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdd a solution to the non-dominated solutionsbooleanaddAll(Collection<? extends T> c) voidclear()booleanbooleancontainsAll(Collection<?> c) get(int index) booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Object[]toArray()<T1> T1[]toArray(T1[] a) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
NonDominatedSolutions
-
NonDominatedSolutions
-
-
Method Details
-
add
Add a solution to the non-dominated solutions- Specified by:
addin interfaceCollection<T extends Iterable<? extends Number>>- Parameters:
theSolution- element to be added- Returns:
- true, if the element is a non-dominated solution and was added
-
get
-
getIdealPoint
- Returns:
- a list of values where each entry i has the smallest feasible objective value of objective i among all solutions
-
getNadirPoint
- Returns:
- a list of values where each entry i has the largest feasible objective value of objective i among all solutions
-
size
public int size()- Specified by:
sizein interfaceCollection<T extends Iterable<? extends Number>>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<T extends Iterable<? extends Number>>
-
contains
- Specified by:
containsin interfaceCollection<T extends Iterable<? extends Number>>
-
iterator
-
toArray
- Specified by:
toArrayin interfaceCollection<T extends Iterable<? extends Number>>
-
toArray
public <T1> T1[] toArray(T1[] a) - Specified by:
toArrayin interfaceCollection<T extends Iterable<? extends Number>>
-
remove
- Specified by:
removein interfaceCollection<T extends Iterable<? extends Number>>
-
containsAll
- Specified by:
containsAllin interfaceCollection<T extends Iterable<? extends Number>>
-
addAll
- Specified by:
addAllin interfaceCollection<T extends Iterable<? extends Number>>
-
removeAll
- Specified by:
removeAllin interfaceCollection<T extends Iterable<? extends Number>>
-
retainAll
- Specified by:
retainAllin interfaceCollection<T extends Iterable<? extends Number>>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<T extends Iterable<? extends Number>>
-