TouchesDomainSingle< T1, T2, strided > Struct Template Reference
TouchesDomainSingle<T1,T2,bool strided>::touches(a,b) compares two domains a and b of type T1 and T2, and returns true if they touch.
More...
#include <Touches.h>
List of all members.
|
Static Public Member Functions |
static bool | touches (const T1 &a, const T2 &b) |
Detailed Description
template<class T1, class T2, bool strided>
struct TouchesDomainSingle< T1, T2, strided >
TouchesDomainSingle<T1,T2,bool strided>::touches(a,b) compares two domains a and b of type T1 and T2, and returns true if they touch.
a and b are assumed to be 1D domains, and this struct is used by TouchesDomain for each dimension in a multidimensional touches calculation. The final boolean template parameter is used to specialize the calculation to the following two cases:
- strided == false: one or both of the domains has unit stride. In this case, the computation is quite simple: check if the endpoints overlap in any way.
- strided == true: neither domain has unit stride. This is more complicated since it is possible that even if the endpoints overlap, they will not have any points in common due to the striding. We only do this long calculation when absolutely necessary.
The default (unit-stride) version of TouchesDomainSingle, which assumes that both arguments to 'touches' are 1D domains with unit stride
Member Function Documentation
template<class T1 , class T2 , bool strided>
static bool TouchesDomainSingle< T1, T2, strided >::touches |
( |
const T1 & |
a, |
|
|
const T2 & |
b | |
|
) |
| | [inline, static] |
The documentation for this struct was generated from the following file: