forked from sanshar/Block
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Operators.h
85 lines (67 loc) · 2.43 KB
/
Operators.h
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#ifndef SPIN_OPERATORS_HEADER
#define SPIN_OPERATORS_HEADER
#include "BaseOperator.h"
#include <boost/function.hpp>
#include <boost/functional.hpp>
typedef boost::function<void (std::vector<boost::shared_ptr<SpinAdapted::SparseMatrix> >&)> Functor;
namespace SpinAdapted{
class Cre: public SpinAdapted::SparseMatrix
{
public:
Cre() { orbs.resize(1); fermion = true;}
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class CreDes: public SpinAdapted::SparseMatrix
{
public:
CreDes() { orbs.resize(2); fermion = false;}
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class CreCre: public SpinAdapted::SparseMatrix
{
public:
CreCre() { orbs.resize(2); fermion = false;}
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class CreDesComp: public SpinAdapted::SparseMatrix
{
public:
CreDesComp() { orbs.resize(2); fermion = false;}
void build_fromcd(SpinBlock& b);
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class DesDesComp: public SpinAdapted::SparseMatrix
{
public:
DesDesComp() { orbs.resize(2); fermion = false;}
void build_fromcc(SpinBlock& b);
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class CreCreDesComp: public SpinAdapted::SparseMatrix
{
public:
CreCreDesComp() { orbs.resize(1); fermion = true;}
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class Ham: public SpinAdapted::SparseMatrix
{
public:
Ham() { fermion = false;}
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
}
#endif