QMCPACK
TinyMatrix< T, N1, N2, base_type > Struct Template Reference
+ Inheritance diagram for TinyMatrix< T, N1, N2, base_type >:
+ Collaboration diagram for TinyMatrix< T, N1, N2, base_type >:

Public Member Functions

TinyMatrixoperator= (const T t)
 
T const & operator() (std::size_t i, std::size_t j) const
 
T & operator() (std::size_t i, std::size_t j)
 

Friends

std::ostream & operator<< (std::ostream &os, TinyMatrix const &self)
 

Detailed Description

template<class T, std::size_t N1, std::size_t N2, class base_type = std::array<std::array<T, N2>, N1>>
struct TinyMatrix< T, N1, N2, base_type >

Definition at line 42 of file Blitz.h.

Member Function Documentation

◆ operator()() [1/2]

T const& operator() ( std::size_t  i,
std::size_t  j 
) const
inline

Definition at line 51 of file Blitz.h.

51 { return base_type::operator[](i)[j]; }

◆ operator()() [2/2]

T& operator() ( std::size_t  i,
std::size_t  j 
)
inline

Definition at line 52 of file Blitz.h.

52 { return base_type::operator[](i)[j]; }

◆ operator=()

TinyMatrix& operator= ( const T  t)
inline

Definition at line 44 of file Blitz.h.

45  {
46  std::array<T, N2> val;
47  val.fill(t);
48  base_type::fill(val);
49  return *this;
50  }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
TinyMatrix< T, N1, N2, base_type > const &  self 
)
friend

Definition at line 53 of file Blitz.h.

54  {
55  for (auto i = 0; i != N1; ++i)
56  {
57  for (auto j = 0; j != N2; ++j)
58  os << self(i, j) << ',';
59  os << '\n';
60  }
61  return os;
62  }

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