STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Friends
stapl::domset1D< T > Class Template Reference

Defines an one dimensional domain composed of a set of intervals of consecutive indexes. More...

Public Member Functions

 domset1D (set_type const &s, bool is_cont_dom=false)
 
 domset1D (index_type const &lower, index_type const &upper, bool is_cont_dom=false)
 Construct a domain with the given lower and upper bounds [lower .. upper]. More...
 
 domset1D (size_type size, bool is_cont_dom=true)
 Constructs a domain [0..size-1]. More...
 
 domset1D (T const &lower, T const &upper, domset1D const &other)
 Constructs a new domain by restricting the given other domain to be [first..last].
 
 domset1D (indexed_domain< gid_type > const &dom)
 Constructs a new domain by converting it from an existing indexed_domain.
 
template<typename Dist >
 domset1D (domainset1D< Dist > const &dom)
 Constructs a new domain by extracting it from an existing domainset1D domain.
 
index_type first (void) const
 
index_type last (void) const
 
index_type open_last (void) const
 Returns termination value for comparison. More...
 
bool contains (index_type const &idx) const
 
size_type size (void) const
 
size_type dimensions (void) const
 
bool empty (void) const
 
bool is_same_container_domain (void) const
 
void set_cont_dom (bool is_cont_dom=true)
 
bool operator== (domset1D const &other) const
 
domset1Doperator+= (domset1D const &other)
 Adds all the indexes in the given other domain. More...
 
domset1Doperator+= (index_type const &index)
 Adds the given index to the domain.
 
domset1Doperator-= (domset1D const &other)
 Removes all the indexes in the given other domain from this domain. More...
 
domset1Doperator-= (index_type const &index)
 Removes the given index from the domain.
 
domset1D operator+ (domset1D const &other) const
 Returns the union between this domain and the given other domain.
 
domset1D operator & (domset1D const &other) const
 Returns the intersection between this domain and the given other domain.
 
template<typename ODom >
domset1D operator & (ODom const &other) const
 Returns the intersection between this domain and the given other consecutive index domain (e.g., indexed_domain). More...
 
template<typename Distance >
index_type advance (index_type index, Distance const &n) const
 
size_type distance (index_type const &i0, index_type const &i1) const
 
bool is_contiguous (void) const
 

Public Types

typedef T index_type
 
typedef default_traversal< 1 >::type traversal_type
 
typedef std::size_t size_type
 
typedef index_type gid_type
 
typedef boost::icl::interval_set< index_type > set_type
 

Friends

template<typename IT >
std::ostream & operator<< (std::ostream &, domset1D< IT > const &)
 

Detailed Description

template<typename T>
class stapl::domset1D< T >

Defines an one dimensional domain composed of a set of intervals of consecutive indexes.

Template Parameters
TIndex type.
Warning
T must be and integral type.

Constructor & Destructor Documentation

◆ domset1D() [1/2]

template<typename T>
stapl::domset1D< T >::domset1D ( index_type const &  lower,
index_type const &  upper,
bool  is_cont_dom = false 
)

Construct a domain with the given lower and upper bounds [lower .. upper].

Parameters
lowerLower index in the domain.
upperUpper index in the domain.
is_cont_domwhether or not this domain spans the entire container.

◆ domset1D() [2/2]

template<typename T>
stapl::domset1D< T >::domset1D ( size_type  size,
bool  is_cont_dom = true 
)
explicit

Constructs a domain [0..size-1].

Member Function Documentation

◆ first()

template<typename T>
index_type stapl::domset1D< T >::first ( void  ) const

◆ last()

template<typename T>
index_type stapl::domset1D< T >::last ( void  ) const

◆ open_last()

template<typename T>
index_type stapl::domset1D< T >::open_last ( void  ) const

Returns termination value for comparison.

◆ contains()

template<typename T>
bool stapl::domset1D< T >::contains ( index_type const &  idx) const

◆ size()

template<typename T>
size_type stapl::domset1D< T >::size ( void  ) const

◆ dimensions()

template<typename T>
size_type stapl::domset1D< T >::dimensions ( void  ) const

◆ empty()

template<typename T>
bool stapl::domset1D< T >::empty ( void  ) const

◆ is_same_container_domain()

template<typename T>
bool stapl::domset1D< T >::is_same_container_domain ( void  ) const

◆ operator+=()

template<typename T>
domset1D& stapl::domset1D< T >::operator+= ( domset1D< T > const &  other)

Adds all the indexes in the given other domain.

Performs an union operation between this domain and other domain.

◆ operator-=()

template<typename T>
domset1D& stapl::domset1D< T >::operator-= ( domset1D< T > const &  other)

Removes all the indexes in the given other domain from this domain.

Performs a difference between this domain and the given other domain.

◆ operator &()

template<typename T>
template<typename ODom >
domset1D stapl::domset1D< T >::operator& ( ODom const &  other) const

Returns the intersection between this domain and the given other consecutive index domain (e.g., indexed_domain).

◆ advance()

template<typename T>
template<typename Distance >
index_type stapl::domset1D< T >::advance ( index_type  index,
Distance const &  n 
) const

◆ distance()

template<typename T>
size_type stapl::domset1D< T >::distance ( index_type const &  i0,
index_type const &  i1 
) const


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