[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::dirfilelog Class Reference</title> |
---|
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
| 5 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
| 6 | </head><body> |
---|
| 7 | <!-- Generated by Doxygen 1.5.6 --> |
---|
[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> |
---|
| 54 | <li><a href="modules.html"><span>Modules</span></a></li> |
---|
[261] | 55 | <li class="current"><a href="classes.html"><span>Classes</span></a></li> |
---|
[259] | 56 | <li><a href="files.html"><span>Files</span></a></li> |
---|
| 57 | </ul> |
---|
| 58 | </div> |
---|
| 59 | <div class="tabs"> |
---|
| 60 | <ul> |
---|
[261] | 61 | <li><a href="classes.html"><span>Alphabetical List</span></a></li> |
---|
[259] | 62 | <li><a href="annotated.html"><span>Class List</span></a></li> |
---|
| 63 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
| 64 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
| 65 | </ul> |
---|
| 66 | </div> |
---|
[271] | 67 | <div class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1dirfilelog.html">dirfilelog</a> |
---|
[259] | 68 | </div> |
---|
| 69 | </div> |
---|
| 70 | <div class="contents"> |
---|
[270] | 71 | <h1>bdm::dirfilelog Class Reference</h1><!-- doxytag: class="bdm::dirfilelog" --><!-- doxytag: inherits="bdm::memlog" --><code>#include <<a class="el" href="loggers_8h-source.html">loggers.h</a>></code> |
---|
[259] | 72 | <p> |
---|
| 73 | <div class="dynheader"> |
---|
| 74 | Inheritance diagram for bdm::dirfilelog:</div> |
---|
| 75 | <div class="dynsection"> |
---|
| 76 | |
---|
[271] | 77 | <p><center><img src="classbdm_1_1dirfilelog.png" usemap="#bdm::dirfilelog_map" border="0" alt=""></center> |
---|
| 78 | <map name="bdm::dirfilelog_map"> |
---|
| 79 | <area href="classbdm_1_1memlog.html" alt="bdm::memlog" shape="rect" coords="0,112,90,136"> |
---|
| 80 | <area href="classbdm_1_1logger.html" alt="bdm::logger" shape="rect" coords="0,56,90,80"> |
---|
| 81 | <area href="classbdm_1_1bdmroot.html" alt="bdm::bdmroot" shape="rect" coords="0,0,90,24"> |
---|
| 82 | </map> |
---|
| 83 | </div> |
---|
| 84 | |
---|
[259] | 85 | <p> |
---|
[270] | 86 | <a href="classbdm_1_1dirfilelog-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
| 87 | Logging into dirfile with buffer in memory. |
---|
| 88 | <p> |
---|
| 89 | Dirfile is a special format used by the kst program. See documentation of kst for description.<p> |
---|
| 90 | This format is used to store scalars, hence multivariate RVs must be separated. <table border="0" cellpadding="0" cellspacing="0"> |
---|
[259] | 91 | <tr><td></td></tr> |
---|
| 92 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
---|
| 93 | <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1dirfilelog.html#534cdc903068764f1f243ae8fc0316a3">dirfilelog</a> (std::string dirname0, int maxlen0)</td></tr> |
---|
| 94 | |
---|
| 95 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#534cdc903068764f1f243ae8fc0316a3"></a><br></td></tr> |
---|
| 96 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="78a3bd8a83cbd6299e279544bc81493d"></a><!-- doxytag: member="bdm::dirfilelog::init" ref="78a3bd8a83cbd6299e279544bc81493d" args="()" --> |
---|
| 97 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1dirfilelog.html#78a3bd8a83cbd6299e279544bc81493d">init</a> ()</td></tr> |
---|
| 98 | |
---|
| 99 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize storage. <br></td></tr> |
---|
| 100 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f79660645d09aa2d8bdd18923a721662"></a><!-- doxytag: member="bdm::dirfilelog::step" ref="f79660645d09aa2d8bdd18923a721662" args="()" --> |
---|
| 101 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1dirfilelog.html#f79660645d09aa2d8bdd18923a721662">step</a> ()</td></tr> |
---|
| 102 | |
---|
| 103 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Shifts storage position for another time step. <br></td></tr> |
---|
| 104 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="521d7ba159f97a0182392df27953804f"></a><!-- doxytag: member="bdm::dirfilelog::finalize" ref="521d7ba159f97a0182392df27953804f" args="()" --> |
---|
| 105 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1dirfilelog.html#521d7ba159f97a0182392df27953804f">finalize</a> ()</td></tr> |
---|
| 106 | |
---|
| 107 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Finalize storing information. <br></td></tr> |
---|
| 108 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1dirfilelog.html#f595c0df25f5fa5d8c27ea1e375d9c51">write_buffers</a> (int Len)</td></tr> |
---|
| 109 | |
---|
| 110 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Write memory storage to disk. <a href="#f595c0df25f5fa5d8c27ea1e375d9c51"></a><br></td></tr> |
---|
| 111 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="364e58c5d7058776c2a9cfa7d58dad6d"></a><!-- doxytag: member="bdm::dirfilelog::logit" ref="364e58c5d7058776c2a9cfa7d58dad6d" args="(int id, const vec &v)" --> |
---|
| 112 | 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> |
---|
| 113 | |
---|
| 114 | <tr><td class="mdescLeft"> </td><td class="mdescRight">log this vector <br></td></tr> |
---|
| 115 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6a74b7a3d889607391594279112aef1f"></a><!-- doxytag: member="bdm::dirfilelog::itsave" ref="6a74b7a3d889607391594279112aef1f" args="(const char *fname)" --> |
---|
| 116 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1memlog.html#6a74b7a3d889607391594279112aef1f">itsave</a> (const char *fname)</td></tr> |
---|
| 117 | |
---|
| 118 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Save values into an itfile named after <code>fname</code>. <br></td></tr> |
---|
[271] | 119 | <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#cfb4807e20b3d00f3d33e55ada528dc1">add</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &rv, string name="")</td></tr> |
---|
[259] | 120 | |
---|
| 121 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> |
---|
| 122 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="985eb02770f01e25cdceff32ff53a9c5"></a><!-- doxytag: member="bdm::dirfilelog::dirname" ref="985eb02770f01e25cdceff32ff53a9c5" args="" --> |
---|
| 123 | string </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1dirfilelog.html#985eb02770f01e25cdceff32ff53a9c5">dirname</a></td></tr> |
---|
| 124 | |
---|
| 125 | <tr><td class="mdescLeft"> </td><td class="mdescRight">name of the directory <br></td></tr> |
---|
| 126 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7805040fe1ffa2a048c33980bc995793"></a><!-- doxytag: member="bdm::dirfilelog::scalarnames" ref="7805040fe1ffa2a048c33980bc995793" args="" --> |
---|
| 127 | Array< string > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1dirfilelog.html#7805040fe1ffa2a048c33980bc995793">scalarnames</a></td></tr> |
---|
| 128 | |
---|
| 129 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Automatically generated. <br></td></tr> |
---|
| 130 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a690ebd91430b5973855c9b4c9cf1b1d"></a><!-- doxytag: member="bdm::dirfilelog::maxlen" ref="a690ebd91430b5973855c9b4c9cf1b1d" args="" --> |
---|
| 131 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1memlog.html#a690ebd91430b5973855c9b4c9cf1b1d">maxlen</a></td></tr> |
---|
| 132 | |
---|
| 133 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Maximum length of vectors stored in memory. <br></td></tr> |
---|
| 134 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="70cec1d3549a82796ad7b6f0d07a4570"></a><!-- doxytag: member="bdm::dirfilelog::ind" ref="70cec1d3549a82796ad7b6f0d07a4570" args="" --> |
---|
| 135 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1memlog.html#70cec1d3549a82796ad7b6f0d07a4570">ind</a></td></tr> |
---|
| 136 | |
---|
| 137 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Currect record to be written. <br></td></tr> |
---|
| 138 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1fed143162f2de6ef1c1b6557964f24e"></a><!-- doxytag: member="bdm::dirfilelog::vectors" ref="1fed143162f2de6ef1c1b6557964f24e" args="" --> |
---|
| 139 | Array< mat > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e">vectors</a></td></tr> |
---|
| 140 | |
---|
| 141 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Storage. <br></td></tr> |
---|
| 142 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c54566a4554089443a20b2a49ed1a61f"></a><!-- doxytag: member="bdm::dirfilelog::entries" ref="c54566a4554089443a20b2a49ed1a61f" args="" --> |
---|
| 143 | 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> |
---|
| 144 | |
---|
| 145 | <tr><td class="mdescLeft"> </td><td class="mdescRight">RVs of all logged variables. <br></td></tr> |
---|
| 146 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="68ca1f05cf3d414ba0f39211977b8d02"></a><!-- doxytag: member="bdm::dirfilelog::names" ref="68ca1f05cf3d414ba0f39211977b8d02" args="" --> |
---|
| 147 | Array< string > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1logger.html#68ca1f05cf3d414ba0f39211977b8d02">names</a></td></tr> |
---|
| 148 | |
---|
| 149 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Names of logged quantities, e.g. names of algorithm variants. <br></td></tr> |
---|
| 150 | </table> |
---|
[270] | 151 | <hr><h2>Constructor & Destructor Documentation</h2> |
---|
[259] | 152 | <a class="anchor" name="534cdc903068764f1f243ae8fc0316a3"></a><!-- doxytag: member="bdm::dirfilelog::dirfilelog" ref="534cdc903068764f1f243ae8fc0316a3" args="(std::string dirname0, int maxlen0)" --> |
---|
| 153 | <div class="memitem"> |
---|
| 154 | <div class="memproto"> |
---|
| 155 | <table class="memname"> |
---|
| 156 | <tr> |
---|
| 157 | <td class="memname">bdm::dirfilelog::dirfilelog </td> |
---|
| 158 | <td>(</td> |
---|
| 159 | <td class="paramtype">std::string </td> |
---|
| 160 | <td class="paramname"> <em>dirname0</em>, </td> |
---|
| 161 | </tr> |
---|
| 162 | <tr> |
---|
| 163 | <td class="paramkey"></td> |
---|
| 164 | <td></td> |
---|
| 165 | <td class="paramtype">int </td> |
---|
| 166 | <td class="paramname"> <em>maxlen0</em></td><td> </td> |
---|
| 167 | </tr> |
---|
| 168 | <tr> |
---|
| 169 | <td></td> |
---|
| 170 | <td>)</td> |
---|
| 171 | <td></td><td></td><td><code> [inline]</code></td> |
---|
| 172 | </tr> |
---|
| 173 | </table> |
---|
| 174 | </div> |
---|
| 175 | <div class="memdoc"> |
---|
| 176 | |
---|
| 177 | <p> |
---|
| 178 | Default constructor. |
---|
| 179 | <p> |
---|
| 180 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
| 181 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
| 182 | <tr><td valign="top"></td><td valign="top"><em>dirname0</em> </td><td>name of the directory in which to store the results </td></tr> |
---|
| 183 | <tr><td valign="top"></td><td valign="top"><em>maxlen0</em> </td><td>length of the memory buffers, when full the buffers will be dumped to HDD and returned to the beginning. </td></tr> |
---|
| 184 | </table> |
---|
| 185 | </dl> |
---|
| 186 | |
---|
| 187 | </div> |
---|
| 188 | </div><p> |
---|
| 189 | <hr><h2>Member Function Documentation</h2> |
---|
| 190 | <a class="anchor" name="f595c0df25f5fa5d8c27ea1e375d9c51"></a><!-- doxytag: member="bdm::dirfilelog::write_buffers" ref="f595c0df25f5fa5d8c27ea1e375d9c51" args="(int Len)" --> |
---|
| 191 | <div class="memitem"> |
---|
| 192 | <div class="memproto"> |
---|
| 193 | <table class="memname"> |
---|
| 194 | <tr> |
---|
| 195 | <td class="memname">void bdm::dirfilelog::write_buffers </td> |
---|
| 196 | <td>(</td> |
---|
| 197 | <td class="paramtype">int </td> |
---|
| 198 | <td class="paramname"> <em>Len</em> </td> |
---|
| 199 | <td> ) </td> |
---|
| 200 | <td></td> |
---|
| 201 | </tr> |
---|
| 202 | </table> |
---|
| 203 | </div> |
---|
| 204 | <div class="memdoc"> |
---|
| 205 | |
---|
| 206 | <p> |
---|
| 207 | Write memory storage to disk. |
---|
| 208 | <p> |
---|
| 209 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
| 210 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
| 211 | <tr><td valign="top"></td><td valign="top"><em>Len</em> </td><td>length of buffer to be written, if 0 the file is truncated at 0. </td></tr> |
---|
| 212 | </table> |
---|
| 213 | </dl> |
---|
| 214 | |
---|
[271] | 215 | <p>References <a class="el" href="loggers_8h-source.html#l00068">dirname</a>, <a class="el" href="libBM_8h-source.html#l00476">bdm::logger::entries</a>, <a class="el" href="loggers_8h-source.html#l00031">bdm::memlog::maxlen</a>, <a class="el" href="loggers_8h-source.html#l00070">scalarnames</a>, and <a class="el" href="loggers_8h-source.html#l00035">bdm::memlog::vectors</a>.</p> |
---|
[259] | 216 | |
---|
| 217 | <p>Referenced by <a class="el" href="loggers_8cpp-source.html#l00134">finalize()</a>, <a class="el" href="loggers_8cpp-source.html#l00026">init()</a>, and <a class="el" href="loggers_8cpp-source.html#l00123">step()</a>.</p> |
---|
| 218 | |
---|
| 219 | </div> |
---|
| 220 | </div><p> |
---|
[271] | 221 | <a class="anchor" name="cfb4807e20b3d00f3d33e55ada528dc1"></a><!-- doxytag: member="bdm::dirfilelog::add" ref="cfb4807e20b3d00f3d33e55ada528dc1" args="(const RV &rv, string name="")" --> |
---|
| 222 | <div class="memitem"> |
---|
| 223 | <div class="memproto"> |
---|
| 224 | <table class="memname"> |
---|
| 225 | <tr> |
---|
| 226 | <td class="memname">virtual int bdm::logger::add </td> |
---|
| 227 | <td>(</td> |
---|
| 228 | <td class="paramtype">const <a class="el" href="classbdm_1_1RV.html">RV</a> & </td> |
---|
| 229 | <td class="paramname"> <em>rv</em>, </td> |
---|
| 230 | </tr> |
---|
| 231 | <tr> |
---|
| 232 | <td class="paramkey"></td> |
---|
| 233 | <td></td> |
---|
| 234 | <td class="paramtype">string </td> |
---|
| 235 | <td class="paramname"> <em>name</em> = <code>""</code></td><td> </td> |
---|
| 236 | </tr> |
---|
| 237 | <tr> |
---|
| 238 | <td></td> |
---|
| 239 | <td>)</td> |
---|
| 240 | <td></td><td></td><td><code> [inline, virtual, inherited]</code></td> |
---|
| 241 | </tr> |
---|
| 242 | </table> |
---|
| 243 | </div> |
---|
| 244 | <div class="memdoc"> |
---|
| 245 | |
---|
| 246 | <p> |
---|
| 247 | 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>. |
---|
| 248 | <p>References <a class="el" href="libBM_8h-source.html#l00476">bdm::logger::entries</a>, and <a class="el" href="libBM_8h-source.html#l00478">bdm::logger::names</a>.</p> |
---|
| 249 | |
---|
| 250 | <p>Referenced by <a class="el" href="libDS_8h-source.html#l00121">bdm::ArxDS::log_add()</a>, and <a class="el" href="libBM_8h-source.html#l00570">bdm::DS::log_add()</a>.</p> |
---|
| 251 | |
---|
| 252 | </div> |
---|
| 253 | </div><p> |
---|
[259] | 254 | <hr>The documentation for this class was generated from the following files:<ul> |
---|
[261] | 255 | <li><a class="el" href="loggers_8h-source.html">loggers.h</a><li>loggers.cpp</ul> |
---|
[259] | 256 | </div> |
---|
[275] | 257 | <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 16 10:06:49 2009 for mixpp by |
---|
[259] | 258 | <a href="http://www.doxygen.org/index.html"> |
---|
| 259 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> |
---|
| 260 | </body> |
---|
| 261 | </html> |
---|