QNANO
Main Page
Related Pages
Classes
Files
File List
include
manybody
Manybody_Eigenvector.h
1
#ifndef QNANO_NEW_MANYBODY_EIGENVECTOR_DEFINED_H
2
#define QNANO_NEW_MANYBODY_EIGENVECTOR_DEFINED_H
3
4
#include "manybody/Fermion_Double_Index.h"
5
#include "tools/Reader.h"
6
#include "tools/List_Class.h"
7
8
typedef
std::pair<Fermion_Double_Index, std::complex<double> > Manybody_Eigenvector_Element;
9
10
class
Manybody_Eigenvector
:
public
List_Class
<Manybody_Eigenvector_Element>{
11
public
:
12
13
int
nr_e, nr_h, rank_e, rank_h;
14
double
eigenvalue;
15
16
void
sort();
17
void
read(
const
std::string &filename);
18
void
print(
const
std::string &filename,
int
figure=8)
const
;
19
int
find_sorted(
const
Fermion_Double_Index
&fi)
const
;
20
void
add_value(
const
Fermion_Double_Index
&fi, std::complex<double> val);
21
22
//Add perturbative corrections to eigenstate
23
void
correctPT(
const
std::string &PTfile,
int
line,
double
tolerance=1e-5);
24
25
std::complex<double> dot(
const
Manybody_Eigenvector
&other)
const
;
26
27
void
set_defaults(){
28
nr_e=0; nr_h=0; rank_e=0; rank_h=0; eigenvalue=0;
29
}
30
void
set_vacuum(){
31
list.resize(1);
32
list[0]=std::make_pair(
Fermion_Double_Index
(), 1.);
33
}
34
Manybody_Eigenvector
(){
35
set_defaults();
36
}
37
Manybody_Eigenvector
(
int
nr_e_,
int
nr_h_,
int
rank_e_,
int
rank_h_,
double
eval=0.){
38
nr_e=nr_e_;
39
nr_h=nr_h_;
40
rank_e=rank_e_;
41
rank_h=rank_h_;
42
eigenvalue=eval;
43
}
44
Manybody_Eigenvector
(
const
std::string &filename){
45
set_defaults();
46
read(filename);
47
}
48
49
50
};
51
52
#endif
List_Class
Definition:
List_Class.h:8
Fermion_Double_Index
Definition:
Fermion_Double_Index.h:14
Manybody_Eigenvector
Definition:
Manybody_Eigenvector.h:10
Generated by
1.8.11