Package com.complexible.common.collect
Class NonDominatedSolutions<T extends java.lang.Iterable<? extends java.lang.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:
java.lang.Iterable<T>,java.util.Collection<T>
public class NonDominatedSolutions<T extends java.lang.Iterable<? extends java.lang.Number>> extends java.lang.Object implements java.util.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) < 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') < 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
Constructors Constructor Description NonDominatedSolutions(java.util.List<java.util.Comparator<T>> theComparators)NonDominatedSolutions(java.util.List<java.util.Comparator<T>> theComparators, int initialCapacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T theSolution)Add a solution to the non-dominated solutionsbooleanaddAll(java.util.Collection<? extends T> c)voidclear()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)Tget(int index)java.util.List<? extends java.lang.Number>getIdealPoint()java.util.List<? extends java.lang.Number>getNadirPoint()booleanisEmpty()java.util.Iterator<T>iterator()booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)intsize()java.lang.Object[]toArray()<T1> T1[]toArray(T1[] a)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
add
public boolean add(T theSolution)
Add a solution to the non-dominated solutions- Specified by:
addin interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>- Parameters:
theSolution- element to be added- Returns:
- true, if the element is a non-dominated solution and was added
-
get
public T get(int index)
-
getIdealPoint
public java.util.List<? extends java.lang.Number> getIdealPoint()
- Returns:
- a list of values where each entry i has the smallest feasible objective value of objective i among all solutions
-
getNadirPoint
public java.util.List<? extends java.lang.Number> 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 interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
containsin interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
iterator
public java.util.Iterator<T> iterator()
-
toArray
public java.lang.Object[] toArray()
- Specified by:
toArrayin interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
toArray
public <T1> T1[] toArray(T1[] a)
- Specified by:
toArrayin interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
removein interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAllin interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
addAll
public boolean addAll(java.util.Collection<? extends T> c)
- Specified by:
addAllin interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAllin interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAllin interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
-