ampsci
High-precision calculations for one- and two-valence atomic systems
Loading...
Searching...
No Matches
qip::ArrayView< T >

A view onto a 1D array; used for rows/collumns of ND array. Can have a stride. More...

#include <Array.hpp>

Public Member Functions

 ArrayView (T *data, std::size_t size, std::size_t stride=1)
 
std::size_t size () const
 
Toperator[] (std::size_t i)
 
T operator[] (std::size_t i) const
 
Tat (std::size_t i)
 
T at (std::size_t i) const
 
Toperator() (std::size_t i)
 
T operator() (std::size_t i) const
 
Tfront ()
 
T front () const
 
Tback ()
 
T back () const
 
Tdata ()
 
auto begin ()
 Iterator to the beginning.
 
auto cbegin () const
 
auto end ()
 
auto cend () const
 
auto rbegin ()
 
auto crbegin () const
 
auto rend ()
 
auto crend () const
 
std::vector< T > vector ()
 Returns a copy of the array as a std::vector.
 

Detailed Description

template<typename T = double>
class qip::ArrayView< T >

A view onto a 1D array; used for rows/collumns of ND array. Can have a stride.

  • Size is the total number of elements.
  • Can have zero size - but undefined to access data in that case.
  • Mostly copies std::vector - should be no surprises

Member Function Documentation

◆ begin()

template<typename T = double>
auto qip::ArrayView< T >::begin ( )
inline

Iterator to the beginning.

◆ vector()

template<typename T = double>
std::vector< T > qip::ArrayView< T >::vector ( )
inline

Returns a copy of the array as a std::vector.


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