-
Notifications
You must be signed in to change notification settings - Fork 3
/
reweightedmomentsjk.h
43 lines (35 loc) · 1.36 KB
/
reweightedmomentsjk.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
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. See the enclosed file LICENSE for a copy or if
* that was not distributed with this file, You can obtain one at
* http://mozilla.org/MPL/2.0/.
*
* Copyright 2017 Max H. Gerlach
*
* */
#ifndef REWEIGHTEDMOMENTSJK_H_
#define REWEIGHTEDMOMENTSJK_H_
#include <vector>
struct ReweightedMomentsJK {
// expectation values of the moments for some observable o:
double o; // <o>
double o2; // <o**2>
double o4; // <o**4>
// jackknife-block estimatats of the above
std::vector<double> jkBlocks_o;
std::vector<double> jkBlocks_o2;
std::vector<double> jkBlocks_o4;
// default constructor: no jackknife-block estimates
ReweightedMomentsJK(double o_ = 0.0,
double o2_ = 0.0,
double o4_ = 0.0) :
o(o_), o2(o2_), o4(o4_)
{ }
ReweightedMomentsJK(double o_, double o2_, double o4_,
const std::vector<double>& jkBlocks_o_,
const std::vector<double>& jkBlocks_o2_,
const std::vector<double>& jkBlocks_o4_) :
o(o_), o2(o2_), o4(o4_), jkBlocks_o(jkBlocks_o_), jkBlocks_o2(jkBlocks_o2_),
jkBlocks_o4(jkBlocks_o4_)
{ }
};
#endif //REWEIGHTEDMOMENTSJK_H_