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 boolean
add(T theSolution)
Add a solution to the non-dominated solutionsboolean
addAll(java.util.Collection<? extends T> c)
void
clear()
boolean
contains(java.lang.Object o)
boolean
containsAll(java.util.Collection<?> c)
T
get(int index)
java.util.List<? extends java.lang.Number>
getIdealPoint()
java.util.List<? extends java.lang.Number>
getNadirPoint()
boolean
isEmpty()
java.util.Iterator<T>
iterator()
boolean
remove(java.lang.Object o)
boolean
removeAll(java.util.Collection<?> c)
boolean
retainAll(java.util.Collection<?> c)
int
size()
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:
add
in 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:
size
in interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
contains
in 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:
toArray
in interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
toArray
public <T1> T1[] toArray(T1[] a)
- Specified by:
toArray
in interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove
in interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAll
in interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
addAll
public boolean addAll(java.util.Collection<? extends T> c)
- Specified by:
addAll
in interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAll
in interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAll
in interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Collection<T extends java.lang.Iterable<? extends java.lang.Number>>
-
-