hops
NoOpDrawAdapter.hpp
Go to the documentation of this file.
1 #ifndef HOPS_NOOPDRAWADAPTER_HPP
2 #define HOPS_NOOPDRAWADAPTER_HPP
3 
5 #include "../../RandomNumberGenerator/RandomNumberGenerator.hpp"
6 
7 namespace hops {
8  template<typename MarkovChainProposer>
9  class NoOpDrawAdapter : public MarkovChainProposer {
10  public:
11  explicit NoOpDrawAdapter(const MarkovChainProposer &markovChainImpl) : MarkovChainProposer(markovChainImpl) {}
12 
13  constexpr double getAcceptanceRate() {
14  return 1.;
15  }
16 
17  void draw(RandomNumberGenerator &randomNumberGenerator) {
18  MarkovChainProposer::propose(randomNumberGenerator);
20  MarkovChainProposer::acceptProposal();
21  }
22  }
23  };
24 }
25 
26 #endif //HOPS_NOOPDRAWADAPTER_HPP
IsAcceptProposalAvailable.hpp
pcg_detail::engine
Definition: pcg_random.hpp:364
hops::IsAcceptProposalAvailable
Definition: IsAcceptProposalAvailable.hpp:8
hops::NoOpDrawAdapter
Definition: NoOpDrawAdapter.hpp:9
hops::NoOpDrawAdapter::draw
void draw(RandomNumberGenerator &randomNumberGenerator)
Definition: NoOpDrawAdapter.hpp:17
hops
Definition: CsvReader.hpp:8
hops::NoOpDrawAdapter::NoOpDrawAdapter
NoOpDrawAdapter(const MarkovChainProposer &markovChainImpl)
Definition: NoOpDrawAdapter.hpp:11
hops::NoOpDrawAdapter::getAcceptanceRate
constexpr double getAcceptanceRate()
Definition: NoOpDrawAdapter.hpp:13