-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlattpoint.h
More file actions
30 lines (27 loc) · 973 Bytes
/
lattpoint.h
File metadata and controls
30 lines (27 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef LATTPOINT_H
#define LATTPOINT_H
#include <array>
#include <string>
using namespace std;
class LattPoint {
private:
array<int,4> x; // 4-vector representation
int L; // lattice size
public:
LattPoint(const array<int,4> initX, const int initL); // constructor
LattPoint(const LattPoint& x); // copy constructor
LattPoint(const LattPoint&& x); // move constructor
void setX(const array<int,4> newX); // setter function
array<int,4> getX() const; // getter function
int getL() const;
LattPoint scale(const int s); // scale by integer
string toString() const;
LattPoint operator=(const LattPoint& U2);
LattPoint operator=(const LattPoint&& U2);
LattPoint operator+=(const LattPoint& U2);
LattPoint operator+(const LattPoint& U2) const;
LattPoint operator-=(const LattPoint& U2);
LattPoint operator-(const LattPoint& U2) const;
bool operator<(const LattPoint& U2) const;
};
#endif