MaCh3 2.2.1
Reference Guide
Loading...
Searching...
No Matches
mcmc.h
Go to the documentation of this file.
1#pragma once
2
4
7class mcmc : public FitterBase {
8 public:
11 mcmc(manager * const fitMan);
13 virtual ~mcmc();
14
16 void RunMCMC() override;
17
19 inline void setChainLength(unsigned int L) { chainLength = L; };
20
24 void StartFromPreviousFit(const std::string& FitName) override;
25
27 inline std::string GetName()const {return "MCMC";};
28 private:
30 inline void ProposeStep();
31
33 inline void CheckStep();
34
36 inline void PrintProgress();
37
39 bool reject;
41 unsigned int chainLength;
42
44 bool anneal;
46 double AnnealTemp;
47};
48
Base class for implementing fitting algorithms.
Definition: FitterBase.h:23
manager * fitMan
The manager.
Definition: FitterBase.h:92
The manager class is responsible for managing configurations and settings.
Definition: Manager.h:16
Implementation of MR2T2 algorithm.
Definition: mcmc.h:7
std::string GetName() const
Get name of class.
Definition: mcmc.h:27
void RunMCMC() override
Actual implementation of MCMC fitting algorithm.
Definition: mcmc.cpp:78
unsigned int chainLength
number of steps in chain
Definition: mcmc.h:41
double AnnealTemp
simulated annealing temperature
Definition: mcmc.h:46
bool anneal
simulated annealing
Definition: mcmc.h:44
bool reject
Do we reject based on hitting boundaries in systs.
Definition: mcmc.h:39
virtual ~mcmc()
Destructor.
Definition: mcmc.cpp:26
void CheckStep()
Do we accept the step.
Definition: mcmc.cpp:33
void ProposeStep()
Propose a step.
Definition: mcmc.cpp:136
void StartFromPreviousFit(const std::string &FitName) override
Allow to start from previous fit/chain.
Definition: mcmc.cpp:223
void PrintProgress()
Print the progress.
Definition: mcmc.cpp:206
void setChainLength(unsigned int L)
Set how long chain should be.
Definition: mcmc.h:19