QDP++
QDP::Array1dO< T > Class Template Reference

1d array, with 1-based indices More...

#include <qdp_arrays.h>

Public Member Functions

 Array1dO ()
 Array1dO (int n)
 ~Array1dO ()
 Array1dO (const Array1dO &s)
 Copy constructor.
 Array1dO (const multi1d< T > &s)
 Copy constructor from a zero-based array.
 Array1dO (const std::vector< T > &s)
 Copy constructor from a zero-based array.
void resize (int n)
int size () const
Array1dOoperator= (const Array1dO &s)
T & operator[] (int i)
 Return ref to an element.
const T & operator[] (int i) const
 Return const ref to an element.
void push_back (const T &s1)
 Append to a vector - it will grow.
const std::vector< T > & ref () const
 Return ref to underlying array.
std::vector< T > & ref ()
 Return ref to underlying array.

Detailed Description

template<typename T>
class QDP::Array1dO< T >

1d array, with 1-based indices

Definition at line 17 of file qdp_arrays.h.

Constructor & Destructor Documentation

◆ Array1dO() [1/5]

template<typename T>
QDP::Array1dO< T >::Array1dO ( )
inline

Definition at line 20 of file qdp_arrays.h.

Referenced by Array1dO(), and operator=().

◆ Array1dO() [2/5]

template<typename T>
QDP::Array1dO< T >::Array1dO ( int n)
inlineexplicit

Definition at line 21 of file qdp_arrays.h.

◆ ~Array1dO()

template<typename T>
QDP::Array1dO< T >::~Array1dO ( )
inline

Definition at line 22 of file qdp_arrays.h.

◆ Array1dO() [3/5]

template<typename T>
QDP::Array1dO< T >::Array1dO ( const Array1dO< T > & s)
inline

Copy constructor.

Definition at line 25 of file qdp_arrays.h.

References Array1dO().

◆ Array1dO() [4/5]

template<typename T>
QDP::Array1dO< T >::Array1dO ( const multi1d< T > & s)
inline

Copy constructor from a zero-based array.

Definition at line 28 of file qdp_arrays.h.

References QDP::multi1d< T >::size().

◆ Array1dO() [5/5]

template<typename T>
QDP::Array1dO< T >::Array1dO ( const std::vector< T > & s)
inline

Copy constructor from a zero-based array.

Definition at line 35 of file qdp_arrays.h.

Member Function Documentation

◆ operator=()

template<typename T>
Array1dO & QDP::Array1dO< T >::operator= ( const Array1dO< T > & s)
inline

Definition at line 40 of file qdp_arrays.h.

References Array1dO().

◆ operator[]() [1/2]

template<typename T>
T & QDP::Array1dO< T >::operator[] ( int i)
inline

Return ref to an element.

Definition at line 43 of file qdp_arrays.h.

◆ operator[]() [2/2]

template<typename T>
const T & QDP::Array1dO< T >::operator[] ( int i) const
inline

Return const ref to an element.

Definition at line 46 of file qdp_arrays.h.

◆ push_back()

template<typename T>
void QDP::Array1dO< T >::push_back ( const T & s1)
inline

Append to a vector - it will grow.

Definition at line 49 of file qdp_arrays.h.

◆ ref() [1/2]

template<typename T>
std::vector< T > & QDP::Array1dO< T >::ref ( )
inline

Return ref to underlying array.

Definition at line 55 of file qdp_arrays.h.

◆ ref() [2/2]

template<typename T>
const std::vector< T > & QDP::Array1dO< T >::ref ( ) const
inline

Return ref to underlying array.

Definition at line 52 of file qdp_arrays.h.

Referenced by QDP::operator*(), QDP::operator-(), QDP::operator/(), QDP::read(), and QDP::write().

◆ resize()

template<typename T>
void QDP::Array1dO< T >::resize ( int n)
inline

Definition at line 37 of file qdp_arrays.h.

Referenced by QDP::read().

◆ size()

template<typename T>
int QDP::Array1dO< T >::size ( ) const
inline

Definition at line 38 of file qdp_arrays.h.

Referenced by QDP::operator*(), QDP::operator-(), QDP::operator/(), QDP::read(), and QDP::write().


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