Go to the documentation of this file. 1 #ifndef HOPS_NEGATIVELOGLIKELIHOODRECORDER_HPP
2 #define HOPS_NEGATIVELOGLIKELIHOODRECORDER_HPP
4 #include "../../FileWriter/FileWriter.hpp"
9 #include "../../Utility/ChainData.hpp"
15 template<
typename MarkovChainImpl>
19 records = std::make_shared<std::vector<double>>();
25 MarkovChainImpl::installDataObject(chainData);
30 fileWriter->
write(
"negativeLogLikelihood", *records);
32 MarkovChainImpl::writeRecordsToFile(fileWriter);
37 records->emplace_back(MarkovChainImpl::getNegativeLogLikelihoodOfCurrentState());
39 MarkovChainImpl::storeRecord();
46 MarkovChainImpl::clearRecords();
51 std::shared_ptr<std::vector<double>> records;
55 #endif //HOPS_NEGATIVELOGLIKELIHOODRECORDER_HPP
Definition: IsClearRecordsAvailable.hpp:8
void clearRecords()
Definition: NegativeLogLikelihoodRecorder.hpp:43
NegativeLogLikelihoodRecorder(const MarkovChainImpl &markovChainImpl)
Definition: NegativeLogLikelihoodRecorder.hpp:18
Definition: IsInstallDataObjectAvailable.hpp:9
Definition: IsWriteRecordsToFileAvailable.hpp:9
Definition: NegativeLogLikelihoodRecorder.hpp:16
void setNegativeLogLikelihood(const std::shared_ptr< std::vector< double >> &negativeLogLikelihood)
Definition: ChainData.hpp:37
virtual void write(const std::string &description, const std::vector< float > &records) const =0
Writes records.
Definition: ChainData.hpp:12
Definition: IsStoreRecordAvailable.hpp:8
void writeRecordsToFile(const FileWriter *const fileWriter) const
Definition: NegativeLogLikelihoodRecorder.hpp:29
Definition: FileWriter.hpp:9
void installDataObject(ChainData &chainData)
Definition: NegativeLogLikelihoodRecorder.hpp:22
Definition: CsvReader.hpp:8
void storeRecord()
Definition: NegativeLogLikelihoodRecorder.hpp:36