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

  Constructors
  Constructor
  Description
  `NonDominatedSolutions(List<Comparator<T>> theComparators)`
  `NonDominatedSolutions(List<Comparator<T>> theComparators, int initialCapacity)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `add(T theSolution)`
  Add a solution to the non-dominated solutions
  `boolean`
  `addAll(Collection<? extends T> c)`
  `void`
  `clear()`
  `boolean`
  `contains(Object o)`
  `boolean`
  `containsAll(Collection<?> c)`
  `T`
  `get(int index)`
  `List<? extends Number>`
  `getIdealPoint()`
  `List<? extends Number>`
  `getNadirPoint()`
  `boolean`
  `isEmpty()`
  `Iterator<T>`
  `iterator()`
  `boolean`
  `remove(Object o)`
  `boolean`
  `removeAll(Collection<?> c)`
  `boolean`
  `retainAll(Collection<?> c)`
  `int`
  `size()`
  `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`

  ### Methods inherited from interface java.util.Collection

  `equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray`

  ### Methods inherited from interface java.lang.Iterable

  `forEach`

- ## Constructor Details

  - ### NonDominatedSolutions

    public NonDominatedSolutions(List<Comparator<T>> theComparators)

  - ### NonDominatedSolutions

    public NonDominatedSolutions(List<Comparator<T>> theComparators, int initialCapacity)

- ## Method Details

  - ### add

    public boolean add(T theSolution)
    Add a solution to the non-dominated solutions
    Specified by:
      `add` in interface `Collection<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

    public T get(int index)

  - ### getIdealPoint

    public List<? extends 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 List<? extends 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 interface `Collection<T extends Iterable<? extends Number>>`

  - ### isEmpty

    public boolean isEmpty()
    Specified by:
      `isEmpty` in interface `Collection<T extends Iterable<? extends Number>>`

  - ### contains

    public boolean contains(Object o)
    Specified by:
      `contains` in interface `Collection<T extends Iterable<? extends Number>>`

  - ### iterator

    public Iterator<T> iterator()
    Specified by:
      `iterator` in interface `Collection<T extends Iterable<? extends Number>>`
    Specified by:
      `iterator` in interface `Iterable<T extends Iterable<? extends Number>>`

  - ### toArray

    public Object[] toArray()
    Specified by:
      `toArray` in interface `Collection<T extends Iterable<? extends Number>>`

  - ### toArray

    public <T1> T1[] toArray(T1[] a)
    Specified by:
      `toArray` in interface `Collection<T extends Iterable<? extends Number>>`

  - ### remove

    public boolean remove(Object o)
    Specified by:
      `remove` in interface `Collection<T extends Iterable<? extends Number>>`

  - ### containsAll

    public boolean containsAll(Collection<?> c)
    Specified by:
      `containsAll` in interface `Collection<T extends Iterable<? extends Number>>`

  - ### addAll

    public boolean addAll(Collection<? extends T> c)
    Specified by:
      `addAll` in interface `Collection<T extends Iterable<? extends Number>>`

  - ### removeAll

    public boolean removeAll(Collection<?> c)
    Specified by:
      `removeAll` in interface `Collection<T extends Iterable<? extends Number>>`

  - ### retainAll

    public boolean retainAll(Collection<?> c)
    Specified by:
      `retainAll` in interface `Collection<T extends Iterable<? extends Number>>`

  - ### clear

    public void clear()
    Specified by:
      `clear` in interface `Collection<T extends Iterable<? extends Number>>`