DDC 0.0.0

a discrete domain computation library

ddc::DiscreteElement< Tags > Class Template Reference

A DiscreteElement identifies an element of the discrete dimension. More...

Public Types

using value_type = DiscreteElementType
 

Public Member Functions

constexpr DiscreteElement ()=default
 
constexpr DiscreteElement (DiscreteElement const &)=default
 
constexpr DiscreteElement (DiscreteElement &&)=default
 
template<class... OTags>
constexpr DiscreteElement (DiscreteElement< OTags > const &... other) noexcept
 
template<class... OTags>
constexpr DiscreteElement (DiscreteElement< OTags... > const &other) noexcept
 
template<class... Params, class = std::enable_if_t<(std::is_integral_v<Params> && ...)>, class = std::enable_if_t<(!is_discrete_element_v<Params> && ...)>, class = std::enable_if_t<sizeof...(Params) == sizeof...(Tags)>>
constexpr DiscreteElement (Params const &... params) noexcept
 
constexpr DiscreteElementoperator= (DiscreteElement const &other)=default
 
constexpr DiscreteElementoperator= (DiscreteElement &&other)=default
 
template<class... OTags>
constexpr DiscreteElementoperator= (DiscreteElement< OTags... > const &other) noexcept
 
template<class... OTags>
constexpr DiscreteElementoperator= (DiscreteElement< OTags... > &&other) noexcept
 
template<class QueryTag >
value_type const & uid_or (value_type const &default_value) const &
 
template<class QueryTag >
constexpr value_typeuid () noexcept
 
template<class QueryTag >
constexpr value_type const & uid () const noexcept
 
template<std::size_t N = sizeof...(Tags)>
constexpr std::enable_if_t< N==1, value_type & > uid () noexcept
 
template<std::size_t N = sizeof...(Tags)>
constexpr std::enable_if_t< N==1, value_type const & > uid () const noexcept
 
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
constexpr DiscreteElementoperator++ ()
 
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
constexpr DiscreteElement operator++ (int)
 
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
constexpr DiscreteElementoperator-- ()
 
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
constexpr DiscreteElement operator-- (int)
 
template<class... OTags>
constexpr DiscreteElementoperator+= (DiscreteVector< OTags... > const &rhs)
 
template<class IntegralType , std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>, class = std::enable_if_t<std::is_integral_v<IntegralType>>>
constexpr DiscreteElementoperator+= (IntegralType const &rhs)
 
template<class... OTags>
constexpr DiscreteElementoperator-= (DiscreteVector< OTags... > const &rhs)
 
template<class IntegralType , std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>, class = std::enable_if_t<std::is_integral_v<IntegralType>>>
constexpr DiscreteElementoperator-= (IntegralType const &rhs)
 

Static Public Member Functions

static constexpr std::size_t size () noexcept
 

Friends

constexpr friend std::array< DiscreteElementType, sizeof...(Tags)> & ddc_detail::array (DiscreteElement< Tags... > &v) noexcept
 
constexpr friend std::array< DiscreteElementType, sizeof...(Tags)> const & ddc_detail::array (DiscreteElement< Tags... > const &v) noexcept
 

Detailed Description

template<class... Tags>
class ddc::DiscreteElement< Tags >

A DiscreteElement identifies an element of the discrete dimension.

Each one is tagged by its associated dimensions.

Member Typedef Documentation

◆ value_type

template<class... Tags>
using ddc::DiscreteElement< Tags >::value_type = DiscreteElementType

Constructor & Destructor Documentation

◆ DiscreteElement() [1/6]

template<class... Tags>
constexpr ddc::DiscreteElement< Tags >::DiscreteElement ( )
inlineconstexprdefault

◆ DiscreteElement() [2/6]

template<class... Tags>
constexpr ddc::DiscreteElement< Tags >::DiscreteElement ( DiscreteElement< Tags > const &  )
inlineconstexprdefault

◆ DiscreteElement() [3/6]

template<class... Tags>
constexpr ddc::DiscreteElement< Tags >::DiscreteElement ( DiscreteElement< Tags > &&  )
inlineconstexprdefault

◆ DiscreteElement() [4/6]

template<class... Tags>
template<class... OTags>
constexpr ddc::DiscreteElement< Tags >::DiscreteElement ( DiscreteElement< OTags > const &...  other)
inlineexplicitconstexprnoexcept

◆ DiscreteElement() [5/6]

template<class... Tags>
template<class... OTags>
constexpr ddc::DiscreteElement< Tags >::DiscreteElement ( DiscreteElement< OTags... > const &  other)
inlineexplicitconstexprnoexcept

◆ DiscreteElement() [6/6]

template<class... Tags>
template<class... Params, class = std::enable_if_t<(std::is_integral_v<Params> && ...)>, class = std::enable_if_t<(!is_discrete_element_v<Params> && ...)>, class = std::enable_if_t<sizeof...(Params) == sizeof...(Tags)>>
constexpr ddc::DiscreteElement< Tags >::DiscreteElement ( Params const &...  params)
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ size()

template<class... Tags>
static constexpr std::size_t ddc::DiscreteElement< Tags >::size ( )
inlinestaticconstexprnoexcept

◆ operator=() [1/4]

template<class... Tags>
constexpr DiscreteElement& ddc::DiscreteElement< Tags >::operator= ( DiscreteElement< Tags > const &  other)
inlineconstexprdefault

◆ operator=() [2/4]

template<class... Tags>
constexpr DiscreteElement& ddc::DiscreteElement< Tags >::operator= ( DiscreteElement< Tags > &&  other)
inlineconstexprdefault

◆ operator=() [3/4]

template<class... Tags>
template<class... OTags>
constexpr DiscreteElement& ddc::DiscreteElement< Tags >::operator= ( DiscreteElement< OTags... > const &  other)
inlineconstexprnoexcept

◆ operator=() [4/4]

template<class... Tags>
template<class... OTags>
constexpr DiscreteElement& ddc::DiscreteElement< Tags >::operator= ( DiscreteElement< OTags... > &&  other)
inlineconstexprnoexcept

◆ uid_or()

template<class... Tags>
template<class QueryTag >
value_type const& ddc::DiscreteElement< Tags >::uid_or ( value_type const &  default_value) const &
inline

◆ uid() [1/4]

template<class... Tags>
template<class QueryTag >
constexpr value_type& ddc::DiscreteElement< Tags >::uid ( )
inlineconstexprnoexcept

◆ uid() [2/4]

template<class... Tags>
template<class QueryTag >
constexpr value_type const& ddc::DiscreteElement< Tags >::uid ( ) const
inlineconstexprnoexcept

◆ uid() [3/4]

template<class... Tags>
template<std::size_t N = sizeof...(Tags)>
constexpr std::enable_if_t<N == 1, value_type&> ddc::DiscreteElement< Tags >::uid ( )
inlineconstexprnoexcept

◆ uid() [4/4]

template<class... Tags>
template<std::size_t N = sizeof...(Tags)>
constexpr std::enable_if_t<N == 1, value_type const&> ddc::DiscreteElement< Tags >::uid ( ) const
inlineconstexprnoexcept

◆ operator++() [1/2]

template<class... Tags>
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
constexpr DiscreteElement& ddc::DiscreteElement< Tags >::operator++ ( )
inlineconstexpr

◆ operator++() [2/2]

template<class... Tags>
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
constexpr DiscreteElement ddc::DiscreteElement< Tags >::operator++ ( int  )
inlineconstexpr

◆ operator--() [1/2]

template<class... Tags>
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
constexpr DiscreteElement& ddc::DiscreteElement< Tags >::operator-- ( )
inlineconstexpr

◆ operator--() [2/2]

template<class... Tags>
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
constexpr DiscreteElement ddc::DiscreteElement< Tags >::operator-- ( int  )
inlineconstexpr

◆ operator+=() [1/2]

template<class... Tags>
template<class... OTags>
constexpr DiscreteElement& ddc::DiscreteElement< Tags >::operator+= ( DiscreteVector< OTags... > const &  rhs)
inlineconstexpr

◆ operator+=() [2/2]

template<class... Tags>
template<class IntegralType , std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>, class = std::enable_if_t<std::is_integral_v<IntegralType>>>
constexpr DiscreteElement& ddc::DiscreteElement< Tags >::operator+= ( IntegralType const &  rhs)
inlineconstexpr

◆ operator-=() [1/2]

template<class... Tags>
template<class... OTags>
constexpr DiscreteElement& ddc::DiscreteElement< Tags >::operator-= ( DiscreteVector< OTags... > const &  rhs)
inlineconstexpr

◆ operator-=() [2/2]

template<class... Tags>
template<class IntegralType , std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>, class = std::enable_if_t<std::is_integral_v<IntegralType>>>
constexpr DiscreteElement& ddc::DiscreteElement< Tags >::operator-= ( IntegralType const &  rhs)
inlineconstexpr

Friends And Related Function Documentation

◆ ddc_detail::array [1/2]

template<class... Tags>
constexpr friend std::array<DiscreteElementType, sizeof...(Tags)>& ddc_detail::array ( DiscreteElement< Tags... > &  v)
friend

◆ ddc_detail::array [2/2]

template<class... Tags>
constexpr friend std::array<DiscreteElementType, sizeof...(Tags)> const& ddc_detail::array ( DiscreteElement< Tags... > const &  v)
friend

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