QMCPACK
TinyVector< T, N, base_type > Struct Template Reference
+ Inheritance diagram for TinyVector< T, N, base_type >:
+ Collaboration diagram for TinyVector< T, N, base_type >:

Public Member Functions

 TinyVector (T d=T(0))
 
T const & operator() (std::size_t n) const
 
T & operator() (std::size_t n)
 

Friends

template<class Scalar >
TinyVectoroperator*= (TinyVector &v, Scalar s)
 

Detailed Description

template<class T, std::size_t N, class base_type = std::array<T, N>>
struct TinyVector< T, N, base_type >

Definition at line 28 of file Blitz.h.

Constructor & Destructor Documentation

◆ TinyVector()

TinyVector ( d = T(0))
inline

Definition at line 30 of file Blitz.h.

30 { base_type::fill(d); }

Member Function Documentation

◆ operator()() [1/2]

T const& operator() ( std::size_t  n) const
inline

Definition at line 31 of file Blitz.h.

References qmcplusplus::n.

31 { return base_type::operator[](n); }

◆ operator()() [2/2]

T& operator() ( std::size_t  n)
inline

Definition at line 32 of file Blitz.h.

References qmcplusplus::n.

32 { return base_type::operator[](n); }

Friends And Related Function Documentation

◆ operator*=

TinyVector& operator*= ( TinyVector< T, N, base_type > &  v,
Scalar  s 
)
friend

Definition at line 34 of file Blitz.h.

35  {
36  std::transform(v.begin(), v.end(), v.begin(), [&s](auto e) { return e * s; });
37  return v;
38  }

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