Spatial C++ Library
Generic Multi-Dimensional Containers and Spatial Operations
|
Extra information needed by the iterator to perform its work. More...
#include <spatial_neighbor.hpp>
Inherits key_compare< Ct >.
Public Member Functions | |
Neighbor_data () | |
Build an unintialized neighbor data object. More... | |
Neighbor_data (const typename container_traits< Ct >::key_compare &container, const Metric &metric, const typename container_traits< Ct >::key_type &key, typename Metric::distance_type distance) | |
Builds required neighbor data from the given container, metric and dimension. More... | |
Public Attributes | |
Compress< Metric, typename container_traits< Ct >::key_type > | _target |
The target of the iteration; element of the container are iterate from the closest to the element furthest away from the target. More... | |
Metric::distance_type | _distance |
The last valid computed value of the distance. More... | |
Extra information needed by the iterator to perform its work.
This information is copied to each iterator from a given container.
Although it may be possible to modify this information directly from it's members, it may be unwise to do so, as it could invalidate the iterator and cause the program to behave unexpectedly. If any of this information needs to be modified, it is probably recommended to create a new iterator altogether.
Ct | The container to which these iterator relate to. |
Metric | The type of Metric applied to the iterator. |
DistanceType | The type used to store the distance value. |
Definition at line 42 of file spatial_neighbor.hpp.
spatial::details::Neighbor_data< Ct, Metric >::Neighbor_data | ( | ) |
Build an unintialized neighbor data object.
Definition at line 45 of file spatial_neighbor.hpp.
spatial::details::Neighbor_data< Ct, Metric >::Neighbor_data | ( | const typename container_traits< Ct >::key_compare & | container, |
const Metric & | metric, | ||
const typename container_traits< Ct >::key_type & | key, | ||
typename Metric::distance_type | distance | ||
) |
Builds required neighbor data from the given container, metric and dimension.
container | The container being iterated. |
metric | The metric to apply during iteration |
key | The key representing the iteration target. |
distance | Cached distance value from the last iterator's distance computation. |
Definition at line 58 of file spatial_neighbor.hpp.
Metric::distance_type spatial::details::Neighbor_data< Ct, Metric >::_distance |
The last valid computed value of the distance.
The value stored is only valid if the iterator is not past-the-end.
Definition at line 75 of file spatial_neighbor.hpp.
Compress<Metric, typename container_traits<Ct>::key_type> spatial::details::Neighbor_data< Ct, Metric >::_target |
The target of the iteration; element of the container are iterate from the closest to the element furthest away from the target.
Definition at line 69 of file spatial_neighbor.hpp.