Interface Documentation
Version: invalid
Public Member Functions | Static Public Member Functions | List of all members
flecsi::util::dimensioned_array< TYPE, DIMENSION, NAMESPACE > Class Template Reference

#include <dimensioned_array.hh>

Public Member Functions

 dimensioned_array ()=default
 Default constructor.
 
 dimensioned_array (dimensioned_array const &)=default
 Default copy constructor.
 
constexpr dimensioned_array (std::initializer_list< TYPE > list)
 Initializer list constructor.
 
template<typename... ARGS, typename = typename std::enable_if<sizeof...(ARGS) == DIMENSION && are_type<TYPE, ARGS...>::value>>
constexpr dimensioned_array (ARGS... args)
 Variadic constructor.
 
constexpr dimensioned_array (TYPE const &val)
 Constructor (fill with given value).
 
template<typename ENUM_TYPE >
constexpr TYPE & operator[] (ENUM_TYPE e)
 
template<typename ENUM_TYPE >
constexpr TYPE const & operator[] (ENUM_TYPE e) const
 
constexpr dimensioned_arrayoperator= (dimensioned_array const &rhs)
 Assignment operator.
 
constexpr dimensioned_arrayoperator= (const TYPE &val)
 Assignment operator.
 
 define_operator (+=)
 Addition/Assignment operator.
 
 define_operator_type (+=)
 Addition/Assignment operator.
 
 define_operator (-=)
 Subtraction/Assignment operator.
 
 define_operator_type (-=)
 Subtraction/Assignment operator.
 
define_operatordefine_operator_type (*=);define_operator(/=
 Multiplication/Assignment operator.
 
 define_operator_type (/=)
 Division/Assignment operator.
 
constexpr bool operator== (const dimensioned_array &da)
 Equality operator.
 
constexpr dimensioned_array operator/ (TYPE val)
 Division operator involving a constant. More...
 

Static Public Member Functions

static constexpr size_t size ()
 Return the size of the array.
 

Detailed Description

template<typename TYPE, size_t DIMENSION, size_t NAMESPACE>
class flecsi::util::dimensioned_array< TYPE, DIMENSION, NAMESPACE >

The dimensioned_array type provides a general base for defining contiguous array types that have a specific dimension. Please look at the point and vector types for an example of its use.

Template Parameters
TYPEThe type of the array, e.g., P.O.D. type.
DIMENSIONThe dimension of the array, i.e., the number of elements to be stored in the array.
NAMESPACEThe namespace of the array. This is a dummy parameter that is useful for creating distinct types that alias dimensioned_array.

Member Function Documentation

◆ operator/()

template<typename TYPE, size_t DIMENSION, size_t NAMESPACE>
constexpr dimensioned_array flecsi::util::dimensioned_array< TYPE, DIMENSION, NAMESPACE >::operator/ ( TYPE  val)
inline

Division operator involving a constant.

Parameters
[in]valThe constant on the right hand side of the operator.
Returns
A reference to the current object.

◆ operator[]() [1/2]

template<typename TYPE, size_t DIMENSION, size_t NAMESPACE>
template<typename ENUM_TYPE >
constexpr TYPE& flecsi::util::dimensioned_array< TYPE, DIMENSION, NAMESPACE >::operator[] ( ENUM_TYPE  e)
inline

Support for enumerated type access, e.g., da[x], for accessing the x axis.

◆ operator[]() [2/2]

template<typename TYPE, size_t DIMENSION, size_t NAMESPACE>
template<typename ENUM_TYPE >
constexpr TYPE const& flecsi::util::dimensioned_array< TYPE, DIMENSION, NAMESPACE >::operator[] ( ENUM_TYPE  e) const
inline

Support for enumerated type access, e.g., da[x], for accessing the x axis.


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