Spatial C++ Library
Generic Multi-Dimensional Containers and Spatial Operations
spatial::closed_bounds< Key, Compare > Class Template Reference

A model of Region Predicate that checks if a value of type Key is contained within the closed boundaries defined by lower and upper. More...

#include <spatial_closed_region.hpp>

Inherits Compare.

Public Member Functions

 closed_bounds ()
 The default constructor leaves everything un-initialized. More...
 
 closed_bounds (const Compare &compare, const Key &lower, const Key &upper)
 Set the lower and upper boundary for the orthogonal region search. More...
 
relative_order operator() (dimension_type dim, dimension_type, const Key &key) const
 The operator that tells wheather the point is in region or not. More...
 

Private Attributes

Key _lower
 The lower bound for the orthogonal region iterator. More...
 
Key _upper
 The upper bound for the orthogonal region iterator. More...
 

Detailed Description

template<typename Key, typename Compare>
class spatial::closed_bounds< Key, Compare >

A model of Region Predicate that checks if a value of type Key is contained within the closed boundaries defined by lower and upper.

To be very specific, for any dimension $d$ we define that $x$ is contained in the closed boundaries $(lower, upper)$ if:

\[lower_d <= x_d <= upper_d\]

Simply stated, closed_bounds used in a region_iterator will match all keys that are within the region defined by lower and upper, even if they "touch" the edge of the region.

Template Parameters
KeyThe type used during the comparison.
CompareThe comparison functor using to compare 2 objects of type Key along the same dimension.
Concept:
This object is a model of Region Predicate

Definition at line 42 of file spatial_closed_region.hpp.

Constructor & Destructor Documentation

template<typename Key , typename Compare >
spatial::closed_bounds< Key, Compare >::closed_bounds ( )

The default constructor leaves everything un-initialized.

Definition at line 49 of file spatial_closed_region.hpp.

template<typename Key , typename Compare >
spatial::closed_bounds< Key, Compare >::closed_bounds ( const Compare &  compare,
const Key &  lower,
const Key &  upper 
)

Set the lower and upper boundary for the orthogonal region search.

Definition at line 55 of file spatial_closed_region.hpp.

Member Function Documentation

template<typename Key , typename Compare >
relative_order spatial::closed_bounds< Key, Compare >::operator() ( dimension_type  dim,
dimension_type  ,
const Key &  key 
) const

The operator that tells wheather the point is in region or not.

Definition at line 64 of file spatial_closed_region.hpp.

Member Data Documentation

template<typename Key , typename Compare >
Key spatial::closed_bounds< Key, Compare >::_lower
private

The lower bound for the orthogonal region iterator.

Definition at line 77 of file spatial_closed_region.hpp.

template<typename Key , typename Compare >
Key spatial::closed_bounds< Key, Compare >::_upper
private

The upper bound for the orthogonal region iterator.

Definition at line 82 of file spatial_closed_region.hpp.


The documentation for this class was generated from the following file: