GLAC  1.0
Public Member Functions | Data Fields
Lattice< T > Class Template Reference

A method for holding a lattice of type T. More...

#include <lattice.h>

Public Member Functions

 Lattice ()
 
 Lattice (std::vector< unsigned int >latticeDimensions)
 
 ~Lattice ()
 
 Lattice (const Lattice< T > &other)
 Lattice copy constructor. More...
 
 Lattice (Lattice< T > &&other) noexcept
 Lattice move constructor. More...
 
Latticeoperator= (const Lattice &other)
 operator = Copy assignement operator More...
 
Latticeoperator= (Lattice< T > &&other) noexcept
 operator = Move assignement operator More...
 
void allocate (std::vector< unsigned int > dim)
 allocate method for allocating memory. More...
 
T & operator[] (unsigned long i)
 operator [] access operator that has no boundary checking. More...
 
T & operator() (unsigned long i)
 operator () access operator that has boundary checking. More...
 
Lattice< T > & operator+= (Lattice< T > &B)
 
Lattice< T > & operator+= (Lattice< T > &&B)
 
Lattice< T > & operator-= (Lattice< T > &B)
 
Lattice< T > & operator-= (Lattice< T > &&B)
 
Lattice< T > & operator *= (Lattice< T > &B)
 
Lattice< T > & operator *= (Lattice< T > &&B)
 
Lattice< T > & operator *= (double B)
 
Lattice< T > & operator/= (double B)
 
Lattice< T > & operator+= (complex B)
 
Lattice< T > & operator-= (complex B)
 
Lattice< T > & operator *= (complex B)
 
Lattice< T > & operator/= (complex B)
 
void identity ()
 identity method for setting the SU3 matrices of the lattice to identity. More...
 
void zeros ()
 zeros sets all of the SU3 elements in the lattice to zero. More...
 
Lattice< T > copy (Lattice< T > B)
 copy method for copying content of another lattice B onto itself. More...
 

Data Fields

std::vector< T > m_sites
 
std::vector< unsigned int > m_dim
 
unsigned long m_latticeSize
 

Detailed Description

template<class T>
class Lattice< T >

A method for holding a lattice of type T.

The lattice class is implemented such that is uses move semantics, i.e. rule of 5.

Author
Mathias M. Vege
Version
1.0
Date
2017-2019

Constructor & Destructor Documentation

◆ Lattice() [1/4]

template<class T>
Lattice< T >::Lattice ( )
inline

◆ Lattice() [2/4]

template<class T>
Lattice< T >::Lattice ( std::vector< unsigned int >  latticeDimensions)
inline

◆ ~Lattice()

template<class T>
Lattice< T >::~Lattice ( )
inline

◆ Lattice() [3/4]

template<class T>
Lattice< T >::Lattice ( const Lattice< T > &  other)
inline

Lattice copy constructor.

Parameters
other

◆ Lattice() [4/4]

template<class T>
Lattice< T >::Lattice ( Lattice< T > &&  other)
inlinenoexcept

Lattice move constructor.

Parameters
other

Member Function Documentation

◆ allocate()

template<class T >
void Lattice< T >::allocate ( std::vector< unsigned int >  dim)
inline

allocate method for allocating memory.

Parameters
dim
Here is the caller graph for this function:

◆ copy()

template<class T>
Lattice< T > Lattice< T >::copy ( Lattice< T >  B)
inline

copy method for copying content of another lattice B onto itself.

Parameters
B
Returns
itself as copied from B.
Here is the caller graph for this function:

◆ identity()

template<class T >
void Lattice< T >::identity ( )
inline

identity method for setting the SU3 matrices of the lattice to identity.

Here is the caller graph for this function:

◆ operator *=() [1/4]

template<class T>
Lattice< T > & Lattice< T >::operator *= ( Lattice< T > &  B)
inline

◆ operator *=() [2/4]

template<class T>
Lattice< T > & Lattice< T >::operator *= ( Lattice< T > &&  B)
inline

◆ operator *=() [3/4]

template<class T>
Lattice< T > & Lattice< T >::operator *= ( double  B)
inline

◆ operator *=() [4/4]

template<class T>
Lattice< T > & Lattice< T >::operator *= ( complex  B)
inline

◆ operator()()

template<class T>
T& Lattice< T >::operator() ( unsigned long  i)
inline

operator () access operator that has boundary checking.

Parameters
i
Returns

◆ operator+=() [1/3]

template<class T>
Lattice< T > & Lattice< T >::operator+= ( Lattice< T > &  B)
inline

◆ operator+=() [2/3]

template<class T>
Lattice< T > & Lattice< T >::operator+= ( Lattice< T > &&  B)
inline

◆ operator+=() [3/3]

template<class T>
Lattice< T > & Lattice< T >::operator+= ( complex  B)
inline

◆ operator-=() [1/3]

template<class T>
Lattice< T > & Lattice< T >::operator-= ( Lattice< T > &  B)
inline

◆ operator-=() [2/3]

template<class T>
Lattice< T > & Lattice< T >::operator-= ( Lattice< T > &&  B)
inline

◆ operator-=() [3/3]

template<class T>
Lattice< T > & Lattice< T >::operator-= ( complex  B)
inline

◆ operator/=() [1/2]

template<class T >
Lattice< T > & Lattice< T >::operator/= ( double  B)
inline

◆ operator/=() [2/2]

template<class T >
Lattice< T > & Lattice< T >::operator/= ( complex  B)
inline

◆ operator=() [1/2]

template<class T>
Lattice& Lattice< T >::operator= ( const Lattice< T > &  other)
inline

operator = Copy assignement operator

Parameters
other
Returns

◆ operator=() [2/2]

template<class T>
Lattice& Lattice< T >::operator= ( Lattice< T > &&  other)
inlinenoexcept

operator = Move assignement operator

Parameters
other
Returns

◆ operator[]()

template<class T>
T& Lattice< T >::operator[] ( unsigned long  i)
inline

operator [] access operator that has no boundary checking.

Parameters
i
Returns

◆ zeros()

template<class T >
void Lattice< T >::zeros ( )
inline

zeros sets all of the SU3 elements in the lattice to zero.

Here is the caller graph for this function:

Field Documentation

◆ m_dim

template<class T>
std::vector<unsigned int> Lattice< T >::m_dim

◆ m_latticeSize

template<class T>
unsigned long Lattice< T >::m_latticeSize

◆ m_sites

template<class T>
std::vector<T> Lattice< T >::m_sites

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