GQCP
|
#include <StorageArray.hpp>
Public Types | |
using | Element = _Element |
using | Vectorizer = _Vectorizer |
using | Self = StorageArray< Element, Vectorizer > |
Public Member Functions | |
StorageArray (const std::vector< Element > &elements, const Vectorizer &vectorizer) | |
StorageArray (const Element &element, const Vectorizer &vectorizer) | |
StorageArray (const Vectorizer &vectorizer) | |
template<size_t N> | |
StorageArray (const std::array< Element, N > &elements, const Vectorizer &vectorizer) | |
template<typename Z = Vectorizer, typename = typename std::enable_if<std::is_same<Z, ScalarVectorizer>::value>::type> | |
operator Element () const | |
template<typename... Indices> | |
const Element & | operator() (const Indices &... indices) const |
template<typename... Indices> | |
Element & | operator() (const Indices &... indices) |
const std::vector< Element > & | elements () const |
std::vector< Element > & | elements () |
const Vectorizer & | vectorizer () const |
template<typename Z = Vectorizer> | |
enable_if_t< std::is_same< Z, VectorVectorizer >::value, VectorX< Element > > | asVector () |
Static Public Attributes | |
static constexpr auto | NumberOfAxes = Vectorizer::NumberOfAxes |
A simple array data structure.
_Element | The type of element that this array stores. |
_Vectorizer | The type of the vectorizer that relates multiple tuple coordinates to a one-dimensional index. |
using GQCP::StorageArray< _Element, _Vectorizer >::Element = _Element |
using GQCP::StorageArray< _Element, _Vectorizer >::Self = StorageArray<Element, Vectorizer> |
using GQCP::StorageArray< _Element, _Vectorizer >::Vectorizer = _Vectorizer |
|
inline |
Create an array.
elements | The one-dimensional representation of the elements of the array. |
vectorizer | The vectorizer that relates multiple tuple coordinates to a one-dimensional index. |
|
inline |
Create an array with equal elements.
elements | The one-dimensional representation of the elements of the array. |
vectorizer | The vectorizer that relates multiple tuple coordinates to a one-dimensional index. |
|
inline |
Create an array with defaultly initialized elements.
vectorizer | The vectorizer that relates multiple tuple coordinates to a one-dimensional index. |
|
inline |
Create an array from a std::array
and a vectorizer.
elements | The one-dimensional representation of the elements of the array. |
vectorizer | The vectorizer that relates multiple tuple coordinates to a one-dimensional index. |
N | The number of elements in the std::array . |
|
inline |
Convert this StorageArray
to a Vector
, if possible.
StorageArrays
that admit vector-like storage.
|
inline |
|
inline |
|
inline |
A conversion operator between a scalar array and the underlying scalar.
For the enable_if-part, check https://stackoverflow.com/a/18101382.
|
inline |
indices | A set of coordinates that accesses this array. |
|
inline |
indices | A set of coordinates that accesses this array. |
|
inline |
|
staticconstexpr |