IntersectDomainSingle< T1, T2, T3, Dim, strided > Struct Template Reference
IntersectDomainSingle<T1,T2,T3,int Dim,bool strided>::intersect(a,b,c) finds the intersection of two domains a and b of type T1 and T2, and puts the domain intersection in c[Dim-1].
More...
#include <Intersect.h>
List of all members.
|
Static Public Member Functions |
static void | intersect (const T1 &a, const T2 &b, T3 &c) |
Detailed Description
template<class T1, class T2, class T3, int Dim, bool strided>
struct IntersectDomainSingle< T1, T2, T3, Dim, strided >
IntersectDomainSingle<T1,T2,T3,int Dim,bool strided>::intersect(a,b,c) finds the intersection of two domains a and b of type T1 and T2, and puts the domain intersection in c[Dim-1].
If there are no points which these domains have in common, this returns an empty domain. The domains a and b are assumed to be 1D domains. The final boolean template parameter is used to specialize the calculation to the following two cases:
- strided == false: both of the domains have unit stride. In this case, the computation is quite simple: check if the endpoints overlap in any way, and return it.
- strided == true: one or both domains have non-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 IntersectDomainSingle, which assumes that both arguments to 'intersect' are 1D domains with unit stride
Member Function Documentation
template<class T1 , class T2 , class T3 , int Dim, bool strided>
static void IntersectDomainSingle< T1, T2, T3, Dim, strided >::intersect |
( |
const T1 & |
a, |
|
|
const T2 & |
b, |
|
|
T3 & |
c | |
|
) |
| | [inline, static] |
The documentation for this struct was generated from the following file: