Go to the documentation of this file. 1 #ifndef HOPS_ACCEPTANCERATERECORDER_HPP
2 #define HOPS_ACCEPTANCERATERECORDER_HPP
15 template<
typename MarkovChainImpl>
19 records = std::make_shared<std::vector<double>>();
25 MarkovChainImpl::installDataObject(chainData);
30 fileWriter->
write(
"acceptance rates", *records);
32 MarkovChainImpl::writeRecordsToFile(fileWriter);
41 records->emplace_back(MarkovChainImpl::getAcceptanceRate());
43 MarkovChainImpl::storeRecord();
50 MarkovChainImpl::clearRecords();
55 std::shared_ptr<std::vector<double>> records;
59 #endif //HOPS_ACCEPTANCERATERECORDER_HPP
void clearRecords()
Definition: AcceptanceRateRecorder.hpp:47
Definition: AcceptanceRateRecorder.hpp:16
void installDataObject(ChainData &chainData)
Definition: AcceptanceRateRecorder.hpp:22
Definition: IsClearRecordsAvailable.hpp:8
std::vector< double > getAcceptanceRateRecords() const
Definition: AcceptanceRateRecorder.hpp:36
void storeRecord()
Definition: AcceptanceRateRecorder.hpp:40
void writeRecordsToFile(const FileWriter *const fileWriter) const
Definition: AcceptanceRateRecorder.hpp:29
Definition: IsInstallDataObjectAvailable.hpp:9
Definition: IsWriteRecordsToFileAvailable.hpp:9
virtual void write(const std::string &description, const std::vector< float > &records) const =0
Writes records.
Definition: ChainData.hpp:12
Definition: IsStoreRecordAvailable.hpp:8
AcceptanceRateRecorder(const MarkovChainImpl &markovChainImpl)
Definition: AcceptanceRateRecorder.hpp:18
Definition: FileWriter.hpp:9
Definition: CsvReader.hpp:8
void setAcceptanceRates(const std::shared_ptr< std::vector< double >> &acceptanceRates)
Definition: ChainData.hpp:27