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

This class is a model of Region Predicate that matches any keys that is overlapping with a given test box. More...

#include <spatial_overlap_region.hpp>

Inherits Compare.

Public Member Functions

 overlap_bounds ()
 The default constructor leaves everything un-initialized. More...
 
 overlap_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 overlap_bounds_impl (dimension_type dim, dimension_type rank, const Key &key, llhh_layout_tag) const
 
relative_order overlap_bounds_impl (dimension_type dim, dimension_type, const Key &key, lhlh_layout_tag) const
 
relative_order overlap_bounds_impl (dimension_type dim, dimension_type rank, const Key &key, hhll_layout_tag) const
 
relative_order overlap_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 overlaping comparison. More...
 

Detailed Description

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

This class is a model of Region Predicate that matches any keys that is overlapping with a given test box.

In this predicate, keys should be representing boxes, and not points.

In this predicate, the Compare functor is expected to be a model of Generalized Comparison, in order to compare information on different dimensions.

Additionally, in order to interpret the boxe's coordinates appropriately, overlap_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 keys.

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( _B{x_i} \le _P{x_i} \le _B{y_i} \; or \; _B{x_i} \le _P{y_i} \le _B{y_i} \right) \]

This predicate is used together with spatial::region_iterator to make up spatial::overlap_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 61 of file spatial_overlap_region.hpp.

Constructor & Destructor Documentation

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

The default constructor leaves everything un-initialized.

Definition at line 68 of file spatial_overlap_region.hpp.

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

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

Definition at line 73 of file spatial_overlap_region.hpp.

Member Function Documentation

template<typename Key , typename Compare , typename Layout = llhh_layout_tag>
relative_order spatial::overlap_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 81 of file spatial_overlap_region.hpp.

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

Definition at line 93 of file spatial_overlap_region.hpp.

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

Definition at line 104 of file spatial_overlap_region.hpp.

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

Definition at line 113 of file spatial_overlap_region.hpp.

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

Definition at line 124 of file spatial_overlap_region.hpp.

Member Data Documentation

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

The box value that will be used for overlaping comparison.

Definition at line 90 of file spatial_overlap_region.hpp.


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