Capacity and Reference Points
| Method |
|---|
| MultimapContainer |
| Check size |
[[nodiscard]] bool empty() const noexcept; |
[[nodiscard]] size_type size() const noexcept; |
[[nodiscard]] size_type max_size() const noexcept; |
| SpatialContainer |
| Check dimensions |
[[nodiscard]] size_type dimensions() const noexcept; |
| Get max/min values |
dimension_type max_value(size_type dimension) const; |
dimension_type min_value(size_type dimension) const; |
| FrontContainer |
| Reference points |
key_type ideal() const; |
dimension_type ideal(size_type dimension) const; |
key_type nadir() const; |
dimension_type nadir(size_type dimension) const; |
key_type worst() const; |
dimension_type worst(size_type dimension) const; |
| Target directions |
[[nodiscard]] bool is_minimization() const noexcept |
[[nodiscard]] bool is_maximization() const noexcept |
[[nodiscard]] bool is_minimization(size_t dimension) const noexcept |
[[nodiscard]] bool is_maximization(size_t dimension) const noexcept |
| ArchiveContainer |
[[nodiscard]] size_t capacity() const noexcept |
size_type size_fronts() const noexcept |
Parameters
dimension- index of the dimension for which we want the minimum or maximum value
Return value
empty()-trueif and only if container (equivalent but more efficient thanbegin() == end())size()- The number of elements in the containermax_size()- An upper bound on the maximum number of elements the container can holddimensions()- Number of dimensions in the container (same asM, whenM != 0)max_value(d)- Maximum value in a given dimensiondmin_value(d)- Minimum value in a given dimensiondideal()- Key with best value possible in each dimensionideal(d)- Best value possible in a given dimensiondnadir()- Key with worst value possible in each dimensionnadir(d)- Worst value possible in a given dimensiondworst()- Key with worst value possible in each dimensionworst(d)- Worst value possible in a given dimensiondis_minimization(),is_maximization(): true if and only if all directions are minimization / maximizationis_minimization(i),is_maximization(i): true if and only if dimensioniis minimization / maximizationcapacity(): maximum number of elements in the archivesize_front(): number of fronts in the archive
Complexity
\[
O(1)
\]
Notes
For archives, the nadir and worst function will not necessarily return the same points and values because the worst point in a given dimension does have to match the worst value in the first front of the archive.
Note
All other requirements of fronts apply here.
Example
Continuing from the previous example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | |