75 | | <a name="l00028"></a><a class="code" href="classbdm_1_1memlog.html">00028</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1memlog.html" title="Logging into matrices in data format in memory.">memlog</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> { |
76 | | <a name="l00029"></a>00029 |
77 | | <a name="l00030"></a>00030 <span class="keyword">protected</span>: |
78 | | <a name="l00032"></a><a class="code" href="classbdm_1_1memlog.html#a690ebd91430b5973855c9b4c9cf1b1d">00032</a> <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1memlog.html#a690ebd91430b5973855c9b4c9cf1b1d" title="Maximum length of vectors stored in memory.">maxlen</a>; |
79 | | <a name="l00034"></a><a class="code" href="classbdm_1_1memlog.html#70cec1d3549a82796ad7b6f0d07a4570">00034</a> <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1memlog.html#70cec1d3549a82796ad7b6f0d07a4570" title="Currect record to be written.">ind</a>; |
80 | | <a name="l00036"></a><a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e">00036</a> Array<mat> <a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a>; |
81 | | <a name="l00038"></a><a class="code" href="classbdm_1_1memlog.html#11fdf8ffca0f509ff637b0c3ac161c1f">00038</a> <span class="keywordtype">string</span> <a class="code" href="classbdm_1_1memlog.html#11fdf8ffca0f509ff637b0c3ac161c1f" title="name of it file to save results">itfilename</a>; |
82 | | <a name="l00039"></a>00039 <span class="keyword">public</span>: |
83 | | <a name="l00041"></a><a class="code" href="classbdm_1_1memlog.html#611dda03b3050de2eaa448a59cee9c27">00041</a> <a class="code" href="classbdm_1_1memlog.html#611dda03b3050de2eaa448a59cee9c27" title="Default constructor.">memlog</a> ( <span class="keywordtype">int</span> maxlen0, <span class="keywordtype">string</span> itf=<span class="stringliteral">""</span> ) : <a class="code" href="classbdm_1_1memlog.html#a690ebd91430b5973855c9b4c9cf1b1d" title="Maximum length of vectors stored in memory.">maxlen</a> ( maxlen0 ),<a class="code" href="classbdm_1_1memlog.html#70cec1d3549a82796ad7b6f0d07a4570" title="Currect record to be written.">ind</a> ( 0 ),<a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a> ( 0 ),<a class="code" href="classbdm_1_1memlog.html#11fdf8ffca0f509ff637b0c3ac161c1f" title="name of it file to save results">itfilename</a>(itf) {} |
84 | | <a name="l00042"></a>00042 |
85 | | <a name="l00043"></a>00043 <a class="code" href="classbdm_1_1memlog.html" title="Logging into matrices in data format in memory.">memlog</a>(): <a class="code" href="classbdm_1_1memlog.html#70cec1d3549a82796ad7b6f0d07a4570" title="Currect record to be written.">ind</a> ( 0 ),<a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a> ( 0 ) {} |
86 | | <a name="l00044"></a>00044 |
87 | | <a name="l00046"></a><a class="code" href="classbdm_1_1memlog.html#d3a8b007f3540523ff3f9910d9089391">00046</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1memlog.html#d3a8b007f3540523ff3f9910d9089391" title="Initialize storage.">init</a>() { |
88 | | <a name="l00047"></a>00047 <span class="keywordtype">int</span> i; <span class="keywordtype">int</span> n =<a class="code" href="classbdm_1_1logger.html#c54566a4554089443a20b2a49ed1a61f" title="RVs of all logged variables.">entries</a>.length(); |
89 | | <a name="l00048"></a>00048 <a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a>.set_size ( n ); |
90 | | <a name="l00049"></a>00049 <span class="keywordflow">for</span> ( i=0;i<n;i++ ) {<a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a>(i).set_size (<a class="code" href="classbdm_1_1memlog.html#a690ebd91430b5973855c9b4c9cf1b1d" title="Maximum length of vectors stored in memory.">maxlen</a>,<a class="code" href="classbdm_1_1logger.html#c54566a4554089443a20b2a49ed1a61f" title="RVs of all logged variables.">entries</a>(i)._dsize() );} |
| 74 | <a name="l00025"></a><a class="code" href="classbdm_1_1memlog.html">00025</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1memlog.html">memlog</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> { |
| 75 | <a name="l00026"></a>00026 |
| 76 | <a name="l00027"></a>00027 <span class="keyword">protected</span>: |
| 77 | <a name="l00029"></a><a class="code" href="classbdm_1_1memlog.html#a690ebd91430b5973855c9b4c9cf1b1d">00029</a> <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1memlog.html#a690ebd91430b5973855c9b4c9cf1b1d" title="Maximum length of vectors stored in memory.">maxlen</a>; |
| 78 | <a name="l00031"></a><a class="code" href="classbdm_1_1memlog.html#70cec1d3549a82796ad7b6f0d07a4570">00031</a> <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1memlog.html#70cec1d3549a82796ad7b6f0d07a4570" title="Currect record to be written.">ind</a>; |
| 79 | <a name="l00033"></a><a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e">00033</a> Array<mat> <a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a>; |
| 80 | <a name="l00035"></a><a class="code" href="classbdm_1_1memlog.html#11fdf8ffca0f509ff637b0c3ac161c1f">00035</a> <span class="keywordtype">string</span> <a class="code" href="classbdm_1_1memlog.html#11fdf8ffca0f509ff637b0c3ac161c1f" title="name of it file to save results">itfilename</a>; |
| 81 | <a name="l00036"></a>00036 <span class="keyword">public</span>: |
| 82 | <a name="l00038"></a><a class="code" href="classbdm_1_1memlog.html#611dda03b3050de2eaa448a59cee9c27">00038</a> <a class="code" href="classbdm_1_1memlog.html#611dda03b3050de2eaa448a59cee9c27" title="Default constructor.">memlog</a> ( <span class="keywordtype">int</span> maxlen0, <span class="keywordtype">string</span> itf = <span class="stringliteral">""</span> ) : <a class="code" href="classbdm_1_1memlog.html#a690ebd91430b5973855c9b4c9cf1b1d" title="Maximum length of vectors stored in memory.">maxlen</a> ( maxlen0 ), <a class="code" href="classbdm_1_1memlog.html#70cec1d3549a82796ad7b6f0d07a4570" title="Currect record to be written.">ind</a> ( 0 ), <a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a> ( 0 ), <a class="code" href="classbdm_1_1memlog.html#11fdf8ffca0f509ff637b0c3ac161c1f" title="name of it file to save results">itfilename</a> ( itf ) {} |
| 83 | <a name="l00039"></a>00039 |
| 84 | <a name="l00040"></a>00040 <a class="code" href="classbdm_1_1memlog.html">memlog</a>() : <a class="code" href="classbdm_1_1memlog.html#70cec1d3549a82796ad7b6f0d07a4570" title="Currect record to be written.">ind</a> ( 0 ), <a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a> ( 0 ) {} |
| 85 | <a name="l00041"></a>00041 |
| 86 | <a name="l00043"></a><a class="code" href="classbdm_1_1memlog.html#d3a8b007f3540523ff3f9910d9089391">00043</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1memlog.html#d3a8b007f3540523ff3f9910d9089391" title="Initialize storage.">init</a>() { |
| 87 | <a name="l00044"></a>00044 <span class="keywordtype">int</span> i; |
| 88 | <a name="l00045"></a>00045 <span class="keywordtype">int</span> n = <a class="code" href="classbdm_1_1logger.html#c54566a4554089443a20b2a49ed1a61f" title="RVs of all logged variables.">entries</a>.length(); |
| 89 | <a name="l00046"></a>00046 <a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a>.set_size ( n ); |
| 90 | <a name="l00047"></a>00047 <span class="keywordflow">for</span> ( i = 0; i < n; i++ ) { |
| 91 | <a name="l00048"></a>00048 <a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a> ( i ).set_size ( <a class="code" href="classbdm_1_1memlog.html#a690ebd91430b5973855c9b4c9cf1b1d" title="Maximum length of vectors stored in memory.">maxlen</a>, <a class="code" href="classbdm_1_1logger.html#c54566a4554089443a20b2a49ed1a61f" title="RVs of all logged variables.">entries</a> ( i )._dsize() ); |
| 92 | <a name="l00049"></a>00049 } |
92 | | <a name="l00051"></a><a class="code" href="classbdm_1_1memlog.html#69964f0472e53098528ee41507bdfc77">00051</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1memlog.html#69964f0472e53098528ee41507bdfc77" title="Shifts storage position for another time step.">step</a>() {<span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1memlog.html#70cec1d3549a82796ad7b6f0d07a4570" title="Currect record to be written.">ind</a><<a class="code" href="classbdm_1_1memlog.html#a690ebd91430b5973855c9b4c9cf1b1d" title="Maximum length of vectors stored in memory.">maxlen</a> ) <a class="code" href="classbdm_1_1memlog.html#70cec1d3549a82796ad7b6f0d07a4570" title="Currect record to be written.">ind</a>++; <span class="keywordflow">else</span> it_error ( <span class="stringliteral">"memlog::ind is too high;"</span> );} |
93 | | <a name="l00052"></a><a class="code" href="classbdm_1_1memlog.html#364e58c5d7058776c2a9cfa7d58dad6d">00052</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1memlog.html#364e58c5d7058776c2a9cfa7d58dad6d" title="log this vector">logit</a> ( <span class="keywordtype">int</span> <span class="keywordtype">id</span>, <span class="keyword">const</span> vec &v ) { |
94 | | <a name="l00053"></a>00053 it_assert_debug(<span class="keywordtype">id</span><<a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a>.length(),<span class="stringliteral">"Logger was not initialized, run init()."</span>); |
95 | | <a name="l00054"></a>00054 <span class="keywordflow">if</span>(<span class="keywordtype">id</span>>=0){ <a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a> ( <span class="keywordtype">id</span> ).set_row ( <a class="code" href="classbdm_1_1memlog.html#70cec1d3549a82796ad7b6f0d07a4570" title="Currect record to be written.">ind</a>,v );} |
96 | | <a name="l00055"></a>00055 } |
97 | | <a name="l00056"></a><a class="code" href="classbdm_1_1memlog.html#2b57dbd3dff49a98c6ce8fccccb170af">00056</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1memlog.html#2b57dbd3dff49a98c6ce8fccccb170af" title="log this double">logit</a> ( <span class="keywordtype">int</span> <span class="keywordtype">id</span>, <span class="keyword">const</span> <span class="keywordtype">double</span> &d ) { |
98 | | <a name="l00057"></a>00057 it_assert_debug(<span class="keywordtype">id</span><<a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a>.length(),<span class="stringliteral">"Logger was not initialized, run init()."</span>); |
99 | | <a name="l00058"></a>00058 it_assert_debug(<a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a>(<span class="keywordtype">id</span>).cols()==1,<span class="stringliteral">"Vector expected"</span>); |
100 | | <a name="l00059"></a>00059 <span class="keywordflow">if</span>(<span class="keywordtype">id</span>>=0){ <a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a> ( <span class="keywordtype">id</span> ) ( <a class="code" href="classbdm_1_1memlog.html#70cec1d3549a82796ad7b6f0d07a4570" title="Currect record to be written.">ind</a> )=d;} |
| 94 | <a name="l00051"></a><a class="code" href="classbdm_1_1memlog.html#69964f0472e53098528ee41507bdfc77">00051</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1memlog.html#69964f0472e53098528ee41507bdfc77" title="Shifts storage position for another time step.">step</a>() { |
| 95 | <a name="l00052"></a>00052 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1memlog.html#70cec1d3549a82796ad7b6f0d07a4570" title="Currect record to be written.">ind</a> < <a class="code" href="classbdm_1_1memlog.html#a690ebd91430b5973855c9b4c9cf1b1d" title="Maximum length of vectors stored in memory.">maxlen</a> ) <a class="code" href="classbdm_1_1memlog.html#70cec1d3549a82796ad7b6f0d07a4570" title="Currect record to be written.">ind</a>++; |
| 96 | <a name="l00053"></a>00053 <span class="keywordflow">else</span> it_error ( <span class="stringliteral">"memlog::ind is too high;"</span> ); |
| 97 | <a name="l00054"></a>00054 } |
| 98 | <a name="l00055"></a><a class="code" href="classbdm_1_1memlog.html#364e58c5d7058776c2a9cfa7d58dad6d">00055</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1memlog.html#364e58c5d7058776c2a9cfa7d58dad6d" title="log this vector">logit</a> ( <span class="keywordtype">int</span> <span class="keywordtype">id</span>, <span class="keyword">const</span> vec &v ) { |
| 99 | <a name="l00056"></a>00056 it_assert_debug ( <span class="keywordtype">id</span> < <a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a>.length(), <span class="stringliteral">"Logger was not initialized, run init()."</span> ); |
| 100 | <a name="l00057"></a>00057 <span class="keywordflow">if</span> ( <span class="keywordtype">id</span> >= 0 ) { |
| 101 | <a name="l00058"></a>00058 <a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a> ( <span class="keywordtype">id</span> ).set_row ( <a class="code" href="classbdm_1_1memlog.html#70cec1d3549a82796ad7b6f0d07a4570" title="Currect record to be written.">ind</a>, v ); |
| 102 | <a name="l00059"></a>00059 } |
102 | | <a name="l00062"></a>00062 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1memlog.html#6a74b7a3d889607391594279112aef1f" title="Save values into an itfile named after fname.">itsave</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* fname); |
103 | | <a name="l00064"></a><a class="code" href="classbdm_1_1memlog.html#39e32f671414c71304e316976ccc37f3">00064</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1memlog.html#39e32f671414c71304e316976ccc37f3" title="Finalize storing information.">finalize</a>() {<span class="keywordflow">if</span> (<a class="code" href="classbdm_1_1memlog.html#11fdf8ffca0f509ff637b0c3ac161c1f" title="name of it file to save results">itfilename</a>.length()>0) <a class="code" href="classbdm_1_1memlog.html#6a74b7a3d889607391594279112aef1f" title="Save values into an itfile named after fname.">itsave</a>(<a class="code" href="classbdm_1_1memlog.html#11fdf8ffca0f509ff637b0c3ac161c1f" title="name of it file to save results">itfilename</a>.c_str());}; |
104 | | <a name="l00065"></a>00065 |
105 | | <a name="l00066"></a>00066 |
106 | | <a name="l00079"></a>00079 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1memlog.html#7352b474bc54c35ab7c9297c5b958629" title="UI for memlog.">from_setting</a>( <span class="keyword">const</span> Setting &<span class="keyword">set</span> ); |
107 | | <a name="l00080"></a>00080 |
108 | | <a name="l00081"></a>00081 <span class="comment">// TODO dodelat void to_setting( Setting &set ) const;</span> |
109 | | <a name="l00082"></a>00082 }; |
110 | | <a name="l00083"></a>00083 |
111 | | <a name="l00084"></a>00084 <a class="code" href="user__info_8h.html#4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a>(memlog); |
112 | | <a name="l00085"></a>00085 |
113 | | <a name="l00093"></a><a class="code" href="classbdm_1_1dirfilelog.html">00093</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1dirfilelog.html" title="Logging into dirfile with buffer in memory.">dirfilelog</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1memlog.html" title="Logging into matrices in data format in memory.">memlog</a> { |
114 | | <a name="l00094"></a>00094 |
115 | | <a name="l00095"></a>00095 <span class="keyword">protected</span>: |
116 | | <a name="l00097"></a><a class="code" href="classbdm_1_1dirfilelog.html#985eb02770f01e25cdceff32ff53a9c5">00097</a> <span class="keywordtype">string</span> <a class="code" href="classbdm_1_1dirfilelog.html#985eb02770f01e25cdceff32ff53a9c5" title="name of the directory">dirname</a>; |
117 | | <a name="l00099"></a><a class="code" href="classbdm_1_1dirfilelog.html#7805040fe1ffa2a048c33980bc995793">00099</a> Array<string> <a class="code" href="classbdm_1_1dirfilelog.html#7805040fe1ffa2a048c33980bc995793" title="Automatically generated.">scalarnames</a>; |
118 | | <a name="l00100"></a>00100 <span class="keyword">public</span>: |
119 | | <a name="l00104"></a><a class="code" href="classbdm_1_1dirfilelog.html#15e1c0228c8ecefb372b364742748dff">00104</a> <a class="code" href="classbdm_1_1dirfilelog.html#15e1c0228c8ecefb372b364742748dff" title="Default constructor.">dirfilelog</a> ( <span class="keywordtype">string</span> dirname0, <span class="keywordtype">int</span> maxlen0 ) : <a class="code" href="classbdm_1_1memlog.html" title="Logging into matrices in data format in memory.">memlog</a> ( maxlen0 ), <a class="code" href="classbdm_1_1dirfilelog.html#985eb02770f01e25cdceff32ff53a9c5" title="name of the directory">dirname</a> ( dirname0 ), <a class="code" href="classbdm_1_1dirfilelog.html#7805040fe1ffa2a048c33980bc995793" title="Automatically generated.">scalarnames</a> ( 0 ) {} |
120 | | <a name="l00105"></a>00105 |
121 | | <a name="l00106"></a>00106 <a class="code" href="classbdm_1_1dirfilelog.html" title="Logging into dirfile with buffer in memory.">dirfilelog</a>() {} |
122 | | <a name="l00107"></a>00107 |
123 | | <a name="l00109"></a>00109 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#78a3bd8a83cbd6299e279544bc81493d" title="Initialize storage.">init</a>(); |
124 | | <a name="l00110"></a>00110 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#f79660645d09aa2d8bdd18923a721662" title="Shifts storage position for another time step.">step</a>(); |
125 | | <a name="l00111"></a>00111 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#521d7ba159f97a0182392df27953804f" title="Finalize storing information.">finalize</a>(); |
126 | | <a name="l00115"></a>00115 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#f595c0df25f5fa5d8c27ea1e375d9c51" title="Write memory storage to disk.">write_buffers</a> ( <span class="keywordtype">int</span> Len ); |
127 | | <a name="l00116"></a>00116 |
128 | | <a name="l00117"></a>00117 <span class="comment">// TODO dokumentace - aktualizovat</span> |
129 | | <a name="l00127"></a>00127 <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#a32de0f314a30392d69f07458643514e" title="UI for dirfilelog (Kst file format).">from_setting</a>( <span class="keyword">const</span> Setting &<span class="keyword">set</span> ); |
130 | | <a name="l00128"></a>00128 |
131 | | <a name="l00129"></a>00129 <span class="comment">// TODO dodelat void to_setting( Setting &set ) const;</span> |
132 | | <a name="l00130"></a>00130 }; |
133 | | <a name="l00131"></a>00131 |
134 | | <a name="l00132"></a>00132 <a class="code" href="user__info_8h.html#4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a>(dirfilelog); |
135 | | <a name="l00133"></a>00133 |
136 | | <a name="l00134"></a>00134 }; |
137 | | <a name="l00135"></a>00135 <span class="preprocessor">#endif // LGR_H</span> |
| 104 | <a name="l00061"></a><a class="code" href="classbdm_1_1memlog.html#2b57dbd3dff49a98c6ce8fccccb170af">00061</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1memlog.html#2b57dbd3dff49a98c6ce8fccccb170af" title="log this double">logit</a> ( <span class="keywordtype">int</span> <span class="keywordtype">id</span>, <span class="keyword">const</span> <span class="keywordtype">double</span> &d ) { |
| 105 | <a name="l00062"></a>00062 it_assert_debug ( <span class="keywordtype">id</span> < <a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a>.length(), <span class="stringliteral">"Logger was not initialized, run init()."</span> ); |
| 106 | <a name="l00063"></a>00063 it_assert_debug ( <a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a> ( <span class="keywordtype">id</span> ).cols() == 1, <span class="stringliteral">"Vector expected"</span> ); |
| 107 | <a name="l00064"></a>00064 <span class="keywordflow">if</span> ( <span class="keywordtype">id</span> >= 0 ) { |
| 108 | <a name="l00065"></a>00065 <a class="code" href="classbdm_1_1memlog.html#1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a> ( <span class="keywordtype">id</span> ) ( <a class="code" href="classbdm_1_1memlog.html#70cec1d3549a82796ad7b6f0d07a4570" title="Currect record to be written.">ind</a> ) = d; |
| 109 | <a name="l00066"></a>00066 } |
| 110 | <a name="l00067"></a>00067 } |
| 111 | <a name="l00069"></a>00069 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1memlog.html#6a74b7a3d889607391594279112aef1f" title="Save values into an itfile named after fname.">itsave</a> ( <span class="keyword">const</span> <span class="keywordtype">char</span>* fname ); |
| 112 | <a name="l00071"></a><a class="code" href="classbdm_1_1memlog.html#39e32f671414c71304e316976ccc37f3">00071</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1memlog.html#39e32f671414c71304e316976ccc37f3" title="Finalize storing information.">finalize</a>() { |
| 113 | <a name="l00072"></a>00072 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1memlog.html#11fdf8ffca0f509ff637b0c3ac161c1f" title="name of it file to save results">itfilename</a>.length() > 0 ) <a class="code" href="classbdm_1_1memlog.html#6a74b7a3d889607391594279112aef1f" title="Save values into an itfile named after fname.">itsave</a> ( <a class="code" href="classbdm_1_1memlog.html#11fdf8ffca0f509ff637b0c3ac161c1f" title="name of it file to save results">itfilename</a>.c_str() ); |
| 114 | <a name="l00073"></a>00073 }; |
| 115 | <a name="l00074"></a>00074 |
| 116 | <a name="l00075"></a>00075 |
| 117 | <a name="l00088"></a>00088 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1memlog.html#7352b474bc54c35ab7c9297c5b958629" title="UI for memlog.">from_setting</a> ( <span class="keyword">const</span> Setting &<span class="keyword">set</span> ); |
| 118 | <a name="l00089"></a>00089 |
| 119 | <a name="l00090"></a>00090 <span class="comment">// TODO dodelat void to_setting( Setting &set ) const;</span> |
| 120 | <a name="l00091"></a>00091 }; |
| 121 | <a name="l00092"></a>00092 |
| 122 | <a name="l00093"></a>00093 <a class="code" href="user__info_8h.html#4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a> ( memlog ); |
| 123 | <a name="l00094"></a>00094 SHAREDPTR ( memlog ); |
| 124 | <a name="l00095"></a>00095 |
| 125 | <a name="l00103"></a><a class="code" href="classbdm_1_1dirfilelog.html">00103</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1dirfilelog.html" title="Logging into dirfile with buffer in memory.">dirfilelog</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1memlog.html">memlog</a> { |
| 126 | <a name="l00104"></a>00104 |
| 127 | <a name="l00105"></a>00105 <span class="keyword">protected</span>: |
| 128 | <a name="l00107"></a><a class="code" href="classbdm_1_1dirfilelog.html#985eb02770f01e25cdceff32ff53a9c5">00107</a> <span class="keywordtype">string</span> <a class="code" href="classbdm_1_1dirfilelog.html#985eb02770f01e25cdceff32ff53a9c5" title="name of the directory">dirname</a>; |
| 129 | <a name="l00109"></a><a class="code" href="classbdm_1_1dirfilelog.html#7805040fe1ffa2a048c33980bc995793">00109</a> Array<string> <a class="code" href="classbdm_1_1dirfilelog.html#7805040fe1ffa2a048c33980bc995793" title="Automatically generated.">scalarnames</a>; |
| 130 | <a name="l00110"></a>00110 <span class="keyword">public</span>: |
| 131 | <a name="l00114"></a><a class="code" href="classbdm_1_1dirfilelog.html#15e1c0228c8ecefb372b364742748dff">00114</a> <a class="code" href="classbdm_1_1dirfilelog.html#15e1c0228c8ecefb372b364742748dff" title="Default constructor.">dirfilelog</a> ( <span class="keywordtype">string</span> dirname0, <span class="keywordtype">int</span> maxlen0 ) : <a class="code" href="classbdm_1_1memlog.html">memlog</a> ( maxlen0 ), <a class="code" href="classbdm_1_1dirfilelog.html#985eb02770f01e25cdceff32ff53a9c5" title="name of the directory">dirname</a> ( dirname0 ), <a class="code" href="classbdm_1_1dirfilelog.html#7805040fe1ffa2a048c33980bc995793" title="Automatically generated.">scalarnames</a> ( 0 ) {} |
| 132 | <a name="l00115"></a>00115 |
| 133 | <a name="l00116"></a>00116 <a class="code" href="classbdm_1_1dirfilelog.html" title="Logging into dirfile with buffer in memory.">dirfilelog</a>() {} |
| 134 | <a name="l00117"></a>00117 |
| 135 | <a name="l00119"></a>00119 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#78a3bd8a83cbd6299e279544bc81493d" title="Initialize storage.">init</a>(); |
| 136 | <a name="l00120"></a>00120 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#f79660645d09aa2d8bdd18923a721662" title="Shifts storage position for another time step.">step</a>(); |
| 137 | <a name="l00121"></a>00121 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#521d7ba159f97a0182392df27953804f" title="Finalize storing information.">finalize</a>(); |
| 138 | <a name="l00125"></a>00125 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#f595c0df25f5fa5d8c27ea1e375d9c51" title="Write memory storage to disk.">write_buffers</a> ( <span class="keywordtype">int</span> Len ); |
| 139 | <a name="l00126"></a>00126 |
| 140 | <a name="l00136"></a>00136 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#a32de0f314a30392d69f07458643514e" title="UI for dirfilelog (Kst file format).">from_setting</a> ( <span class="keyword">const</span> Setting &<span class="keyword">set</span> ); |
| 141 | <a name="l00137"></a>00137 |
| 142 | <a name="l00138"></a>00138 <span class="comment">// TODO dodelat void to_setting( Setting &set ) const;</span> |
| 143 | <a name="l00139"></a>00139 }; |
| 144 | <a name="l00140"></a>00140 |
| 145 | <a name="l00141"></a>00141 <a class="code" href="user__info_8h.html#4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a> ( dirfilelog ); |
| 146 | <a name="l00142"></a>00142 SHAREDPTR ( dirfilelog ); |
| 147 | <a name="l00143"></a>00143 |
| 148 | <a name="l00144"></a>00144 }; |
| 149 | <a name="l00145"></a>00145 <span class="preprocessor">#endif // LGR_H</span> |