Lookup and Queries
Method |
---|
Multimap |
Returns the number of elements matching specific key |
size_type count(const key_type &p) const; |
template <class L> size_type count(const L &p) const |
Finds element with specific key |
iterator find(const key_type &p); |
const_iterator find(const key_type &p) const; |
template <class L> iterator find(const L &p) |
template <class L> const_iterator find(const L &p) const; |
Checks if the container contains element with specific key |
bool contains(const key_type &p) const; |
template <class L> bool contains(const L &p) const; |
SpatialContainer |
Get iterator to first element that passes the predicates |
const_iterator find(const predicate_list_type &ps) const noexcept; |
iterator find(const predicate_list_type &ps) noexcept; |
Find intersection between point and container |
iterator find_intersection(const key_type &p); |
const_iterator find_intersection(const key_type &p) const; |
Find intersection between container and query box |
iterator find_intersection(const key_type &lb, const key_type &ub); |
const_iterator find_intersection(const key_type &lb, const key_type &ub) const; |
Find points inside a query box (excluding borders) |
iterator find_within(const key_type &lb, const key_type &ub); |
const_iterator find_within(const key_type &lb, const key_type &ub) const |
Find points outside a query box |
iterator find_disjoint(const key_type &lb, const key_type &ub); |
const_iterator find_disjoint(const key_type &lb, const key_type &ub) const; |
Find the elements closest to a point |
iterator find_nearest(const key_type &p); |
const_iterator find_nearest(const key_type &p) const; |
iterator find_nearest(const key_type &p, size_t k); |
const_iterator find_nearest(const key_type &p, size_t k) const; |
iterator find_nearest(const box_type &b, size_t k); |
const_iterator find_nearest(const box_type &b, size_t k) const; |
Find min/max elements |
iterator max_element(size_t dimension) |
const_iterator max_element(size_t dimension) const |
iterator min_element(size_t dimension) |
const_iterator min_element(size_t dimension) const |
FrontContainer |
Find sets of dominated elements |
const_iterator find_dominated(const key_type &p) const |
iterator find_dominated(const key_type &p) |
Find nearest point excluding \(p\) |
const_iterator find_nearest_exclusive(const key_type &p) const |
iterator find_nearest_exclusive(const key_type &p) |
Find extreme elements |
const_iterator ideal_element(size_t d) const |
iterator ideal_element(size_t d) |
const_iterator nadir_element(size_t d) const |
iterator nadir_element(size_t d) |
const_iterator worst_element(size_t d) const |
iterator worst_element(size_t d) |
ArchiveContainer |
Find sets of dominated elements |
front_set_type::const_iterator find_front(const key_type &p) const |
front_set_type::iterator find_front(const key_type &p) |
Parameters
ps
- a list of predicatesp
- a point of typekey_value
or convertible tokey_value
lb
andub
- lower and upper bounds of the query boxk
- number of nearest elements
Return value
count()
:size_type
: number of elements with a given keycontainer()
:bool
:true
if and only if the container contains an element with the given keyp
find_*
:iterator
andconst_iterator
- Iterator to the first element that passes the query predicatesfind
returns a normal iterator- all other
find_*
functions return a query iterator (see below) size_type
- Number of elements erasedfront_set_type::const_iterator
- find first front not dominated byp
Complexity
Let \(|A|\) denote the number of fronts in the archive:
find_front
- \(O(\log |A|)\)- others - O(m |A| \log n)
Due to the curse of dimensionality, we usually expect that \(|A| \ll n\), especially as \(m\) grows.
Notes
The function find_front
will look for the first front that does not dominate the element p
. This is an important sub-component of the insertion algorithm.
Note
All other definitions and requirements of a FrontContainer also apply here.
Examples
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 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|