DDC 0.0.0

a discrete domain computation library

ddc::DiscreteVector< Tags > Class Template Reference

A DiscreteVector is a vector in the discrete dimension. More...

Inheritance diagram for ddc::DiscreteVector< Tags >:
Inheritance graph

Public Member Functions

constexpr DiscreteVector ()=default
 
constexpr DiscreteVector (DiscreteVector const &)=default
 
constexpr DiscreteVector (DiscreteVector &&)=default
 
template<class... OTags>
constexpr DiscreteVector (DiscreteVector< OTags > const &... other) noexcept
 
template<class... OTags>
constexpr DiscreteVector (DiscreteVector< OTags... > const &other) noexcept
 
template<class... Params, class = std::enable_if_t<(std::is_convertible_v<Params, DiscreteVectorElement> && ...)>, class = std::enable_if_t<(!is_discrete_vector_v<Params> && ...)>, class = std::enable_if_t<sizeof...(Params) == sizeof...(Tags)>>
constexpr DiscreteVector (Params const &... params) noexcept
 
constexpr DiscreteVectoroperator= (DiscreteVector const &other)=default
 
constexpr DiscreteVectoroperator= (DiscreteVector &&other)=default
 
template<class... OTags>
constexpr DiscreteVectoroperator= (DiscreteVector< OTags... > const &other) noexcept
 
template<class... OTags>
constexpr DiscreteVectoroperator= (DiscreteVector< OTags... > &&other) noexcept
 
template<class... OTags>
constexpr bool operator== (DiscreteVector< OTags... > const &rhs) const noexcept
 
template<class... OTags>
constexpr bool operator!= (DiscreteVector< OTags... > const &rhs) const noexcept
 
template<class QueryTag >
constexpr DiscreteVectorElementget () noexcept
 
template<class QueryTag >
constexpr DiscreteVectorElement const & get () const noexcept
 
template<class QueryTag >
DiscreteVectorElement const & get_or (DiscreteVectorElement const &default_value) const &
 
template<std::size_t N = sizeof...(Tags)>
constexpr std::enable_if_t< N==1, DiscreteVectorElement const & > value () const noexcept
 
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
constexpr DiscreteVectoroperator++ ()
 
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
constexpr DiscreteVector operator++ (int)
 
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
constexpr DiscreteVectoroperator-- ()
 
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
constexpr DiscreteVector operator-- (int)
 
template<class... OTags>
constexpr DiscreteVectoroperator+= (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 DiscreteVectoroperator+= (IntegralType const &rhs)
 
template<class... OTags>
constexpr DiscreteVectoroperator-= (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 DiscreteVectoroperator-= (IntegralType const &rhs)
 
template<class... OTags>
constexpr DiscreteVectoroperator*= (DiscreteVector< OTags... > const &rhs)
 

Static Public Member Functions

static constexpr std::size_t size () noexcept
 

Friends

class ConversionOperators< DiscreteVector< Tags... > >
 
constexpr friend std::array< DiscreteVectorElement, sizeof...(Tags)> & ddc_detail::array (DiscreteVector< Tags... > &v) noexcept
 
constexpr friend std::array< DiscreteVectorElement, sizeof...(Tags)> const & ddc_detail::array (DiscreteVector< Tags... > const &v) noexcept
 

Detailed Description

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

A DiscreteVector is a vector in the discrete dimension.

Each is tagged by its associated dimensions.

Constructor & Destructor Documentation

◆ DiscreteVector() [1/6]

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

◆ DiscreteVector() [2/6]

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

◆ DiscreteVector() [3/6]

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

◆ DiscreteVector() [4/6]

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

◆ DiscreteVector() [5/6]

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

◆ DiscreteVector() [6/6]

template<class... Tags>
template<class... Params, class = std::enable_if_t<(std::is_convertible_v<Params, DiscreteVectorElement> && ...)>, class = std::enable_if_t<(!is_discrete_vector_v<Params> && ...)>, class = std::enable_if_t<sizeof...(Params) == sizeof...(Tags)>>
constexpr ddc::DiscreteVector< Tags >::DiscreteVector ( Params const &...  params)
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ size()

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

◆ operator=() [1/4]

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

◆ operator=() [2/4]

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

◆ operator=() [3/4]

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

◆ operator=() [4/4]

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

◆ operator==()

template<class... Tags>
template<class... OTags>
constexpr bool ddc::DiscreteVector< Tags >::operator== ( DiscreteVector< OTags... > const &  rhs) const
inlineconstexprnoexcept

◆ operator!=()

template<class... Tags>
template<class... OTags>
constexpr bool ddc::DiscreteVector< Tags >::operator!= ( DiscreteVector< OTags... > const &  rhs) const
inlineconstexprnoexcept

◆ get() [1/2]

template<class... Tags>
template<class QueryTag >
constexpr DiscreteVectorElement& ddc::DiscreteVector< Tags >::get ( )
inlineconstexprnoexcept

◆ get() [2/2]

template<class... Tags>
template<class QueryTag >
constexpr DiscreteVectorElement const& ddc::DiscreteVector< Tags >::get ( ) const
inlineconstexprnoexcept

◆ get_or()

template<class... Tags>
template<class QueryTag >
DiscreteVectorElement const& ddc::DiscreteVector< Tags >::get_or ( DiscreteVectorElement const &  default_value) const &
inline

◆ value()

template<class... Tags>
template<std::size_t N = sizeof...(Tags)>
constexpr std::enable_if_t<N == 1, DiscreteVectorElement const&> ddc::DiscreteVector< Tags >::value ( ) const
inlineconstexprnoexcept

◆ operator++() [1/2]

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

◆ operator++() [2/2]

template<class... Tags>
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
constexpr DiscreteVector ddc::DiscreteVector< 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 DiscreteVector& ddc::DiscreteVector< Tags >::operator-- ( )
inlineconstexpr

◆ operator--() [2/2]

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

◆ operator+=() [1/2]

template<class... Tags>
template<class... OTags>
constexpr DiscreteVector& ddc::DiscreteVector< 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 DiscreteVector& ddc::DiscreteVector< Tags >::operator+= ( IntegralType const &  rhs)
inlineconstexpr

◆ operator-=() [1/2]

template<class... Tags>
template<class... OTags>
constexpr DiscreteVector& ddc::DiscreteVector< 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 DiscreteVector& ddc::DiscreteVector< Tags >::operator-= ( IntegralType const &  rhs)
inlineconstexpr

◆ operator*=()

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

Friends And Related Function Documentation

◆ ConversionOperators< DiscreteVector< Tags... > >

template<class... Tags>
friend class ConversionOperators< DiscreteVector< Tags... > >
friend

◆ ddc_detail::array [1/2]

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

◆ ddc_detail::array [2/2]

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

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