ALPS MPS Codes
Reference documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Attributes | List of all members
NU1Charge< N, S > Class Template Reference

#include <nu1_tpl.h>

Public Member Functions

 NU1Charge (S init=0)
 
 NU1Charge (boost::array< S, N > const &rhs)
 
S * begin ()
 
S * end ()
 
S const * begin () const
 
S const * end () const
 
S & operator[] (std::size_t p)
 
S const & operator[] (std::size_t p) const
 
template<class Archive >
void save (Archive &ar) const
 
template<class Archive >
void load (Archive &ar)
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Static Public Attributes

static const int static_size = N
 

Detailed Description

template<int N, class S = int>
class NU1Charge< N, S >

Definition at line 42 of file nu1_tpl.h.

Constructor & Destructor Documentation

template<int N, class S = int>
NU1Charge< N, S >::NU1Charge ( init = 0)
inline

Definition at line 47 of file nu1_tpl.h.

48  {
49  for (S i = 0; i < N; ++i) (*this)[i] = init;
50  }
template<int N, class S = int>
NU1Charge< N, S >::NU1Charge ( boost::array< S, N > const &  rhs)
inline

Definition at line 52 of file nu1_tpl.h.

53  {
54  std::copy(rhs.begin(), rhs.end(), this->begin());
55  }
S * begin()
Definition: nu1_tpl.h:57

Member Function Documentation

template<int N, class S = int>
S* NU1Charge< N, S >::begin ( )
inline

Definition at line 57 of file nu1_tpl.h.

57 { return &data_[0]; }
template<int N, class S = int>
S const* NU1Charge< N, S >::begin ( ) const
inline

Definition at line 60 of file nu1_tpl.h.

60 { return &data_[0]; }
template<int N, class S = int>
S* NU1Charge< N, S >::end ( )
inline

Definition at line 58 of file nu1_tpl.h.

58 { return &data_[N]; }
template<int N, class S = int>
S const* NU1Charge< N, S >::end ( ) const
inline

Definition at line 61 of file nu1_tpl.h.

61 { return &data_[N]; }
template<int N, class S = int>
template<class Archive >
void NU1Charge< N, S >::load ( Archive &  ar)
inline

Definition at line 74 of file nu1_tpl.h.

75  {
76  for (int i = 0; i < N; ++i)
77  ar[boost::lexical_cast<std::string>(i)] >> (*this)[i];
78  }
template<int N, class S = int>
S& NU1Charge< N, S >::operator[] ( std::size_t  p)
inline

Definition at line 63 of file nu1_tpl.h.

63 { return data_[p]; }
template<int N, class S = int>
S const& NU1Charge< N, S >::operator[] ( std::size_t  p) const
inline

Definition at line 64 of file nu1_tpl.h.

64 { return data_[p]; }
template<int N, class S = int>
template<class Archive >
void NU1Charge< N, S >::save ( Archive &  ar) const
inline

Definition at line 67 of file nu1_tpl.h.

68  {
69  for (int i = 0; i < N; ++i)
70  ar[boost::lexical_cast<std::string>(i)] << (*this)[i];
71  }
template<int N, class S = int>
template<class Archive >
void NU1Charge< N, S >::serialize ( Archive &  ar,
const unsigned int  version 
)
inline

Definition at line 81 of file nu1_tpl.h.

82  {
83  ar & data_;
84  }

Member Data Documentation

template<int N, class S = int>
const int NU1Charge< N, S >::static_size = N
static

Definition at line 45 of file nu1_tpl.h.


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