-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathhybsegment.hpp
More file actions
46 lines (42 loc) · 1.84 KB
/
hybsegment.hpp
File metadata and controls
46 lines (42 loc) · 1.84 KB
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
/****************************************************************************
*
* ALPS DMFT Project
*
* Copyright (C) 2012 by Emanuel Gull <gull@pks.mpg.de>,
*
* based on an earlier version by Philipp Werner and Emanuel Gull
*
*
* This software is part of the ALPS Applications, published under the ALPS
* Application License; you can use, redistribute it and/or modify it under
* the terms of the license, either version 1 or (at your option) any later
* version.
*
* You should have received a copy of the ALPS Application License along with
* the ALPS Applications; see the file LICENSE.txt. If not, the license is also
* available from http://alps.comp-phys.org/.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
* SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
* FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*****************************************************************************/
#ifndef HYB_SEG_HPP
#define HYB_SEG_HPP
#include<fstream>
//the struct 'segment' has a start and an end time and a comparison function.
//segment describes a pair of operators in an orbital: t_start is the c^\dagger, t_end is the c operator.
struct segment
{
segment(){};
segment(double t_start, double t_end){t_start_=t_start; t_end_=t_end;}
double t_start_, t_end_;
bool operator<(const segment &t2)const { return t_start_<t2.t_start_; }
bool operator<(const double &t2) const { return t_start_<t2; }
};
std::ostream &operator<<(std::ostream &os, const segment &s);
#endif