[259] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
| 3 | <title>mixpp: bdm::memlog Class Reference</title> |
---|
| 4 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
[290] | 5 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
[259] | 6 | </head><body> |
---|
[538] | 7 | <!-- Generated by Doxygen 1.5.8 --> |
---|
[271] | 8 | <script type="text/javascript"> |
---|
| 9 | <!-- |
---|
| 10 | function changeDisplayState (e){ |
---|
| 11 | var num=this.id.replace(/[^[0-9]/g,''); |
---|
| 12 | var button=this.firstChild; |
---|
| 13 | var sectionDiv=document.getElementById('dynsection'+num); |
---|
| 14 | if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ |
---|
| 15 | sectionDiv.style.display='block'; |
---|
| 16 | button.src='open.gif'; |
---|
| 17 | }else{ |
---|
| 18 | sectionDiv.style.display='none'; |
---|
| 19 | button.src='closed.gif'; |
---|
| 20 | } |
---|
| 21 | } |
---|
| 22 | function initDynSections(){ |
---|
| 23 | var divs=document.getElementsByTagName('div'); |
---|
| 24 | var sectionCounter=1; |
---|
| 25 | for(var i=0;i<divs.length-1;i++){ |
---|
| 26 | if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ |
---|
| 27 | var header=divs[i]; |
---|
| 28 | var section=divs[i+1]; |
---|
| 29 | var button=header.firstChild; |
---|
| 30 | if (button!='IMG'){ |
---|
| 31 | divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); |
---|
| 32 | button=document.createElement('img'); |
---|
| 33 | divs[i].insertBefore(button,divs[i].firstChild); |
---|
| 34 | } |
---|
| 35 | header.style.cursor='pointer'; |
---|
| 36 | header.onclick=changeDisplayState; |
---|
| 37 | header.id='dynheader'+sectionCounter; |
---|
| 38 | button.src='closed.gif'; |
---|
| 39 | section.id='dynsection'+sectionCounter; |
---|
| 40 | section.style.display='none'; |
---|
| 41 | section.style.marginLeft='14px'; |
---|
| 42 | sectionCounter++; |
---|
| 43 | } |
---|
| 44 | } |
---|
| 45 | } |
---|
| 46 | window.onload = initDynSections; |
---|
| 47 | --> |
---|
| 48 | </script> |
---|
[259] | 49 | <div class="navigation" id="top"> |
---|
| 50 | <div class="tabs"> |
---|
| 51 | <ul> |
---|
[271] | 52 | <li><a href="main.html"><span>Main Page</span></a></li> |
---|
[259] | 53 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
[290] | 54 | <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
---|
[259] | 55 | <li><a href="files.html"><span>Files</span></a></li> |
---|
| 56 | </ul> |
---|
| 57 | </div> |
---|
| 58 | <div class="tabs"> |
---|
| 59 | <ul> |
---|
| 60 | <li><a href="annotated.html"><span>Class List</span></a></li> |
---|
[290] | 61 | <li><a href="classes.html"><span>Class Index</span></a></li> |
---|
[259] | 62 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
| 63 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
| 64 | </ul> |
---|
| 65 | </div> |
---|
[271] | 66 | <div class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1memlog.html">memlog</a> |
---|
[259] | 67 | </div> |
---|
| 68 | </div> |
---|
| 69 | <div class="contents"> |
---|
[538] | 70 | <h1>bdm::memlog Class Reference</h1><!-- doxytag: class="bdm::memlog" --><!-- doxytag: inherits="bdm::logger" --><code>#include <<a class="el" href="loggers_8h-source.html">loggers.h</a>></code> |
---|
[259] | 71 | <p> |
---|
| 72 | |
---|
| 73 | <p> |
---|
[290] | 74 | <a href="classbdm_1_1memlog-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
---|
[259] | 75 | <tr><td></td></tr> |
---|
| 76 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
---|
[353] | 77 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="611dda03b3050de2eaa448a59cee9c27"></a><!-- doxytag: member="bdm::memlog::memlog" ref="611dda03b3050de2eaa448a59cee9c27" args="(int maxlen0, string itf="")" --> |
---|
| 78 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1memlog.html#611dda03b3050de2eaa448a59cee9c27">memlog</a> (int maxlen0, string itf="")</td></tr> |
---|
[259] | 79 | |
---|
| 80 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr> |
---|
| 81 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d3a8b007f3540523ff3f9910d9089391"></a><!-- doxytag: member="bdm::memlog::init" ref="d3a8b007f3540523ff3f9910d9089391" args="()" --> |
---|
| 82 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1memlog.html#d3a8b007f3540523ff3f9910d9089391">init</a> ()</td></tr> |
---|
| 83 | |
---|
| 84 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize storage. <br></td></tr> |
---|
| 85 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="69964f0472e53098528ee41507bdfc77"></a><!-- doxytag: member="bdm::memlog::step" ref="69964f0472e53098528ee41507bdfc77" args="()" --> |
---|
| 86 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1memlog.html#69964f0472e53098528ee41507bdfc77">step</a> ()</td></tr> |
---|
| 87 | |
---|
| 88 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Shifts storage position for another time step. <br></td></tr> |
---|
| 89 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="364e58c5d7058776c2a9cfa7d58dad6d"></a><!-- doxytag: member="bdm::memlog::logit" ref="364e58c5d7058776c2a9cfa7d58dad6d" args="(int id, const vec &v)" --> |
---|
| 90 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1memlog.html#364e58c5d7058776c2a9cfa7d58dad6d">logit</a> (int id, const vec &v)</td></tr> |
---|
| 91 | |
---|
| 92 | <tr><td class="mdescLeft"> </td><td class="mdescRight">log this vector <br></td></tr> |
---|
[353] | 93 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2b57dbd3dff49a98c6ce8fccccb170af"></a><!-- doxytag: member="bdm::memlog::logit" ref="2b57dbd3dff49a98c6ce8fccccb170af" args="(int id, const double &d)" --> |
---|
| 94 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1memlog.html#2b57dbd3dff49a98c6ce8fccccb170af">logit</a> (int id, const double &d)</td></tr> |
---|
| 95 | |
---|
| 96 | <tr><td class="mdescLeft"> </td><td class="mdescRight">log this double <br></td></tr> |
---|
[259] | 97 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6a74b7a3d889607391594279112aef1f"></a><!-- doxytag: member="bdm::memlog::itsave" ref="6a74b7a3d889607391594279112aef1f" args="(const char *fname)" --> |
---|
| 98 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1memlog.html#6a74b7a3d889607391594279112aef1f">itsave</a> (const char *fname)</td></tr> |
---|
| 99 | |
---|
| 100 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Save values into an itfile named after <code>fname</code>. <br></td></tr> |
---|
[353] | 101 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="39e32f671414c71304e316976ccc37f3"></a><!-- doxytag: member="bdm::memlog::finalize" ref="39e32f671414c71304e316976ccc37f3" args="()" --> |
---|
| 102 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1memlog.html#39e32f671414c71304e316976ccc37f3">finalize</a> ()</td></tr> |
---|
[259] | 103 | |
---|
[353] | 104 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Finalize storing information. <br></td></tr> |
---|
[396] | 105 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1memlog.html#7352b474bc54c35ab7c9297c5b958629">from_setting</a> (const Setting &set)</td></tr> |
---|
[368] | 106 | |
---|
[472] | 107 | <tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classbdm_1_1UI.html" title="UI is an abstract class which collects all the auxiliary functions useful to prepare...">UI</a> for <a class="el" href="classbdm_1_1memlog.html">memlog</a>. <a href="#7352b474bc54c35ab7c9297c5b958629"></a><br></td></tr> |
---|
[353] | 108 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1logger.html#47aa3b098a81d02a8ffaea2c9fa09ac7">add</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &rv, string prefix="")</td></tr> |
---|
[259] | 109 | |
---|
[396] | 110 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af0e6941ba5919cae1bc530e2181b109"></a><!-- doxytag: member="bdm::memlog::to_string" ref="af0e6941ba5919cae1bc530e2181b109" args="()" --> |
---|
| 111 | virtual string </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#af0e6941ba5919cae1bc530e2181b109">to_string</a> ()</td></tr> |
---|
[353] | 112 | |
---|
| 113 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method returns a basic info about the current instance. <br></td></tr> |
---|
[396] | 114 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="67d954d255ede776eade7334d4895790"></a><!-- doxytag: member="bdm::memlog::to_setting" ref="67d954d255ede776eade7334d4895790" args="(Setting &set) const " --> |
---|
| 115 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#67d954d255ede776eade7334d4895790">to_setting</a> (Setting &set) const </td></tr> |
---|
[353] | 116 | |
---|
| 117 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method save all the instance properties into the Setting structure. <br></td></tr> |
---|
[396] | 118 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1c314bd6d6dacb8ba78ea5eb88fd9516"></a><!-- doxytag: member="bdm::memlog::validate" ref="1c314bd6d6dacb8ba78ea5eb88fd9516" args="()" --> |
---|
| 119 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#1c314bd6d6dacb8ba78ea5eb88fd9516">validate</a> ()</td></tr> |
---|
[368] | 120 | |
---|
| 121 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method TODO. <br></td></tr> |
---|
[259] | 122 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> |
---|
| 123 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a690ebd91430b5973855c9b4c9cf1b1d"></a><!-- doxytag: member="bdm::memlog::maxlen" ref="a690ebd91430b5973855c9b4c9cf1b1d" args="" --> |
---|
| 124 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1memlog.html#a690ebd91430b5973855c9b4c9cf1b1d">maxlen</a></td></tr> |
---|
| 125 | |
---|
| 126 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Maximum length of vectors stored in memory. <br></td></tr> |
---|
| 127 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="70cec1d3549a82796ad7b6f0d07a4570"></a><!-- doxytag: member="bdm::memlog::ind" ref="70cec1d3549a82796ad7b6f0d07a4570" args="" --> |
---|
| 128 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1memlog.html#70cec1d3549a82796ad7b6f0d07a4570">ind</a></td></tr> |
---|
| 129 | |
---|
| 130 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Currect record to be written. <br></td></tr> |
---|
| 131 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1fed143162f2de6ef1c1b6557964f24e"></a><!-- doxytag: member="bdm::memlog::vectors" ref="1fed143162f2de6ef1c1b6557964f24e" args="" --> |
---|
[354] | 132 | Array< mat > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e">vectors</a></td></tr> |
---|
[259] | 133 | |
---|
| 134 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Storage. <br></td></tr> |
---|
[353] | 135 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="11fdf8ffca0f509ff637b0c3ac161c1f"></a><!-- doxytag: member="bdm::memlog::itfilename" ref="11fdf8ffca0f509ff637b0c3ac161c1f" args="" --> |
---|
| 136 | string </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1memlog.html#11fdf8ffca0f509ff637b0c3ac161c1f">itfilename</a></td></tr> |
---|
| 137 | |
---|
| 138 | <tr><td class="mdescLeft"> </td><td class="mdescRight">name of it file to save results <br></td></tr> |
---|
[259] | 139 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c54566a4554089443a20b2a49ed1a61f"></a><!-- doxytag: member="bdm::memlog::entries" ref="c54566a4554089443a20b2a49ed1a61f" args="" --> |
---|
[354] | 140 | Array< <a class="el" href="classbdm_1_1RV.html">RV</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1logger.html#c54566a4554089443a20b2a49ed1a61f">entries</a></td></tr> |
---|
[259] | 141 | |
---|
| 142 | <tr><td class="mdescLeft"> </td><td class="mdescRight">RVs of all logged variables. <br></td></tr> |
---|
| 143 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="68ca1f05cf3d414ba0f39211977b8d02"></a><!-- doxytag: member="bdm::memlog::names" ref="68ca1f05cf3d414ba0f39211977b8d02" args="" --> |
---|
[354] | 144 | Array< string > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1logger.html#68ca1f05cf3d414ba0f39211977b8d02">names</a></td></tr> |
---|
[259] | 145 | |
---|
| 146 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Names of logged quantities, e.g. names of algorithm variants. <br></td></tr> |
---|
| 147 | </table> |
---|
[290] | 148 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
[472] | 149 | Logging into matrices in data format in memory, optionally persisted into a file. <hr><h2>Member Function Documentation</h2> |
---|
[353] | 150 | <a class="anchor" name="47aa3b098a81d02a8ffaea2c9fa09ac7"></a><!-- doxytag: member="bdm::memlog::add" ref="47aa3b098a81d02a8ffaea2c9fa09ac7" args="(const RV &rv, string prefix="")" --> |
---|
[271] | 151 | <div class="memitem"> |
---|
| 152 | <div class="memproto"> |
---|
| 153 | <table class="memname"> |
---|
| 154 | <tr> |
---|
| 155 | <td class="memname">virtual int bdm::logger::add </td> |
---|
| 156 | <td>(</td> |
---|
| 157 | <td class="paramtype">const <a class="el" href="classbdm_1_1RV.html">RV</a> & </td> |
---|
| 158 | <td class="paramname"> <em>rv</em>, </td> |
---|
| 159 | </tr> |
---|
| 160 | <tr> |
---|
| 161 | <td class="paramkey"></td> |
---|
| 162 | <td></td> |
---|
| 163 | <td class="paramtype">string </td> |
---|
[353] | 164 | <td class="paramname"> <em>prefix</em> = <code>""</code></td><td> </td> |
---|
[271] | 165 | </tr> |
---|
| 166 | <tr> |
---|
| 167 | <td></td> |
---|
| 168 | <td>)</td> |
---|
| 169 | <td></td><td></td><td><code> [inline, virtual, inherited]</code></td> |
---|
| 170 | </tr> |
---|
| 171 | </table> |
---|
| 172 | </div> |
---|
| 173 | <div class="memdoc"> |
---|
| 174 | |
---|
| 175 | <p> |
---|
| 176 | returns an identifier which will be later needed for calling the <code><a class="el" href="classbdm_1_1logger.html#397c014b0aaf3581516e2a105d26a5c9" title="log this vector">logit()</a></code> function For empty <a class="el" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> it returns -1, this entry will be ignored by <code><a class="el" href="classbdm_1_1logger.html#397c014b0aaf3581516e2a105d26a5c9" title="log this vector">logit()</a></code>. |
---|
[538] | 177 | <p>References <a class="el" href="bdmbase_8h-source.html#l00676">bdm::logger::entries</a>, and <a class="el" href="bdmbase_8h-source.html#l00678">bdm::logger::names</a>.</p> |
---|
[271] | 178 | |
---|
[538] | 179 | <p>Referenced by <a class="el" href="datasources_8h-source.html#l00199">bdm::ArxDS::log_add()</a>, <a class="el" href="bdmbase_8h-source.html#l00967">bdm::BM::log_add()</a>, and <a class="el" href="bdmbase_8h-source.html#l00792">bdm::DS::log_add()</a>.</p> |
---|
[397] | 180 | |
---|
[271] | 181 | </div> |
---|
| 182 | </div><p> |
---|
[396] | 183 | <a class="anchor" name="7352b474bc54c35ab7c9297c5b958629"></a><!-- doxytag: member="bdm::memlog::from_setting" ref="7352b474bc54c35ab7c9297c5b958629" args="(const Setting &set)" --> |
---|
[368] | 184 | <div class="memitem"> |
---|
| 185 | <div class="memproto"> |
---|
| 186 | <table class="memname"> |
---|
| 187 | <tr> |
---|
| 188 | <td class="memname">void bdm::memlog::from_setting </td> |
---|
| 189 | <td>(</td> |
---|
| 190 | <td class="paramtype">const Setting & </td> |
---|
[396] | 191 | <td class="paramname"> <em>set</em> </td> |
---|
[368] | 192 | <td> ) </td> |
---|
| 193 | <td><code> [virtual]</code></td> |
---|
| 194 | </tr> |
---|
| 195 | </table> |
---|
| 196 | </div> |
---|
| 197 | <div class="memdoc"> |
---|
| 198 | |
---|
| 199 | <p> |
---|
[472] | 200 | <a class="el" href="classbdm_1_1UI.html" title="UI is an abstract class which collects all the auxiliary functions useful to prepare...">UI</a> for <a class="el" href="classbdm_1_1memlog.html">memlog</a>. |
---|
[368] | 201 | <p> |
---|
| 202 | TODO dat tam kam patri, a to celej blok<p> |
---|
| 203 | <div class="fragment"><pre class="fragment"> <a class="code" href="classbdm_1_1logger.html#f9c2fe7db5ddbda0098a4a5bd2c29fbf" title="Default constructor.">logger</a> = { |
---|
[472] | 204 | <span class="keyword">class </span>= "<a class="code" href="classbdm_1_1memlog.html#611dda03b3050de2eaa448a59cee9c27" title="Default constructor.">memlog</a>"; |
---|
[368] | 205 | filename = <span class="stringliteral">"file_name.it"</span>; <span class="comment">// resulting filename with results in it format</span> |
---|
| 206 | <a class="code" href="classbdm_1_1memlog.html#a690ebd91430b5973855c9b4c9cf1b1d" title="Maximum length of vectors stored in memory.">maxlen</a> = 100; <span class="comment">// size of memory buffer</span> |
---|
| 207 | } |
---|
| 208 | </pre></div> |
---|
[396] | 209 | <p>Reimplemented from <a class="el" href="classbdm_1_1root.html#0551e3121091c5199bf4413b50522176">bdm::root</a>.</p> |
---|
[368] | 210 | |
---|
[538] | 211 | <p>Reimplemented in <a class="el" href="classbdm_1_1dirfilelog.html#a32de0f314a30392d69f07458643514e">bdm::dirfilelog</a>, and <a class="el" href="classbdm_1_1mexlog.html#39c44b30f201091ab3d287fe5741113e">bdm::mexlog</a>.</p> |
---|
[368] | 212 | |
---|
[538] | 213 | <p>References <a class="el" href="loggers_8h-source.html#l00035">itfilename</a>, and <a class="el" href="loggers_8h-source.html#l00029">maxlen</a>.</p> |
---|
[368] | 214 | |
---|
| 215 | </div> |
---|
| 216 | </div><p> |
---|
[270] | 217 | <hr>The documentation for this class was generated from the following files:<ul> |
---|
[538] | 218 | <li><a class="el" href="loggers_8h-source.html">loggers.h</a><li>loggers.cpp</ul> |
---|
[259] | 219 | </div> |
---|
[538] | 220 | <hr size="1"><address style="text-align: right;"><small>Generated on Sun Aug 16 17:58:19 2009 for mixpp by |
---|
[259] | 221 | <a href="http://www.doxygen.org/index.html"> |
---|
[538] | 222 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
[259] | 223 | </body> |
---|
| 224 | </html> |
---|