#include <loggers.h>
Public Member Functions | |
dirfilelog (std::string dirname0, int maxlen0) | |
Default constructor. | |
void | init () |
Initialize storage. | |
void | step (bool final=false) |
consider this record to be complete | |
void | write_buffers (int Len) |
Write memory storage to disk. | |
void | logit (int id, vec v) |
log this vector | |
void | itsave (const char *fname) |
virtual int | add (RV rv, string name="") |
returns an identifier which will be later needed for calling the log() function | |
Protected Attributes | |
string | dirname |
name of the directory | |
Array< string > | scalarnames |
Automatically generated. | |
int | maxlen |
Maximum length of vectors stored in memory. | |
int | ind |
Currect record to be written. | |
Array< mat > | vectors |
Storage. | |
Array< RV > | entries |
RVs of all logged variables. | |
Array< string > | names |
Names of logged quantities, e.g. names of algorithm variants. |
Dirfile is a special format used by the kst program. See documentation of kst for description.
This format is used to store scalars, hence multivariate RVs must be separated.
dirfilelog::dirfilelog | ( | std::string | dirname0, | |
int | maxlen0 | |||
) | [inline] |
Default constructor.
dirname0 | name of the directory in which to store the results | |
maxlen0 | length of the memory buffers, when full the buffers will be dumped to HDD and returned to the beginning. |
void dirfilelog::write_buffers | ( | int | Len | ) |
Write memory storage to disk.
Len | length of buffer to be written, if 0 the file is truncated at 0. |
References dirname, logger::entries, memlog::maxlen, scalarnames, and memlog::vectors.