41 m_fstream <<
"id,age,is_recovered,is_immune,start_infectiousness," 42 <<
"end_infectiousness,start_symptomatic,end_symptomatic" << endl;
47 for (
const auto& p : *population) {
48 const auto& h = p.GetHealth();
49 m_fstream << p.GetId() <<
"," << p.GetAge() <<
"," << h.IsRecovered() <<
"," << h.IsImmune() <<
"," 50 << h.GetStartInfectiousness() <<
"," << h.GetEndInfectiousness() <<
"," 51 << h.GetStartSymptomatic() <<
"," << h.GetEndSymptomatic() << std::endl;
void Initialize(const std::string &output_dir)
Generate file name and open the file stream.
Utilities for the project.
Header for the PersonFile class.
void Print(std::shared_ptr< const Population > population)
Print the given cases with corresponding tag.
static filesys::path BuildPath(const std::string &output_prefix, const std::string &filename)
Interpret prefix (directory or filename prefix) and return appropriate path.
PersonsFile(const std::string &output_dir="output")
Constructor: initialize.
~PersonsFile()
Destructor: close the file stream.
Header file for the core Population class.
Interface for install directory queries.
Namespace for the simulator and related classes.