#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_array & | operator= (dimensioned_array const &rhs) |
Assignment operator. | |
constexpr dimensioned_array & | operator= (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_operator * | define_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. | |
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.
TYPE | The type of the array, e.g., P.O.D. type. |
DIMENSION | The dimension of the array, i.e., the number of elements to be stored in the array. |
NAMESPACE | The namespace of the array. This is a dummy parameter that is useful for creating distinct types that alias dimensioned_array. |
|
inline |
Division operator involving a constant.
[in] | val | The constant on the right hand side of the operator. |
|
inline |
Support for enumerated type access, e.g., da[x], for accessing the x axis.
|
inline |
Support for enumerated type access, e.g., da[x], for accessing the x axis.