FreePOOMA  2.4.1
Static Public Member Functions
ContainsDomainSingle< T1, T2, strided > Struct Template Reference

ContainsDomainSingle<T1,T2,bool strided>::contains(a,b) compares two domains a and b of type T1 and T2, and returns true if a contains b. More...

#include <Contains.h>

List of all members.

Static Public Member Functions

static bool contains (const T1 &a, const T2 &b)

Detailed Description

template<class T1, class T2, bool strided>
struct ContainsDomainSingle< T1, T2, strided >

ContainsDomainSingle<T1,T2,bool strided>::contains(a,b) compares two domains a and b of type T1 and T2, and returns true if a contains b.

a and b are assumed to be 1D domains, and this struct is used by ContainsDomain for each dimension in a multidimensional contains operation. 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 of b lie within the endpoints of a. strided == true: neither domain has unit stride. This is more complicated since it is possible that even if the endpoints of b are contained in a, that all the points in b are not found in a. The striding of a may lead to it not referring to points in b. Only do this calculation when absolutely necessary.

The default (unit-stride) version of ContainsDomainSingle, which assumes that both arguments to 'contains' are 1D domains with unit stride


Member Function Documentation

template<class T1 , class T2 , bool strided>
static bool ContainsDomainSingle< T1, T2, strided >::contains ( const T1 &  a,
const T2 &  b 
) [inline, static]

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