55 return addLogRecord( _record );
64 logCollection[ _record.
aliasIdx ] = _record;
69 logCollection.push_back( _record );
70 newIndex = logCollection.size() - 1;
71 logCollection.back().aliasIdx = _record.
aliasIdx = newIndex;
80 if (_record.
aliasIdx < 0 || _record.
aliasIdx >= ((
int)getNumLogRecords( ) - 1))
83 _record = logCollection[ _record.
aliasIdx ];
92 for (
unsigned ind = 0; ind < logCollection.size(); ++ind)
94 if (logCollection[ ind ].getLogFrequency() != _record.
getLogFrequency())
97 logCollection[ ind ].updateLogRecord( _record );
105 return logCollection.size();
110 cout <<
"LogCollection having the following records: \n";
111 for (
uint i = 0; i < logCollection.size(); ++i)
112 logCollection[ i ].printInfo();
119 unsigned nDoubles = 0;
121 for (
unsigned i = 0; i < logCollection.size(); ++i)
122 nDoubles += logCollection[ i ].getNumDoubles();
126 cout <<
"LogCollection contains " << nDoubles <<
"doubles.\n";
LogFrequency getLogFrequency() const
returnValue printLoggingInfo() const
int addLogRecord(LogRecord &record)
Allows to pass back messages to the calling function.
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
int operator<<(LogRecord &record)
#define CLOSE_NAMESPACE_ACADO
returnValue updateLogRecord(LogRecord &_record) const
virtual returnValue setupLogging()
uint getNumLogRecords() const
returnValue getLogRecord(LogRecord &_record) const
returnValue printNumDoubles() const
Allows to setup and store user-specified log records of algorithmic information.
#define BEGIN_NAMESPACE_ACADO
#define ACADOERROR(retval)