mdds::
point_quad_tree
¶Public Types
key_type
¶value_type
¶size_type
¶data_array_type
¶Public Functions
point_quad_tree
()¶point_quad_tree
(const point_quad_tree &r)¶~point_quad_tree
()¶insert
(key_type x, key_type y, value_type data)¶Insert a new data at specified coordinates. It overwrites existing data in case one exists at the specified coordinates.
x
- x coordinate of new data position
y
- y coordinate of new data position
data
- data being inserted at the specified coordinates.
search_region
(key_type x1, key_type y1, key_type x2, key_type y2, data_array_type &result) const¶Perform region search (aka window search), that is, find all points that fall within specified rectangular region. The boundaries are inclusive.
x1
- left coordinate of the search region
y1
- top coordinate of the search region
x2
- right coordinate of the search region
y2
- bottom coordinate of the search region
result
- this array will contain all data found without specified region.
search_region
(key_type x1, key_type y1, key_type x2, key_type y2) const¶Perform region search (aka window search), that is, find all points that fall within specified rectangular region. The boundaries are inclusive.
x1
- left coordinate of the search region
y1
- top coordinate of the search region
x2
- right coordinate of the search region
y2
- bottom coordinate of the search region
find
(key_type x, key_type y) const¶Find data at specified coordinates. If no data exists at the specified coordinates, this method throws a point_quad_tree::data_not_found
exception.
x
- x coordinate
y
- y coordinate
remove
(key_type x, key_type y)¶Remove data from specified coordinates. This method does nothing if no data exists at the specified coordinates.
x
- x coordinate
y
- y coordinate
swap
(point_quad_tree &r)¶Swap the internal state with another instance.
r
- another instance to swap internals with.
clear
()¶Remove all stored data.
empty
() const¶Check whether or not the container is empty.
size
() const¶Get the number of stored data.
get_node_access
() const¶Get read-only access to the internal quad node tree.
operator=
(const point_quad_tree &r)¶operator==
(const point_quad_tree &r) const¶operator!=
(const point_quad_tree &r) const¶data_not_found
¶Inherits from exception
node_access
¶Node wrapper to allow read-only access to the internal quad node structure.
Public Functions
northeast
() const¶northwest
() const¶southeast
() const¶southwest
() const¶data
() const¶x
() const¶y
() const¶operator bool
() const¶operator==
(const node_access &r) const¶operator=
(const node_access &r)¶node_access
()¶node_access
(const node_access &r)¶~node_access
()¶point
¶search_results
¶Public Functions
search_results
()¶search_results
(const search_results &r)¶begin
()¶end
()¶const_iterator
¶Public Types
value_type
¶pointer
¶reference
¶difference_type
¶iterator_category
¶Public Functions
const_iterator
(res_nodes_ptr &ptr)¶const_iterator
(const const_iterator &r)¶operator=
(const const_iterator &r)¶operator==
(const const_iterator &r) const¶operator!=
(const const_iterator &r) const¶operator*
() const¶operator->
() const¶operator++
()¶operator--
()¶Friends
mdds::point_quad_tree::point_quad_tree< _Key, _Value >::search_results