| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | 
|---|
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | 
|---|
| 3 | <head> | 
|---|
| 4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> | 
|---|
| 5 | <title>mixpp: bdm::logger Class Reference</title> | 
|---|
| 6 | <link href="tabs.css" rel="stylesheet" type="text/css"/> | 
|---|
| 7 | <link href="doxygen.css" rel="stylesheet" type="text/css"/> | 
|---|
| 8 | </head> | 
|---|
| 9 | <body> | 
|---|
| 10 | <!-- Generated by Doxygen 1.6.1 --> | 
|---|
| 11 | <script type="text/javascript"> | 
|---|
| 12 | <!-- | 
|---|
| 13 | function changeDisplayState (e){ | 
|---|
| 14 |   var num=this.id.replace(/[^[0-9]/g,''); | 
|---|
| 15 |   var button=this.firstChild; | 
|---|
| 16 |   var sectionDiv=document.getElementById('dynsection'+num); | 
|---|
| 17 |   if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ | 
|---|
| 18 |     sectionDiv.style.display='block'; | 
|---|
| 19 |     button.src='open.gif'; | 
|---|
| 20 |   }else{ | 
|---|
| 21 |     sectionDiv.style.display='none'; | 
|---|
| 22 |     button.src='closed.gif'; | 
|---|
| 23 |   } | 
|---|
| 24 | } | 
|---|
| 25 | function initDynSections(){ | 
|---|
| 26 |   var divs=document.getElementsByTagName('div'); | 
|---|
| 27 |   var sectionCounter=1; | 
|---|
| 28 |   for(var i=0;i<divs.length-1;i++){ | 
|---|
| 29 |     if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ | 
|---|
| 30 |       var header=divs[i]; | 
|---|
| 31 |       var section=divs[i+1]; | 
|---|
| 32 |       var button=header.firstChild; | 
|---|
| 33 |       if (button!='IMG'){ | 
|---|
| 34 |         divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); | 
|---|
| 35 |         button=document.createElement('img'); | 
|---|
| 36 |         divs[i].insertBefore(button,divs[i].firstChild); | 
|---|
| 37 |       } | 
|---|
| 38 |       header.style.cursor='pointer'; | 
|---|
| 39 |       header.onclick=changeDisplayState; | 
|---|
| 40 |       header.id='dynheader'+sectionCounter; | 
|---|
| 41 |       button.src='closed.gif'; | 
|---|
| 42 |       section.id='dynsection'+sectionCounter; | 
|---|
| 43 |       section.style.display='none'; | 
|---|
| 44 |       section.style.marginLeft='14px'; | 
|---|
| 45 |       sectionCounter++; | 
|---|
| 46 |     } | 
|---|
| 47 |   } | 
|---|
| 48 | } | 
|---|
| 49 | window.onload = initDynSections; | 
|---|
| 50 | --> | 
|---|
| 51 | </script> | 
|---|
| 52 | <div class="navigation" id="top"> | 
|---|
| 53 |   <div class="tabs"> | 
|---|
| 54 |     <ul> | 
|---|
| 55 |       <li><a href="main.html"><span>Main Page</span></a></li> | 
|---|
| 56 |       <li><a href="pages.html"><span>Related Pages</span></a></li> | 
|---|
| 57 |       <li class="current"><a href="annotated.html"><span>Classes</span></a></li> | 
|---|
| 58 |       <li><a href="files.html"><span>Files</span></a></li> | 
|---|
| 59 |     </ul> | 
|---|
| 60 |   </div> | 
|---|
| 61 |   <div class="tabs"> | 
|---|
| 62 |     <ul> | 
|---|
| 63 |       <li><a href="annotated.html"><span>Class List</span></a></li> | 
|---|
| 64 |       <li><a href="classes.html"><span>Class Index</span></a></li> | 
|---|
| 65 |       <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> | 
|---|
| 66 |       <li><a href="functions.html"><span>Class Members</span></a></li> | 
|---|
| 67 |     </ul> | 
|---|
| 68 |   </div> | 
|---|
| 69 |   <div class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1logger.html">logger</a> | 
|---|
| 70 |   </div> | 
|---|
| 71 | </div> | 
|---|
| 72 | <div class="contents"> | 
|---|
| 73 | <h1>bdm::logger Class Reference</h1><!-- doxytag: class="bdm::logger" --><!-- doxytag: inherits="bdm::root" --> | 
|---|
| 74 | <p>Class for storing results (and semi-results) of an experiment.   | 
|---|
| 75 | <a href="#_details">More...</a></p> | 
|---|
| 76 |  | 
|---|
| 77 | <p><code>#include <<a class="el" href="bdmbase_8h_source.html">bdmbase.h</a>></code></p> | 
|---|
| 78 |  | 
|---|
| 79 | <p><a href="classbdm_1_1logger-members.html">List of all members.</a></p> | 
|---|
| 80 | <table border="0" cellpadding="0" cellspacing="0"> | 
|---|
| 81 | <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> | 
|---|
| 82 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af9c2fe7db5ddbda0098a4a5bd2c29fbf"></a><!-- doxytag: member="bdm::logger::logger" ref="af9c2fe7db5ddbda0098a4a5bd2c29fbf" args="()" --> | 
|---|
| 83 |  </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1logger.html#af9c2fe7db5ddbda0098a4a5bd2c29fbf">logger</a> ()</td></tr> | 
|---|
| 84 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br/></td></tr> | 
|---|
| 85 | <tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1logger.html#a47aa3b098a81d02a8ffaea2c9fa09ac7">add</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &rv, string prefix="")</td></tr> | 
|---|
| 86 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae30f695619931b3c372ab280e452d309"></a><!-- doxytag: member="bdm::logger::logit" ref="ae30f695619931b3c372ab280e452d309" args="(int id, const vec &v)" --> | 
|---|
| 87 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1logger.html#ae30f695619931b3c372ab280e452d309">logit</a> (int id, const vec &v)</td></tr> | 
|---|
| 88 | <tr><td class="mdescLeft"> </td><td class="mdescRight">log this vector <br/></td></tr> | 
|---|
| 89 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaa1d72cd3d2ff6bbf87340154af02ea6"></a><!-- doxytag: member="bdm::logger::logit" ref="aaa1d72cd3d2ff6bbf87340154af02ea6" args="(int id, const double &d)" --> | 
|---|
| 90 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1logger.html#aaa1d72cd3d2ff6bbf87340154af02ea6">logit</a> (int id, const double &d)</td></tr> | 
|---|
| 91 | <tr><td class="mdescLeft"> </td><td class="mdescRight">log this double <br/></td></tr> | 
|---|
| 92 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af137e9a0c905357c5c3fbb16eac34a99"></a><!-- doxytag: member="bdm::logger::step" ref="af137e9a0c905357c5c3fbb16eac34a99" args="()" --> | 
|---|
| 93 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1logger.html#af137e9a0c905357c5c3fbb16eac34a99">step</a> ()</td></tr> | 
|---|
| 94 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Shifts storage position for another time step. <br/></td></tr> | 
|---|
| 95 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0e3fc7d13e23a8f71fc7c8a5ea68559d"></a><!-- doxytag: member="bdm::logger::finalize" ref="a0e3fc7d13e23a8f71fc7c8a5ea68559d" args="()" --> | 
|---|
| 96 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1logger.html#a0e3fc7d13e23a8f71fc7c8a5ea68559d">finalize</a> ()</td></tr> | 
|---|
| 97 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Finalize storing information. <br/></td></tr> | 
|---|
| 98 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acd6291a73491f755dc7bc88d022eb2fc"></a><!-- doxytag: member="bdm::logger::init" ref="acd6291a73491f755dc7bc88d022eb2fc" args="()" --> | 
|---|
| 99 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1logger.html#acd6291a73491f755dc7bc88d022eb2fc">init</a> ()</td></tr> | 
|---|
| 100 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize the storage. <br/></td></tr> | 
|---|
| 101 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaf0e6941ba5919cae1bc530e2181b109"></a><!-- doxytag: member="bdm::logger::to_string" ref="aaf0e6941ba5919cae1bc530e2181b109" args="()" --> | 
|---|
| 102 | virtual string </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#aaf0e6941ba5919cae1bc530e2181b109">to_string</a> ()</td></tr> | 
|---|
| 103 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method returns a basic info about the current instance. <br/></td></tr> | 
|---|
| 104 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0551e3121091c5199bf4413b50522176"></a><!-- doxytag: member="bdm::logger::from_setting" ref="a0551e3121091c5199bf4413b50522176" args="(const Setting &set)" --> | 
|---|
| 105 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#a0551e3121091c5199bf4413b50522176">from_setting</a> (const Setting &set)</td></tr> | 
|---|
| 106 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method arrange instance properties according the data stored in the Setting structure. <br/></td></tr> | 
|---|
| 107 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a67d954d255ede776eade7334d4895790"></a><!-- doxytag: member="bdm::logger::to_setting" ref="a67d954d255ede776eade7334d4895790" args="(Setting &set) const " --> | 
|---|
| 108 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#a67d954d255ede776eade7334d4895790">to_setting</a> (Setting &set) const </td></tr> | 
|---|
| 109 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method save all the instance properties into the Setting structure. <br/></td></tr> | 
|---|
| 110 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1c314bd6d6dacb8ba78ea5eb88fd9516"></a><!-- doxytag: member="bdm::logger::validate" ref="a1c314bd6d6dacb8ba78ea5eb88fd9516" args="()" --> | 
|---|
| 111 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#a1c314bd6d6dacb8ba78ea5eb88fd9516">validate</a> ()</td></tr> | 
|---|
| 112 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method TODO. <br/></td></tr> | 
|---|
| 113 | <tr><td colspan="2"><h2>Protected Attributes</h2></td></tr> | 
|---|
| 114 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac54566a4554089443a20b2a49ed1a61f"></a><!-- doxytag: member="bdm::logger::entries" ref="ac54566a4554089443a20b2a49ed1a61f" args="" --> | 
|---|
| 115 | 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#ac54566a4554089443a20b2a49ed1a61f">entries</a></td></tr> | 
|---|
| 116 | <tr><td class="mdescLeft"> </td><td class="mdescRight">RVs of all logged variables. <br/></td></tr> | 
|---|
| 117 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a68ca1f05cf3d414ba0f39211977b8d02"></a><!-- doxytag: member="bdm::logger::names" ref="a68ca1f05cf3d414ba0f39211977b8d02" args="" --> | 
|---|
| 118 | Array< string > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1logger.html#a68ca1f05cf3d414ba0f39211977b8d02">names</a></td></tr> | 
|---|
| 119 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Names of logged quantities, e.g. names of algorithm variants. <br/></td></tr> | 
|---|
| 120 | </table> | 
|---|
| 121 | <hr/><a name="_details"></a><h2>Detailed Description</h2> | 
|---|
| 122 | <p>Class for storing results (and semi-results) of an experiment. </p> | 
|---|
| 123 | <p>This class abstracts logging of results from implementation. This class replaces direct logging of results (e.g. to files or to global variables) by calling methods of a <a class="el" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a>. Specializations of this abstract class for specific storage method are designed. </p> | 
|---|
| 124 | <hr/><h2>Member Function Documentation</h2> | 
|---|
| 125 | <a class="anchor" id="a47aa3b098a81d02a8ffaea2c9fa09ac7"></a><!-- doxytag: member="bdm::logger::add" ref="a47aa3b098a81d02a8ffaea2c9fa09ac7" args="(const RV &rv, string prefix="")" --> | 
|---|
| 126 | <div class="memitem"> | 
|---|
| 127 | <div class="memproto"> | 
|---|
| 128 |       <table class="memname"> | 
|---|
| 129 |         <tr> | 
|---|
| 130 |           <td class="memname">virtual int bdm::logger::add </td> | 
|---|
| 131 |           <td>(</td> | 
|---|
| 132 |           <td class="paramtype">const <a class="el" href="classbdm_1_1RV.html">RV</a> & </td> | 
|---|
| 133 |           <td class="paramname"> <em>rv</em>, </td> | 
|---|
| 134 |         </tr> | 
|---|
| 135 |         <tr> | 
|---|
| 136 |           <td class="paramkey"></td> | 
|---|
| 137 |           <td></td> | 
|---|
| 138 |           <td class="paramtype">string </td> | 
|---|
| 139 |           <td class="paramname"> <em>prefix</em> = <code>""</code></td><td> </td> | 
|---|
| 140 |         </tr> | 
|---|
| 141 |         <tr> | 
|---|
| 142 |           <td></td> | 
|---|
| 143 |           <td>)</td> | 
|---|
| 144 |           <td></td><td></td><td><code> [inline, virtual]</code></td> | 
|---|
| 145 |         </tr> | 
|---|
| 146 |       </table> | 
|---|
| 147 | </div> | 
|---|
| 148 | <div class="memdoc"> | 
|---|
| 149 | <p>returns an identifier which will be later needed for calling the <code><a class="el" href="classbdm_1_1logger.html#ae30f695619931b3c372ab280e452d309" 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#ae30f695619931b3c372ab280e452d309" title="log this vector">logit()</a></code>. </p> | 
|---|
| 150 |  | 
|---|
| 151 | <p>References <a class="el" href="bdmbase_8h_source.html#l00670">entries</a>, and <a class="el" href="bdmbase_8h_source.html#l00672">names</a>.</p> | 
|---|
| 152 |  | 
|---|
| 153 | <p>Referenced by <a class="el" href="datasources_8h_source.html#l00310">bdm::stateDS::log_add()</a>, <a class="el" href="datasources_8h_source.html#l00203">bdm::ArxDS::log_add()</a>, <a class="el" href="bdmbase_8h_source.html#l00966">bdm::BM::log_add()</a>, and <a class="el" href="bdmbase_8h_source.html#l00790">bdm::DS::log_add()</a>.</p> | 
|---|
| 154 |  | 
|---|
| 155 | </div> | 
|---|
| 156 | </div> | 
|---|
| 157 | <hr/>The documentation for this class was generated from the following file:<ul> | 
|---|
| 158 | <li><a class="el" href="bdmbase_8h_source.html">bdmbase.h</a></li> | 
|---|
| 159 | </ul> | 
|---|
| 160 | </div> | 
|---|
| 161 | <hr size="1"/><address style="text-align: right;"><small>Generated on Sun Aug 30 22:10:50 2009 for mixpp by  | 
|---|
| 162 | <a href="http://www.doxygen.org/index.html"> | 
|---|
| 163 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> | 
|---|
| 164 | </body> | 
|---|
| 165 | </html> | 
|---|