Molassembler  3.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Scine::Molassembler::Temple::Array< T, nItems > Class Template Reference
Inheritance diagram for Scine::Molassembler::Temple::Array< T, nItems >:

Data Structures

class  const_iterator
 Nonmodifiable data iterator. More...
 

Public Types

Types
using value_type = T
 

Public Member Functions

PURITY_WEAK constexpr iterator begin () noexcept
 
PURITY_WEAK constexpr iterator end () noexcept
 
constexpr const_iterator begin () const noexcept
 
constexpr const_iterator end () const noexcept
 
constexpr operator std::array< T, nItems > () const
 Implicit conversion operator to a std::array.
 
constexpr std::array< T, nItems > getArray () const
 Explicit conversion to a std::array.
 
Special member functions
template<std::size_t... Inds>
constexpr Array (const Array &other, std::index_sequence< Inds...>)
 Helper copy constructor. More...
 
constexpr Array (const Array &other)
 Copy constructor. More...
 
Converting constructors
template<size_t... Inds>
constexpr Array (const std::array< T, nItems > &other, std::index_sequence< Inds...>)
 Delegate std::array ctor, using same trick as copy ctor.
 
constexpr Array (const std::array< T, nItems > &other)
 Construct from std::array using same trick as copy ctor. More...
 

Private Member Functions

template<size_t... Inds>
constexpr std::array< T, nItems > makeArray_ (std::index_sequence< Inds...>) const
 

Private Attributes

items_ [nItems]
 

Constructor & Destructor Documentation

template<typename T, std::size_t nItems>
template<std::size_t... Inds>
constexpr Scine::Molassembler::Temple::Array< T, nItems >::Array ( const Array< T, nItems > &  other,
std::index_sequence< Inds...>   
)
inline

Helper copy constructor.

Constructs using another Array and an index_sequence to directly form the array mem-initializer with a parameter pack expansion

Complexity \(\Theta(N)\)

template<typename T, std::size_t nItems>
constexpr Scine::Molassembler::Temple::Array< T, nItems >::Array ( const Array< T, nItems > &  other)
inline

Copy constructor.

Constructing from another array is tricky since we're technically not allowed to edit items_ in-class, so we delegate to a helper constructor and directly form the mem-initializer

Complexity \(\Theta(N)\)

template<typename T, std::size_t nItems>
constexpr Scine::Molassembler::Temple::Array< T, nItems >::Array ( const std::array< T, nItems > &  other)
inline

Construct from std::array using same trick as copy ctor.

Complexity \(\Theta(N)\)


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