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

A model of Region Predicate that defines an orthogonal region and checks if a value of type Key is contained within the boundaries marked by lower and upper. More...

#include <spatial_region.hpp>

Inherits Compare.

Public Member Functions

 bounds ()
 The default constructor leaves everything un-initialized. More...
 
 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 returns true if the key is within the boundaries, false if it isn't. More...
 

Private Attributes

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

Detailed Description

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

A model of Region Predicate that defines an orthogonal region and checks if a value of type Key is contained within the boundaries marked by lower and upper.

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

\[lower_d <= x_d < upper_d\]

Simply stated, bounds used in a spatial::region_iterator will match all keys that are within the region defined by lower and upper, but not "touching" the upper edge.

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 46 of file spatial_region.hpp.

Constructor & Destructor Documentation

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

The default constructor leaves everything un-initialized.

Definition at line 53 of file spatial_region.hpp.

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

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

Definition at line 60 of file spatial_region.hpp.

Member Function Documentation

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

The operator that returns true if the key is within the boundaries, false if it isn't.

Definition at line 69 of file spatial_region.hpp.

Member Data Documentation

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

The lower bound for the orthogonal region.

Definition at line 82 of file spatial_region.hpp.

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

The upper bound for the orthogonal region.

Definition at line 87 of file spatial_region.hpp.


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