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

This region predicate matches keys that are enclosed or equal to a target box. More...

#include <spatial_enclosed_region.hpp>

Inherits Compare.

Public Member Functions

 enclosed_bounds ()
 The default constructor leaves everything un-initialized. More...
 
 enclosed_bounds (const Compare &compare, const Key &target)
 Set the target box and the comparator to the appropriate value. More...
 
relative_order operator() (dimension_type dim, dimension_type rank, const Key &key) const
 The operator that tells wheather the point is in region or not. More...
 

Private Member Functions

relative_order enclose_bounds_impl (dimension_type dim, dimension_type rank, const Key &key, llhh_layout_tag) const
 
relative_order enclose_bounds_impl (dimension_type dim, dimension_type, const Key &key, lhlh_layout_tag) const
 
relative_order enclose_bounds_impl (dimension_type dim, dimension_type rank, const Key &key, hhll_layout_tag) const
 
relative_order enclose_bounds_impl (dimension_type dim, dimension_type, const Key &key, hlhl_layout_tag) const
 

Private Attributes

Key _target
 The box value that will be used for the enclosing comparison. More...
 

Detailed Description

template<typename Key, typename Compare, typename Layout = llhh_layout_tag>
class spatial::enclosed_bounds< Key, Compare, Layout >

This region predicate matches keys that are enclosed or equal to a target box.

The keys must represent boxes, not points.

The Compare functor is expected to be a model of Generalized Comparison.

In order to interpret the box coordinates appropriately, enclosed_bounds expects a Layout template argument. Layout is one of:

Each layout provides information on how to interpret the coordinates returned for each dimension of the boxes values.

For a given target box $_P{(x, y)}$, this region predicate matches any box $_B{(x, y)}$ in a space of rank $r$ such as:

\[ \_sum{i=1}^{r} \left( _P{x_i} \le _B{x_i} \; and \; _B{y_i} \le _P{y_i} \right) \]

This predicate is used with spatial::region_iterator to define the spatial::enclosed_region_iterator.

Template Parameters
KeyA key type representing boxes.
CompareA model of Generalized Comparison
LayoutOne of llhh_layout_tag, lhlh_layout_tag, hhll_layout_tag or hlhl_layout_tag.
Concept:
This object is a model of Region Predicate

Definition at line 58 of file spatial_enclosed_region.hpp.

Constructor & Destructor Documentation

template<typename Key , typename Compare , typename Layout = llhh_layout_tag>
spatial::enclosed_bounds< Key, Compare, Layout >::enclosed_bounds ( )

The default constructor leaves everything un-initialized.

Definition at line 65 of file spatial_enclosed_region.hpp.

template<typename Key , typename Compare , typename Layout = llhh_layout_tag>
spatial::enclosed_bounds< Key, Compare, Layout >::enclosed_bounds ( const Compare &  compare,
const Key &  target 
)

Set the target box and the comparator to the appropriate value.

Definition at line 70 of file spatial_enclosed_region.hpp.

Member Function Documentation

template<typename Key , typename Compare , typename Layout = llhh_layout_tag>
relative_order spatial::enclosed_bounds< Key, Compare, Layout >::enclose_bounds_impl ( dimension_type  dim,
dimension_type  rank,
const Key &  key,
llhh_layout_tag   
) const
private

Definition at line 90 of file spatial_enclosed_region.hpp.

template<typename Key , typename Compare , typename Layout = llhh_layout_tag>
relative_order spatial::enclosed_bounds< Key, Compare, Layout >::enclose_bounds_impl ( dimension_type  dim,
dimension_type  ,
const Key &  key,
lhlh_layout_tag   
) const
private

Definition at line 103 of file spatial_enclosed_region.hpp.

template<typename Key , typename Compare , typename Layout = llhh_layout_tag>
relative_order spatial::enclosed_bounds< Key, Compare, Layout >::enclose_bounds_impl ( dimension_type  dim,
dimension_type  rank,
const Key &  key,
hhll_layout_tag   
) const
private

Definition at line 116 of file spatial_enclosed_region.hpp.

template<typename Key , typename Compare , typename Layout = llhh_layout_tag>
relative_order spatial::enclosed_bounds< Key, Compare, Layout >::enclose_bounds_impl ( dimension_type  dim,
dimension_type  ,
const Key &  key,
hlhl_layout_tag   
) const
private

Definition at line 129 of file spatial_enclosed_region.hpp.

template<typename Key , typename Compare , typename Layout = llhh_layout_tag>
relative_order spatial::enclosed_bounds< Key, Compare, Layout >::operator() ( dimension_type  dim,
dimension_type  rank,
const Key &  key 
) const

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

Definition at line 78 of file spatial_enclosed_region.hpp.

Member Data Documentation

template<typename Key , typename Compare , typename Layout = llhh_layout_tag>
Key spatial::enclosed_bounds< Key, Compare, Layout >::_target
private

The box value that will be used for the enclosing comparison.

Definition at line 87 of file spatial_enclosed_region.hpp.


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