Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
index_lex.h
Go to the documentation of this file.
1 
15 #ifndef INDEX_LEX_INCLUDED
16 #define INDEX_LEX_INCLUDED
17 
19 
21 
34 class Index_lex {
35  protected:
36  int m_Nx, m_Ny, m_Nz, m_Nt;
37 
38  public:
40  m_Nx(CommonParameters::Nx()),
41  m_Ny(CommonParameters::Ny()),
42  m_Nz(CommonParameters::Nz()),
43  m_Nt(CommonParameters::Nt()) { }
44 
45  Index_lex(const int Nx, const int Ny, const int Nz, const int Nt)
46  {
47  m_Nx = Nx;
48  m_Ny = Ny;
49  m_Nz = Nz;
50  m_Nt = Nt;
51  }
52 
53  int site(const int& x, const int& y, const int& z, const int& t)
54  const
55  {
56  return x + m_Nx * (y + m_Ny * (z + m_Nz * t));
57  }
58 };
59 #endif
int m_Nz
Definition: index_lex.h:36
int site(const int &x, const int &y, const int &z, const int &t) const
Definition: index_lex.h:53
int m_Nt
Definition: index_lex.h:36
Common parameter class: provides parameters as singleton.
Lexical site index.
Definition: index_lex.h:34
int m_Ny
Definition: index_lex.h:36
Index_lex(const int Nx, const int Ny, const int Nz, const int Nt)
Definition: index_lex.h:45
int m_Nx
Definition: index_lex.h:36
Index_lex()
Definition: index_lex.h:39