5 #include <initializer_list> 16 AnalogueRecorder(
const std::string &filename, std::initializer_list<T*> variables,
unsigned int popSize,
const std::string &delimiter=
" ")
17 : m_Stream(filename), m_Variables(variables), m_PopSize(popSize), m_Delimiter(delimiter)
20 m_Stream.precision(16);
22 AnalogueRecorder(
const std::string &filename, T *variable,
unsigned int popSize,
const std::string &delimiter=
" ")
29 m_Stream << t << m_Delimiter;
31 for(
auto *v : m_Variables) {
32 for(
unsigned int i = 0; i < m_PopSize; i++) {
33 m_Stream << v[i] << m_Delimiter;
36 m_Stream << std::endl;
44 std::ofstream m_Stream;
45 std::vector<T*> m_Variables;
46 const unsigned int m_PopSize;
47 const std::string m_Delimiter;
AnalogueRecorder(const std::string &filename, T *variable, unsigned int popSize, const std::string &delimiter=" ")
Definition: analogueRecorder.h:22
AnalogueRecorder(const std::string &filename, std::initializer_list< T *> variables, unsigned int popSize, const std::string &delimiter=" ")
Definition: analogueRecorder.h:16
Definition: analogueRecorder.h:13
void record(double t)
Definition: analogueRecorder.h:27