-
Notifications
You must be signed in to change notification settings - Fork 31
/
sampler.h
27 lines (23 loc) · 726 Bytes
/
sampler.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
#pragma once
#include <memory>
class Sampler {
public:
Sampler(
unsigned int numberOfParticles,
unsigned int numberOfDimensions,
double stepLength,
unsigned int numberOfMetropolisSteps);
void sample(bool acceptedStep, class System* system);
void printOutputToTerminal(class System& system);
void computeAverages();
double getEnergy() { return m_energy; }
private:
unsigned int m_stepNumber = 0;
unsigned int m_numberOfMetropolisSteps = 0;
unsigned int m_numberOfParticles = 0;
unsigned int m_numberOfDimensions = 0;
unsigned int m_numberOfAcceptedSteps = 0;
double m_energy = 0;
double m_cumulativeEnergy = 0;
double m_stepLength = 0;
};