Show
Ignore:
Timestamp:
02/16/09 10:03:13 (15 years ago)
Author:
smidl
Message:

Next major revision

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • doc/html/libFN_8h-source.html

    r270 r271  
    66</head><body> 
    77<!-- Generated by Doxygen 1.5.6 --> 
     8<script type="text/javascript"> 
     9<!-- 
     10function 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} 
     22function 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} 
     46window.onload = initDynSections; 
     47--> 
     48</script> 
    849<div class="navigation" id="top"> 
    950  <div class="tabs"> 
    1051    <ul> 
    11       <li><a href="index.html"><span>Main&nbsp;Page</span></a></li> 
     52      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li> 
    1253      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li> 
    1354      <li><a href="modules.html"><span>Modules</span></a></li> 
    14       <li><a href="namespaces.html"><span>Namespaces</span></a></li> 
    1555      <li><a href="classes.html"><span>Classes</span></a></li> 
    1656      <li class="current"><a href="files.html"><span>Files</span></a></li> 
     
    5191<a name="l00041"></a>00041                 vec B; 
    5292<a name="l00042"></a>00042         <span class="keyword">public</span> : 
    53 <a name="l00043"></a><a class="code" href="classbdm_1_1linfn.html#b8063094a2aa210dcf7ae73e2b85e09c">00043</a>                 vec <a class="code" href="classbdm_1_1linfn.html#b8063094a2aa210dcf7ae73e2b85e09c" title="function evaluates numerical value of  at  cond ">eval</a> (<span class="keyword">const</span> vec &amp;cond ) {it_assert_debug ( cond.length() ==rv.count(), <span class="stringliteral">"linfn::eval Wrong cond."</span> );<span class="keywordflow">return</span> A*cond+B;}; 
     93<a name="l00043"></a><a class="code" href="classbdm_1_1linfn.html#b8063094a2aa210dcf7ae73e2b85e09c">00043</a>                 vec <a class="code" href="classbdm_1_1linfn.html#b8063094a2aa210dcf7ae73e2b85e09c" title="function evaluates numerical value of  at  cond ">eval</a> (<span class="keyword">const</span> vec &amp;cond ) {it_assert_debug ( cond.length() ==A.cols(), <span class="stringliteral">"linfn::eval Wrong cond."</span> );<span class="keywordflow">return</span> A*cond+B;}; 
    5494<a name="l00044"></a>00044  
    5595<a name="l00045"></a>00045 <span class="comment">//              linfn evalsome ( ivec &amp;rvind );</span> 
     
    87127<a name="l00100"></a>00100                 mat B; 
    88128<a name="l00101"></a>00101         <span class="keyword">public</span> : 
    89 <a name="l00102"></a>00102                 vec <a class="code" href="classbdm_1_1bilinfn.html#e36a16e72e7f9fedf3cb18d2d5505a24" title="Evaluates .">eval</a> ( <span class="keyword">const</span>  vec &amp;x0, <span class="keyword">const</span> vec &amp;u0 ); 
    90 <a name="l00103"></a>00103  
    91 <a name="l00105"></a><a class="code" href="classbdm_1_1bilinfn.html#dc263f8d8d1876023a9d161d17a3c621">00105</a>                 <a class="code" href="classbdm_1_1bilinfn.html#dc263f8d8d1876023a9d161d17a3c621" title="Default constructor.">bilinfn</a> () : <a class="code" href="classbdm_1_1diffbifn.html" title="Class representing a differentiable function of two variables .">diffbifn</a> () ,A() ,B()      {}; 
    92 <a name="l00107"></a><a class="code" href="classbdm_1_1bilinfn.html#5a508fbb5fc013904d9b62b2231442de">00107</a>                 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1bilinfn.html#5a508fbb5fc013904d9b62b2231442de" title="Alternative constructor.">set_parameters</a>(<span class="keyword">const</span> mat A0, <span class="keyword">const</span> mat B0){ 
    93 <a name="l00108"></a>00108                         it_assert_debug(A0.rows()==B0.rows(),<span class="stringliteral">""</span>); 
    94 <a name="l00109"></a>00109                         A=A0;B=B0; 
    95 <a name="l00110"></a>00110                         <a class="code" href="classbdm_1_1fnc.html#52156cb4a52a62d51fc7455985797a62" title="Length of the output vector.">dimy</a>=A.rows(); 
    96 <a name="l00111"></a>00111                         <a class="code" href="classbdm_1_1diffbifn.html#a193aa2c4a500139c0c4b669691e588e" title="cache for rvx.count()">dimx</a>=A.cols(); 
    97 <a name="l00112"></a>00112                         <a class="code" href="classbdm_1_1diffbifn.html#30c45617eec89adeb4ebaa763d093fb0" title="cache for rvu.count()">dimu</a>=B.cols(); 
    98 <a name="l00113"></a>00113                 } 
    99 <a name="l00115"></a><a class="code" href="classbdm_1_1bilinfn.html#33066f1054dd259df2ec5fafae4b46e6">00115</a>                 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1bilinfn.html#33066f1054dd259df2ec5fafae4b46e6" title="Evaluates  and writes result into A .">dfdx_cond</a> ( <span class="keyword">const</span> vec &amp;x0, <span class="keyword">const</span> vec &amp;u0, mat &amp;F, <span class="keywordtype">bool</span> full ) 
    100 <a name="l00116"></a>00116                 { 
    101 <a name="l00117"></a>00117                         it_assert_debug ( ( F.cols() ==A.cols() ) &amp; ( F.rows() ==A.rows() ),<span class="stringliteral">"Allocated F is not compatible."</span> ); 
    102 <a name="l00118"></a>00118                         <span class="keywordflow">if</span> ( full ) F=A;        <span class="comment">//else : nothing has changed no need to regenerate</span> 
    103 <a name="l00119"></a>00119                 } 
    104 <a name="l00121"></a><a class="code" href="classbdm_1_1bilinfn.html#9cfe2f1c115ba7c3c75849a10a4f2c08">00121</a>                 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1bilinfn.html#9cfe2f1c115ba7c3c75849a10a4f2c08" title="Evaluates  and writes result into A .">dfdu_cond</a> ( <span class="keyword">const</span> vec &amp;x0, <span class="keyword">const</span> vec &amp;u0, mat &amp;F,  <span class="keywordtype">bool</span> full=<span class="keyword">true</span> ) 
    105 <a name="l00122"></a>00122                 { 
    106 <a name="l00123"></a>00123                         it_assert_debug ( ( F.cols() ==B.cols() ) &amp; ( F.rows() ==B.rows() ),<span class="stringliteral">"Allocated F is not compatible."</span> ); 
    107 <a name="l00124"></a>00124                         <span class="keywordflow">if</span> ( full ) F=B;        <span class="comment">//else : nothing has changed no need to regenerate</span> 
    108 <a name="l00125"></a>00125                 } 
    109 <a name="l00126"></a>00126 }; 
    110 <a name="l00127"></a>00127  
    111 <a name="l00128"></a>00128 } <span class="comment">//namespace</span> 
    112 <a name="l00129"></a>00129 <span class="preprocessor">#endif // FN_H</span> 
     129<a name="l00104"></a>00104                  
     130<a name="l00105"></a>00105                 <a class="code" href="classbdm_1_1bilinfn.html" title="Class representing function .">bilinfn</a> () : <a class="code" href="classbdm_1_1diffbifn.html#92ff29d748e445b440453a38d0b09681" title="Default constructor (dimy is not set!).">diffbifn</a> () ,A() ,B()      {}; 
     131<a name="l00106"></a>00106                 <a class="code" href="classbdm_1_1bilinfn.html" title="Class representing function .">bilinfn</a> (<span class="keyword">const</span> mat A0, <span class="keyword">const</span> mat B0) {<a class="code" href="classbdm_1_1bilinfn.html#5a508fbb5fc013904d9b62b2231442de" title="Alternative constructor.">set_parameters</a>(A0,B0);}; 
     132<a name="l00108"></a><a class="code" href="classbdm_1_1bilinfn.html#5a508fbb5fc013904d9b62b2231442de">00108</a>                 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1bilinfn.html#5a508fbb5fc013904d9b62b2231442de" title="Alternative constructor.">set_parameters</a>(<span class="keyword">const</span> mat A0, <span class="keyword">const</span> mat B0){ 
     133<a name="l00109"></a>00109                         it_assert_debug(A0.rows()==B0.rows(),<span class="stringliteral">""</span>); 
     134<a name="l00110"></a>00110                         A=A0;B=B0; 
     135<a name="l00111"></a>00111                         <a class="code" href="classbdm_1_1fnc.html#52156cb4a52a62d51fc7455985797a62" title="Length of the output vector.">dimy</a>=A.rows(); 
     136<a name="l00112"></a>00112                         <a class="code" href="classbdm_1_1diffbifn.html#a193aa2c4a500139c0c4b669691e588e" title="cache for rvx.count()">dimx</a>=A.cols(); 
     137<a name="l00113"></a>00113                         <a class="code" href="classbdm_1_1diffbifn.html#30c45617eec89adeb4ebaa763d093fb0" title="cache for rvu.count()">dimu</a>=B.cols(); 
     138<a name="l00114"></a>00114                 } 
     139<a name="l00116"></a>00116                  
     140<a name="l00119"></a>00119                 vec <a class="code" href="classbdm_1_1bilinfn.html#e36a16e72e7f9fedf3cb18d2d5505a24" title="Evaluates .">eval</a> ( <span class="keyword">const</span>  vec &amp;x0, <span class="keyword">const</span> vec &amp;u0 ); 
     141<a name="l00120"></a><a class="code" href="classbdm_1_1bilinfn.html#33066f1054dd259df2ec5fafae4b46e6">00120</a>                 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1bilinfn.html#33066f1054dd259df2ec5fafae4b46e6" title="Evaluates  and writes result into A .">dfdx_cond</a> ( <span class="keyword">const</span> vec &amp;x0, <span class="keyword">const</span> vec &amp;u0, mat &amp;F, <span class="keywordtype">bool</span> full ) 
     142<a name="l00121"></a>00121                 { 
     143<a name="l00122"></a>00122                         it_assert_debug ( ( F.cols() ==A.cols() ) &amp; ( F.rows() ==A.rows() ),<span class="stringliteral">"Allocated F is not compatible."</span> ); 
     144<a name="l00123"></a>00123                         <span class="keywordflow">if</span> ( full ) F=A;        <span class="comment">//else : nothing has changed no need to regenerate</span> 
     145<a name="l00124"></a>00124                 } 
     146<a name="l00126"></a><a class="code" href="classbdm_1_1bilinfn.html#9cfe2f1c115ba7c3c75849a10a4f2c08">00126</a>                 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1bilinfn.html#9cfe2f1c115ba7c3c75849a10a4f2c08" title="Evaluates  and writes result into A .">dfdu_cond</a> ( <span class="keyword">const</span> vec &amp;x0, <span class="keyword">const</span> vec &amp;u0, mat &amp;F,  <span class="keywordtype">bool</span> full=<span class="keyword">true</span> ) 
     147<a name="l00127"></a>00127                 { 
     148<a name="l00128"></a>00128                         it_assert_debug ( ( F.cols() ==B.cols() ) &amp; ( F.rows() ==B.rows() ),<span class="stringliteral">"Allocated F is not compatible."</span> ); 
     149<a name="l00129"></a>00129                         <span class="keywordflow">if</span> ( full ) F=B;        <span class="comment">//else : nothing has changed no need to regenerate</span> 
     150<a name="l00130"></a>00130                 } 
     151<a name="l00132"></a>00132 }; 
     152<a name="l00133"></a>00133  
     153<a name="l00134"></a>00134 } <span class="comment">//namespace</span> 
     154<a name="l00135"></a>00135 <span class="preprocessor">#endif // FN_H</span> 
    113155</pre></div></div> 
    114 <hr size="1"><address style="text-align: right;"><small>Generated on Wed Feb 11 23:33:55 2009 for mixpp by&nbsp; 
     156<hr size="1"><address style="text-align: right;"><small>Generated on Sun Feb 15 23:09:23 2009 for mixpp by&nbsp; 
    115157<a href="http://www.doxygen.org/index.html"> 
    116158<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>