DDC 0.0.0

a discrete domain computation library

DiscreteDomain< DDims > Class Template Reference

Public Types

using discrete_element_type = DiscreteElement< DDims... >
 
using mlength_type = DiscreteVector< DDims... >
 

Public Member Functions

 DiscreteDomain ()=default
 
template<class... ODDims>
constexpr DiscreteDomain (DiscreteDomain< ODDims... > const &domain)
 Construct a DiscreteDomain from a reordered copy of domain More...
 
template<std::size_t N = sizeof...(DDims), class = std::enable_if_t<(N != 1)>>
constexpr DiscreteDomain (DiscreteDomain< DDims > const &... domains)
 
constexpr DiscreteDomain (mlength_type const &size)
 Construct a DiscreteDomain starting from (0, ..., 0) with size points. More...
 
constexpr DiscreteDomain (discrete_element_type const &element_begin, mlength_type const &size)
 Construct a DiscreteDomain starting from element_begin with size points. More...
 
 DiscreteDomain (DiscreteDomain const &x)=default
 
 DiscreteDomain (DiscreteDomain &&x)=default
 
 ~DiscreteDomain ()=default
 
DiscreteDomainoperator= (DiscreteDomain const &x)=default
 
DiscreteDomainoperator= (DiscreteDomain &&x)=default
 
template<class... ODims>
constexpr bool operator== (DiscreteDomain< ODims... > const &other) const
 
constexpr bool operator!= (DiscreteDomain const &other) const
 
std::size_t size () const
 
constexpr mlength_type extents () const noexcept
 
template<class QueryDDim >
constexpr DiscreteVector< QueryDDim > extent () const noexcept
 
constexpr discrete_element_type front () const noexcept
 
constexpr discrete_element_type back () const noexcept
 
constexpr DiscreteDomain take_first (mlength_type n) const
 
constexpr DiscreteDomain take_last (mlength_type n) const
 
constexpr DiscreteDomain remove_first (mlength_type n) const
 
constexpr DiscreteDomain remove_last (mlength_type n) const
 
constexpr DiscreteDomain remove (mlength_type n1, mlength_type n2) const
 
template<class... ODDims>
constexpr auto restrict (DiscreteDomain< ODDims... > const &odomain) const
 
constexpr bool empty () const noexcept
 
constexpr operator bool ()
 
template<std::size_t N = sizeof...(DDims), class DDim0 = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
auto begin () const
 
template<std::size_t N = sizeof...(DDims), class DDim0 = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
auto end () const
 
template<std::size_t N = sizeof...(DDims), class DDim0 = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
auto cbegin () const
 
template<std::size_t N = sizeof...(DDims), class DDim0 = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
auto cend () const
 
template<std::size_t N = sizeof...(DDims), class = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
constexpr decltype(auto) operator[] (std::size_t __n)
 
template<std::size_t N = sizeof...(DDims), class = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
constexpr decltype(auto) operator[] (std::size_t __n) const
 

Static Public Member Functions

static constexpr std::size_t rank ()
 

Friends

template<class... >
class DiscreteDomain
 

Member Typedef Documentation

◆ discrete_element_type

template<class... DDims>
using DiscreteDomain< DDims >::discrete_element_type = DiscreteElement<DDims...>

◆ mlength_type

template<class... DDims>
using DiscreteDomain< DDims >::mlength_type = DiscreteVector<DDims...>

Constructor & Destructor Documentation

◆ DiscreteDomain() [1/7]

template<class... DDims>
DiscreteDomain< DDims >::DiscreteDomain ( )
default

◆ DiscreteDomain() [2/7]

template<class... DDims>
template<class... ODDims>
constexpr DiscreteDomain< DDims >::DiscreteDomain ( DiscreteDomain< ODDims... > const &  domain)
inlineexplicitconstexpr

Construct a DiscreteDomain from a reordered copy of domain

◆ DiscreteDomain() [3/7]

template<class... DDims>
template<std::size_t N = sizeof...(DDims), class = std::enable_if_t<(N != 1)>>
constexpr DiscreteDomain< DDims >::DiscreteDomain ( DiscreteDomain< DDims > const &...  domains)
inlineexplicitconstexpr

◆ DiscreteDomain() [4/7]

template<class... DDims>
constexpr DiscreteDomain< DDims >::DiscreteDomain ( mlength_type const &  size)
inlineconstexpr

Construct a DiscreteDomain starting from (0, ..., 0) with size points.

Parameters
sizethe number of points in each dimension
Deprecated:
use the version with explicit lower bound instead

◆ DiscreteDomain() [5/7]

template<class... DDims>
constexpr DiscreteDomain< DDims >::DiscreteDomain ( discrete_element_type const &  element_begin,
mlength_type const &  size 
)
inlineconstexpr

Construct a DiscreteDomain starting from element_begin with size points.

Parameters
element_beginthe lower bound in each direction
sizethe number of points in each direction

◆ DiscreteDomain() [6/7]

template<class... DDims>
DiscreteDomain< DDims >::DiscreteDomain ( DiscreteDomain< DDims > const &  x)
default

◆ DiscreteDomain() [7/7]

template<class... DDims>
DiscreteDomain< DDims >::DiscreteDomain ( DiscreteDomain< DDims > &&  x)
default

◆ ~DiscreteDomain()

template<class... DDims>
DiscreteDomain< DDims >::~DiscreteDomain ( )
default

Member Function Documentation

◆ rank()

template<class... DDims>
static constexpr std::size_t DiscreteDomain< DDims >::rank ( )
inlinestaticconstexpr

◆ operator=() [1/2]

template<class... DDims>
DiscreteDomain& DiscreteDomain< DDims >::operator= ( DiscreteDomain< DDims > const &  x)
default

◆ operator=() [2/2]

template<class... DDims>
DiscreteDomain& DiscreteDomain< DDims >::operator= ( DiscreteDomain< DDims > &&  x)
default

◆ operator==()

template<class... DDims>
template<class... ODims>
constexpr bool DiscreteDomain< DDims >::operator== ( DiscreteDomain< ODims... > const &  other) const
inlineconstexpr

◆ operator!=()

template<class... DDims>
constexpr bool DiscreteDomain< DDims >::operator!= ( DiscreteDomain< DDims > const &  other) const
inlineconstexpr

◆ size()

template<class... DDims>
std::size_t DiscreteDomain< DDims >::size ( ) const
inline

◆ extents()

template<class... DDims>
constexpr mlength_type DiscreteDomain< DDims >::extents ( ) const
inlineconstexprnoexcept

◆ extent()

template<class... DDims>
template<class QueryDDim >
constexpr DiscreteVector<QueryDDim> DiscreteDomain< DDims >::extent ( ) const
inlineconstexprnoexcept

◆ front()

template<class... DDims>
constexpr discrete_element_type DiscreteDomain< DDims >::front ( ) const
inlineconstexprnoexcept

◆ back()

template<class... DDims>
constexpr discrete_element_type DiscreteDomain< DDims >::back ( ) const
inlineconstexprnoexcept

◆ take_first()

template<class... DDims>
constexpr DiscreteDomain DiscreteDomain< DDims >::take_first ( mlength_type  n) const
inlineconstexpr

◆ take_last()

template<class... DDims>
constexpr DiscreteDomain DiscreteDomain< DDims >::take_last ( mlength_type  n) const
inlineconstexpr

◆ remove_first()

template<class... DDims>
constexpr DiscreteDomain DiscreteDomain< DDims >::remove_first ( mlength_type  n) const
inlineconstexpr

◆ remove_last()

template<class... DDims>
constexpr DiscreteDomain DiscreteDomain< DDims >::remove_last ( mlength_type  n) const
inlineconstexpr

◆ remove()

template<class... DDims>
constexpr DiscreteDomain DiscreteDomain< DDims >::remove ( mlength_type  n1,
mlength_type  n2 
) const
inlineconstexpr

◆ restrict()

template<class... DDims>
template<class... ODDims>
constexpr auto DiscreteDomain< DDims >::restrict ( DiscreteDomain< ODDims... > const &  odomain) const
inlineconstexpr

◆ empty()

template<class... DDims>
constexpr bool DiscreteDomain< DDims >::empty ( ) const
inlineconstexprnoexcept

◆ operator bool()

template<class... DDims>
constexpr DiscreteDomain< DDims >::operator bool ( )
inlineexplicitconstexpr

◆ begin()

template<class... DDims>
template<std::size_t N = sizeof...(DDims), class DDim0 = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
auto DiscreteDomain< DDims >::begin ( ) const
inline

◆ end()

template<class... DDims>
template<std::size_t N = sizeof...(DDims), class DDim0 = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
auto DiscreteDomain< DDims >::end ( ) const
inline

◆ cbegin()

template<class... DDims>
template<std::size_t N = sizeof...(DDims), class DDim0 = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
auto DiscreteDomain< DDims >::cbegin ( ) const
inline

◆ cend()

template<class... DDims>
template<std::size_t N = sizeof...(DDims), class DDim0 = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
auto DiscreteDomain< DDims >::cend ( ) const
inline

◆ operator[]() [1/2]

template<class... DDims>
template<std::size_t N = sizeof...(DDims), class = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
constexpr decltype(auto) DiscreteDomain< DDims >::operator[] ( std::size_t  __n)
inlineconstexpr

◆ operator[]() [2/2]

template<class... DDims>
template<std::size_t N = sizeof...(DDims), class = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
constexpr decltype(auto) DiscreteDomain< DDims >::operator[] ( std::size_t  __n) const
inlineconstexpr

Friends And Related Function Documentation

◆ DiscreteDomain

template<class... DDims>
template<class... >
friend class DiscreteDomain
friend

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