# bdm::memlog Class Reference

`#include <loggers.h>`

Inheritance diagram for bdm::memlog:

List of all members.

## Detailed Description

Logging into matrices in data format in memory.

More?...

## Public Member Functions
| memlog (int maxlen0)
| Default constructor.
void | init ()
| Initialize storage.
void | step ()
| Shifts storage position for another time step.
void | logit (int id, const vec &v)
| log this vector
void | itsave (const char *fname)
| Save values into an itfile named after `fname`.
virtual int | add (const RV &rv, string name="")
virtual void | finalize ()
| Finalize storing information.
## Protected Attributes
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.

## Member Function Documentation

virtual int bdm::logger::add | ( | const RV & | rv,
|  | string | name = `""` |
| ) |  |  | `[inline, virtual, inherited]`

returns an identifier which will be later needed for calling the `logit()` function For empty RV it returns -1, this entry will be ignored by `logit()`.

References bdm::logger::entries, and bdm::logger::names.

Referenced by pmsmDS::log_add(), bdm::ArxDS::log_add(), bdm::BM::log_add(), and bdm::DS::log_add().

The documentation for this class was generated from the following files:

- loggers.h
- loggers.cpp