Spatial C++ Library
Generic Multi-Dimensional Containers and Spatial Operations
|
Facilitate the creation of neighbor iterator that works with a quadrance metric. More...
#include <spatial_quadrance_neighbor.hpp>
Inherits spatial::neighbor_iterator< Ct, quadrance< Ct, DistanceType, Diff > >.
Public Member Functions | |
quadrance_neighbor_iterator () | |
template<typename AnyDistanceType > | |
quadrance_neighbor_iterator (const neighbor_iterator< Ct, quadrance< Ct, AnyDistanceType, Diff > > &other) | |
Public Member Functions inherited from spatial::neighbor_iterator< Ct, quadrance< Ct, DistanceType, Diff > > | |
neighbor_iterator () | |
Uninitialized iterator. More... | |
neighbor_iterator (Ct &container_, const quadrance< Ct, DistanceType, Diff > &metric_, const typename container_traits< Ct >::key_type &target_, const typename container_traits< Ct >::iterator &iter_, typename quadrance< Ct, DistanceType, Diff >::distance_type distance_) | |
The standard way to build this iterator: specify a metric to apply, an iterator on a container, and that container. More... | |
neighbor_iterator (Ct &container_, const quadrance< Ct, DistanceType, Diff > &metric_, const typename container_traits< Ct >::key_type &target_, dimension_type node_dim_, typename container_traits< Ct >::mode_type::node_ptr node_, typename quadrance< Ct, DistanceType, Diff >::distance_type distance_) | |
When the information of the dimension for the current node being pointed to by the iterator is known, this constructor saves some CPU cycle, by comparison to the other constructor. More... | |
neighbor_iterator (const typename container_traits< Ct >::rank_type &rank_, const typename container_traits< Ct >::key_compare &key_comp_, const quadrance< Ct, DistanceType, Diff > &metric_, const typename container_traits< Ct >::key_type &target_, dimension_type node_dim_, typename container_traits< Ct >::mode_type::node_ptr node_, typename quadrance< Ct, DistanceType, Diff >::distance_type distance_) | |
Build the iterator with a given rank and key compare functor, if the container is not available. More... | |
neighbor_iterator< Ct, quadrance< Ct, DistanceType, Diff > > & | operator++ () |
Increments the iterator and returns the incremented value. More... | |
neighbor_iterator< Ct, quadrance< Ct, DistanceType, Diff > > | operator++ (int) |
Increments the iterator but returns the value of the iterator before the increment. More... | |
neighbor_iterator< Ct, quadrance< Ct, DistanceType, Diff > > & | operator-- () |
Decrements the iterator and returns the decremented value. More... | |
neighbor_iterator< Ct, quadrance< Ct, DistanceType, Diff > > | operator-- (int) |
Decrements the iterator but returns the value of the iterator before the decrement. More... | |
key_compare | key_comp () const |
Return the key_comparator used by the iterator. More... | |
metric_type | metric () const |
Return the metric used by the iterator. More... | |
const distance_type & | distance () const |
Read-only accessor to the last valid distance of the iterator. More... | |
distance_type & | distance () |
Read/write accessor to the last valid distance of the iterator. More... | |
const key_type & | target_key () const |
Read-only accessor to the target of the iterator. More... | |
key_type & | target_key () |
Read/write accessor to the target of the iterator. More... | |
Public Member Functions inherited from spatial::details::Bidirectional_iterator< container_traits< Ct >::mode_type, container_traits< Ct >::rank_type > | |
Bidirectional_iterator () | |
Build an uninitialized iterator. More... | |
Bidirectional_iterator (const container_traits< Ct >::rank_type &rank_, node_ptr node_, dimension_type node_dim_) | |
Initialize the node at construction time. More... | |
reference | operator* () |
Returns the reference to the value pointed to by the iterator. More... | |
pointer | operator-> () |
Returns a pointer to the value pointed to by the iterator. More... | |
bool | operator== (const Const_node_iterator< container_traits< Ct >::mode_type > &x) const |
A bidirectional iterator can be compared with a node iterator if they work on identical linking modes. More... | |
bool | operator!= (const Const_node_iterator< container_traits< Ct >::mode_type > &x) const |
A bidirectional iterator can be compared for inequality with a node iterator if they work on identical linking modes. More... | |
const rank_type & | rank () const |
Return the current Rank type used by the iterator. More... | |
dimension_type | dimension () const |
Return the number of dimensions stored by the Rank of the iterator. More... | |
operator Node_iterator< container_traits< Ct >::mode_type > () const | |
This iterator can be casted silently into a container iterator. More... | |
operator Const_node_iterator< container_traits< Ct >::mode_type > () const | |
This iterator can be casted silently into a container iterator. More... | |
Private Types | |
typedef enable_if< import::is_arithmetic< DistanceType > >::type | check_concept_distance_type_is_arithmetic |
Additional Inherited Members | |
Public Types inherited from spatial::neighbor_iterator< Ct, quadrance< Ct, DistanceType, Diff > > | |
typedef container_traits< Ct >::key_compare | key_compare |
Key comparator type transferred from the container. More... | |
typedef quadrance< Ct, DistanceType, Diff > | metric_type |
The metric type used by the iterator. More... | |
typedef quadrance< Ct, DistanceType, Diff >::distance_type | distance_type |
The distance type that is read from metric_type. More... | |
typedef container_traits< Ct >::key_type | key_type |
The key type that is used as a target for the nearest neighbor search. More... | |
Public Types inherited from spatial::details::Bidirectional_iterator< container_traits< Ct >::mode_type, container_traits< Ct >::rank_type > | |
typedef mutate< typename container_traits< Ct >::mode_type::value_type >::type | value_type |
The value_type can receive a copy of the reference pointed to be the iterator. More... | |
typedef container_traits< Ct >::mode_type::value_type & | reference |
The reference type of the object pointed to by the iterator. More... | |
typedef container_traits< Ct >::mode_type::value_type * | pointer |
The pointer type of the object pointed to by the iterator. More... | |
typedef std::ptrdiff_t | difference_type |
The difference_type returned by the distance between 2 iterators. More... | |
typedef std::bidirectional_iterator_tag | iterator_category |
The iterator category that is always Bidirectional_iterator_tag . More... | |
typedef container_traits< Ct >::mode_type::node_ptr | node_ptr |
The type for the node pointed to by the iterator. More... | |
typedef container_traits< Ct >::rank_type | rank_type |
The type of rank used by the iterator. More... | |
typedef container_traits< Ct >::mode_type::invariant_category | invariant_category |
The invariant category of the the iterator. More... | |
Public Attributes inherited from spatial::details::Bidirectional_iterator< container_traits< Ct >::mode_type, container_traits< Ct >::rank_type > | |
node_ptr | node |
The pointer to the current node. More... | |
dimension_type | node_dim |
The dimension of the current node. More... | |
Facilitate the creation of neighbor iterator that works with a quadrance metric.
This class has an associated group of functions designed to initialize the iterator position at the beginning, end, lower bound or upper bound of the container to iterate.
Ct | The container to iterate. |
DistanceType | The type used to represent the distance, it must be a primitive arithmetic type. |
Diff | The difference functor that will compute the difference between 2 key element in the container, along a specific dimension. See Difference for further explanation. |
Definition at line 42 of file spatial_quadrance_neighbor.hpp.
|
private |
Definition at line 47 of file spatial_quadrance_neighbor.hpp.
spatial::quadrance_neighbor_iterator< Ct, DistanceType, Diff >::quadrance_neighbor_iterator | ( | ) |
Definition at line 50 of file spatial_quadrance_neighbor.hpp.
spatial::quadrance_neighbor_iterator< Ct, DistanceType, Diff >::quadrance_neighbor_iterator | ( | const neighbor_iterator< Ct, quadrance< Ct, AnyDistanceType, Diff > > & | other | ) |
Definition at line 54 of file spatial_quadrance_neighbor.hpp.