QMCPACK
container_proxy< std::vector< T > > Struct Template Reference
+ Collaboration diagram for container_proxy< std::vector< T > >:

Public Types

enum  { DIM = scalar_traits<T>::DIM }
 
using pointer = typename container_proxy< T >::pointer
 

Public Member Functions

 container_proxy (std::vector< T > &a)
 
size_t size () const
 
pointer data ()
 
void resize (size_t n)
 
template<typename I >
void resize (I *n, int d)
 

Public Attributes

std::vector< T > & ref
 

Detailed Description

template<typename T>
struct qmcplusplus::container_proxy< std::vector< T > >

Definition at line 94 of file container_proxy.h.

Member Typedef Documentation

◆ pointer

using pointer = typename container_proxy<T>::pointer

Definition at line 100 of file container_proxy.h.

Member Enumeration Documentation

◆ anonymous enum

Constructor & Destructor Documentation

◆ container_proxy()

container_proxy ( std::vector< T > &  a)
inline

Definition at line 102 of file container_proxy.h.

Member Function Documentation

◆ data()

◆ resize() [1/2]

void resize ( size_t  n)
inline

Definition at line 106 of file container_proxy.h.

References qmcplusplus::n, and container_proxy< T >::ref.

◆ resize() [2/2]

void resize ( I n,
int  d 
)
inline

Definition at line 109 of file container_proxy.h.

References qmcplusplus::n, and container_proxy< T >::ref.

110  {
111  size_t nt = n[0];
112  for (int i = 1; i < d; ++i)
113  nt *= n[i];
114  ref.resize(nt);
115  }

◆ size()

size_t size ( ) const
inline

Member Data Documentation

◆ ref

std::vector<T>& ref

Definition at line 101 of file container_proxy.h.


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