Show
Ignore:
Timestamp:
02/16/08 15:12:24 (17 years ago)
Author:
smidl
Message:

Switch to CMake

Files:
1 modified

Legend:

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

    r8 r19  
    11<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
    22<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 
    3 <title>mixpp: work/mixpp/libDC.h Source File</title> 
     3<title>mixpp: work/mixpp/bdm/math/libDC.h Source File</title> 
    44<link href="doxygen.css" rel="stylesheet" type="text/css"> 
    55<link href="tabs.css" rel="stylesheet" type="text/css"> 
     
    1313  </ul> 
    1414</div> 
    15 <h1>work/mixpp/libDC.h</h1><a href="libDC_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001  
     15<h1>work/mixpp/bdm/math/libDC.h</h1><a href="libDC_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001  
    1616<a name="l00013"></a>00013 <span class="preprocessor">#ifndef DC_H</span> 
    1717<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define DC_H</span> 
     
    3232<a name="l00051"></a>00051         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classsqmat.html#5c852819589f74cdaefbd648c0ce8547" title="Logarithm of a determinant.">logdet</a>() =0; 
    3333<a name="l00052"></a>00052  
    34 <a name="l00057"></a>00057         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classsqmat.html#44e079468bc8bfccf634dc85b32ba6be" title="Evaluates quadratic form $x= v&amp;#39;*V*v$;.">qform</a>(vec &amp;v) =0; 
    35 <a name="l00058"></a>00058  
    36 <a name="l00059"></a>00059 <span class="comment">//      //! easy version of the </span> 
    37 <a name="l00060"></a>00060 <span class="comment">//      sqmat inv();</span> 
    38 <a name="l00061"></a>00061  
    39 <a name="l00062"></a>00062         <span class="keyword">friend</span> std::ostream &amp;operator&lt;&lt; ( std::ostream &amp;os, <a class="code" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</a> &amp;sq ); 
    40 <a name="l00063"></a>00063  
    41 <a name="l00065"></a>00065         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#6fca246f9eabbdeb8cac03030e826b5e" title="Clearing matrix so that it corresponds to zeros.">clear</a>() =0; 
    42 <a name="l00066"></a>00066          
    43 <a name="l00068"></a>00068         <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#743d3799d9e73403230c54e14ecf09ed" title="Reimplementing common functions of mat: cols().">cols</a>() =0; 
    44 <a name="l00069"></a>00069  
    45 <a name="l00071"></a>00071         <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#f59664a4be09450f8c6ce3f5e5ab2dc7" title="Reimplementing common functions of mat: cols().">rows</a>() =0; 
    46 <a name="l00072"></a>00072  
    47 <a name="l00073"></a>00073 }; 
     34<a name="l00058"></a>00058         <span class="keyword">virtual</span> vec <a class="code" href="classsqmat.html#b5236c8a050199e1a9d338b0da1a08d2" title="Multiplies square root of $V$ by vector $x$.">sqrt_mult</a>(vec &amp;v) =0; 
     35<a name="l00059"></a>00059          
     36<a name="l00064"></a>00064         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classsqmat.html#44e079468bc8bfccf634dc85b32ba6be" title="Evaluates quadratic form $x= v&amp;#39;*V*v$;.">qform</a>(vec &amp;v) =0; 
     37<a name="l00065"></a>00065  
     38<a name="l00066"></a>00066 <span class="comment">//      //! easy version of the </span> 
     39<a name="l00067"></a>00067 <span class="comment">//      sqmat inv();</span> 
     40<a name="l00068"></a>00068  
     41<a name="l00070"></a>00070         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#6fca246f9eabbdeb8cac03030e826b5e" title="Clearing matrix so that it corresponds to zeros.">clear</a>() =0; 
     42<a name="l00071"></a>00071          
     43<a name="l00073"></a>00073         <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#743d3799d9e73403230c54e14ecf09ed" title="Reimplementing common functions of mat: cols().">cols</a>() =0; 
    4844<a name="l00074"></a>00074  
    49 <a name="l00075"></a>00075  
    50 <a name="l00080"></a><a class="code" href="classfsqmat.html">00080</a> <span class="keyword">class </span><a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a>: <a class="code" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</a> { 
    51 <a name="l00081"></a>00081         <span class="keywordtype">void</span> opupdt( <span class="keyword">const</span> vec &amp;v, <span class="keywordtype">double</span> w ); 
    52 <a name="l00082"></a>00082         mat to_mat(); 
    53 <a name="l00083"></a>00083         <span class="keywordtype">void</span> mult_sym( <span class="keyword">const</span> mat &amp;C, <span class="keywordtype">bool</span> trans=<span class="keyword">false</span> ); 
    54 <a name="l00084"></a>00084    <span class="keywordtype">void</span> mult_sym( <span class="keyword">const</span> mat &amp;C, <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &amp;U, <span class="keywordtype">bool</span> trans=<span class="keyword">false</span> ); 
    55 <a name="l00085"></a>00085         <span class="keywordtype">void</span> inv(<a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &amp;Inv); 
    56 <a name="l00086"></a>00086         <span class="keywordtype">void</span> clear(); 
    57 <a name="l00087"></a>00087          
    58 <a name="l00089"></a>00089         <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a>(<span class="keyword">const</span> mat &amp;M); 
    59 <a name="l00090"></a>00090          
    60 <a name="l00096"></a>00096         <span class="keyword">virtual</span> <span class="keywordtype">void</span> inv(<a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a>* Inv); 
    61 <a name="l00097"></a>00097 }; 
    62 <a name="l00098"></a>00098  
    63 <a name="l00099"></a>00099 <span class="keyword">class </span>ldmat: <a class="code" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</a> { 
    64 <a name="l00100"></a>00100 <span class="keyword">public</span>: 
    65 <a name="l00101"></a>00101  
    66 <a name="l00103"></a>00103         ldmat( <span class="keyword">const</span> mat &amp;L, <span class="keyword">const</span> vec &amp;D ); 
    67 <a name="l00105"></a>00105         ldmat( mat V ); 
    68 <a name="l00106"></a>00106         ldmat (); 
    69 <a name="l00107"></a>00107  
    70 <a name="l00108"></a>00108         <span class="comment">// Reimplementation of compulsory operatios</span> 
    71 <a name="l00109"></a>00109  
    72 <a name="l00110"></a>00110         <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#b223484796661f2dadb5607a86ce0581">opupdt</a>( <span class="keyword">const</span> vec &amp;v, <span class="keywordtype">double</span> w ); 
    73 <a name="l00111"></a>00111         mat <a class="code" href="classsqmat.html#9a5b6fddfeb42339e1dc9b978a2590fc" title="Conversion to full matrix.">to_mat</a>(); 
    74 <a name="l00112"></a>00112    <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#faa3bc90be142adde9cf74f573c70157" title="Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C&amp;#39;$.">mult_sym</a>( <span class="keyword">const</span> mat &amp;C, <span class="keywordtype">bool</span> trans=<span class="keyword">false</span> ); 
    75 <a name="l00113"></a>00113         <span class="keywordtype">void</span> <span class="keyword">add</span> ( <span class="keyword">const</span> ldmat &amp;ld2, <span class="keywordtype">double</span> w=1.0 ); 
    76 <a name="l00114"></a>00114         <span class="keywordtype">double</span> <a class="code" href="classsqmat.html#5c852819589f74cdaefbd648c0ce8547" title="Logarithm of a determinant.">logdet</a>(); 
    77 <a name="l00115"></a>00115         <span class="keywordtype">double</span> <a class="code" href="classsqmat.html#44e079468bc8bfccf634dc85b32ba6be" title="Evaluates quadratic form $x= v&amp;#39;*V*v$;.">qform</a>(vec &amp;v); 
    78 <a name="l00116"></a>00116 <span class="comment">//      sqmat&amp; operator -= ( const sqmat &amp; ld2 );</span> 
    79 <a name="l00117"></a>00117         <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#6fca246f9eabbdeb8cac03030e826b5e" title="Clearing matrix so that it corresponds to zeros.">clear</a>(); 
    80 <a name="l00118"></a>00118         <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#743d3799d9e73403230c54e14ecf09ed" title="Reimplementing common functions of mat: cols().">cols</a>(); 
    81 <a name="l00119"></a>00119         <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#f59664a4be09450f8c6ce3f5e5ab2dc7" title="Reimplementing common functions of mat: cols().">rows</a>(); 
    82 <a name="l00120"></a>00120  
    83 <a name="l00126"></a>00126         <span class="keyword">virtual</span> <span class="keywordtype">void</span> inv(ldmat &amp;Inv); 
    84 <a name="l00127"></a>00127          
    85 <a name="l00133"></a>00133    <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#faa3bc90be142adde9cf74f573c70157" title="Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C&amp;#39;$.">mult_sym</a>( <span class="keyword">const</span> mat &amp;C, ldmat &amp;U, <span class="keywordtype">bool</span> trans=<span class="keyword">false</span> ); 
    86 <a name="l00134"></a>00134  
    87 <a name="l00135"></a>00135         ldmat&amp; operator += (<span class="keyword">const</span> ldmat &amp;ldA); 
    88 <a name="l00136"></a>00136         ldmat&amp; operator -= (<span class="keyword">const</span> ldmat &amp;ldA); 
    89 <a name="l00137"></a>00137         ldmat&amp; operator *= (<span class="keywordtype">double</span> x); 
    90 <a name="l00138"></a>00138          
    91 <a name="l00139"></a>00139 <span class="keyword">protected</span>: 
    92 <a name="l00140"></a>00140         vec D; 
    93 <a name="l00141"></a>00141         mat L; 
    94 <a name="l00142"></a>00142  
    95 <a name="l00143"></a>00143 }; 
    96 <a name="l00144"></a>00144  
    97 <a name="l00146"></a>00146  
    98 <a name="l00147"></a>00147 <span class="keyword">inline</span> ldmat&amp; ldmat::operator += (<span class="keyword">const</span> ldmat &amp;ldA)  {this-&gt;<span class="keyword">add</span>(ldA);<span class="keywordflow">return</span> *<span class="keyword">this</span>;} 
    99 <a name="l00148"></a>00148 <span class="keyword">inline</span> ldmat&amp; ldmat::operator -= (<span class="keyword">const</span> ldmat &amp;ldA)  {this-&gt;<span class="keyword">add</span>(ldA,-1.0);<span class="keywordflow">return</span> *<span class="keyword">this</span>;} 
    100 <a name="l00149"></a>00149 <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#743d3799d9e73403230c54e14ecf09ed" title="Reimplementing common functions of mat: cols().">ldmat::cols</a>(){<span class="keywordflow">return</span> L.cols();} 
    101 <a name="l00150"></a>00150 <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#f59664a4be09450f8c6ce3f5e5ab2dc7" title="Reimplementing common functions of mat: cols().">ldmat::rows</a>(){<span class="keywordflow">return</span> L.rows();} 
    102 <a name="l00151"></a>00151  
    103 <a name="l00152"></a>00152 <span class="preprocessor">#endif // DC_H</span> 
    104 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Wed Jan 23 11:30:10 2008 for mixpp by&nbsp; 
     45<a name="l00076"></a>00076         <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#f59664a4be09450f8c6ce3f5e5ab2dc7" title="Reimplementing common functions of mat: cols().">rows</a>() =0; 
     46<a name="l00077"></a>00077  
     47<a name="l00078"></a>00078 <span class="keyword">protected</span>: 
     48<a name="l00079"></a>00079         <span class="keywordtype">int</span> dim; 
     49<a name="l00080"></a>00080 }; 
     50<a name="l00081"></a>00081  
     51<a name="l00082"></a>00082  
     52<a name="l00087"></a><a class="code" href="classfsqmat.html">00087</a> <span class="keyword">class </span><a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a>: <a class="code" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</a> { 
     53<a name="l00088"></a>00088         <span class="keywordtype">void</span> opupdt( <span class="keyword">const</span> vec &amp;v, <span class="keywordtype">double</span> w ); 
     54<a name="l00089"></a>00089         mat to_mat(); 
     55<a name="l00090"></a>00090         <span class="keywordtype">void</span> mult_sym( <span class="keyword">const</span> mat &amp;C, <span class="keywordtype">bool</span> trans=<span class="keyword">false</span> ); 
     56<a name="l00091"></a>00091    <span class="keywordtype">void</span> mult_sym( <span class="keyword">const</span> mat &amp;C, <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &amp;U, <span class="keywordtype">bool</span> trans=<span class="keyword">false</span> ); 
     57<a name="l00092"></a>00092         <span class="keywordtype">void</span> inv(<a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &amp;Inv); 
     58<a name="l00093"></a>00093         <span class="keywordtype">void</span> clear(); 
     59<a name="l00094"></a>00094          
     60<a name="l00095"></a>00095          
     61<a name="l00097"></a>00097         <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a>(<span class="keyword">const</span> mat &amp;M); 
     62<a name="l00098"></a>00098          
     63<a name="l00104"></a>00104         <span class="keyword">virtual</span> <span class="keywordtype">void</span> inv(<a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a>* Inv); 
     64<a name="l00105"></a>00105          
     65<a name="l00106"></a>00106  
     66<a name="l00107"></a>00107 }; 
     67<a name="l00108"></a>00108  
     68<a name="l00109"></a>00109 <span class="keyword">class </span>ldmat: <a class="code" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</a> { 
     69<a name="l00110"></a>00110 <span class="keyword">public</span>: 
     70<a name="l00111"></a>00111  
     71<a name="l00113"></a>00113         ldmat( <span class="keyword">const</span> mat &amp;L, <span class="keyword">const</span> vec &amp;D ); 
     72<a name="l00115"></a>00115         ldmat( mat V ); 
     73<a name="l00117"></a>00117         ldmat( vec D0 ); 
     74<a name="l00118"></a>00118         ldmat (); 
     75<a name="l00119"></a>00119  
     76<a name="l00120"></a>00120         <span class="comment">// Reimplementation of compulsory operatios</span> 
     77<a name="l00121"></a>00121  
     78<a name="l00122"></a>00122         <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#b223484796661f2dadb5607a86ce0581">opupdt</a>( <span class="keyword">const</span> vec &amp;v, <span class="keywordtype">double</span> w ); 
     79<a name="l00123"></a>00123         mat <a class="code" href="classsqmat.html#9a5b6fddfeb42339e1dc9b978a2590fc" title="Conversion to full matrix.">to_mat</a>(); 
     80<a name="l00124"></a>00124    <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#faa3bc90be142adde9cf74f573c70157" title="Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C&amp;#39;$.">mult_sym</a>( <span class="keyword">const</span> mat &amp;C, <span class="keywordtype">bool</span> trans=<span class="keyword">false</span> ); 
     81<a name="l00125"></a>00125         <span class="keywordtype">void</span> <span class="keyword">add</span> ( <span class="keyword">const</span> ldmat &amp;ld2, <span class="keywordtype">double</span> w=1.0 ); 
     82<a name="l00126"></a>00126         <span class="keywordtype">double</span> <a class="code" href="classsqmat.html#5c852819589f74cdaefbd648c0ce8547" title="Logarithm of a determinant.">logdet</a>(); 
     83<a name="l00127"></a>00127         <span class="keywordtype">double</span> <a class="code" href="classsqmat.html#44e079468bc8bfccf634dc85b32ba6be" title="Evaluates quadratic form $x= v&amp;#39;*V*v$;.">qform</a>(vec &amp;v); 
     84<a name="l00128"></a>00128 <span class="comment">//      sqmat&amp; operator -= ( const sqmat &amp; ld2 );</span> 
     85<a name="l00129"></a>00129         <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#6fca246f9eabbdeb8cac03030e826b5e" title="Clearing matrix so that it corresponds to zeros.">clear</a>(); 
     86<a name="l00130"></a>00130         <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#743d3799d9e73403230c54e14ecf09ed" title="Reimplementing common functions of mat: cols().">cols</a>(); 
     87<a name="l00131"></a>00131         <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#f59664a4be09450f8c6ce3f5e5ab2dc7" title="Reimplementing common functions of mat: cols().">rows</a>(); 
     88<a name="l00132"></a>00132         vec <a class="code" href="classsqmat.html#b5236c8a050199e1a9d338b0da1a08d2" title="Multiplies square root of $V$ by vector $x$.">sqrt_mult</a>(vec &amp;v); 
     89<a name="l00133"></a>00133  
     90<a name="l00139"></a>00139         <span class="keyword">virtual</span> <span class="keywordtype">void</span> inv(ldmat &amp;Inv); 
     91<a name="l00140"></a>00140          
     92<a name="l00146"></a>00146    <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#faa3bc90be142adde9cf74f573c70157" title="Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C&amp;#39;$.">mult_sym</a>( <span class="keyword">const</span> mat &amp;C, ldmat &amp;U, <span class="keywordtype">bool</span> trans=<span class="keyword">false</span> ); 
     93<a name="l00147"></a>00147  
     94<a name="l00156"></a>00156    <span class="keywordtype">void</span> ldform( mat &amp;A, vec &amp;D0 ); 
     95<a name="l00157"></a>00157  
     96<a name="l00158"></a>00158         ldmat&amp; operator += (<span class="keyword">const</span> ldmat &amp;ldA); 
     97<a name="l00159"></a>00159         ldmat&amp; operator -= (<span class="keyword">const</span> ldmat &amp;ldA); 
     98<a name="l00160"></a>00160         ldmat&amp; operator *= (<span class="keywordtype">double</span> x); 
     99<a name="l00161"></a>00161          
     100<a name="l00162"></a>00162         <span class="keyword">friend</span> std::ostream &amp;operator&lt;&lt; ( std::ostream &amp;os, ldmat &amp;sq ); 
     101<a name="l00163"></a>00163  
     102<a name="l00164"></a>00164 <span class="keyword">protected</span>: 
     103<a name="l00165"></a>00165         vec D; 
     104<a name="l00166"></a>00166         mat L; 
     105<a name="l00167"></a>00167  
     106<a name="l00168"></a>00168 }; 
     107<a name="l00169"></a>00169  
     108<a name="l00171"></a>00171  
     109<a name="l00172"></a>00172 <span class="keyword">inline</span> ldmat&amp; ldmat::operator += (<span class="keyword">const</span> ldmat &amp;ldA)  {this-&gt;<span class="keyword">add</span>(ldA);<span class="keywordflow">return</span> *<span class="keyword">this</span>;} 
     110<a name="l00173"></a>00173 <span class="keyword">inline</span> ldmat&amp; ldmat::operator -= (<span class="keyword">const</span> ldmat &amp;ldA)  {this-&gt;<span class="keyword">add</span>(ldA,-1.0);<span class="keywordflow">return</span> *<span class="keyword">this</span>;} 
     111<a name="l00174"></a>00174 <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#743d3799d9e73403230c54e14ecf09ed" title="Reimplementing common functions of mat: cols().">ldmat::cols</a>(){<span class="keywordflow">return</span> dim;} 
     112<a name="l00175"></a>00175 <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#f59664a4be09450f8c6ce3f5e5ab2dc7" title="Reimplementing common functions of mat: cols().">ldmat::rows</a>(){<span class="keywordflow">return</span> dim;} 
     113<a name="l00176"></a>00176  
     114<a name="l00177"></a>00177 <span class="preprocessor">#endif // DC_H</span> 
     115</pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Fri Feb 15 18:57:36 2008 for mixpp by&nbsp; 
    105116<a href="http://www.doxygen.org/index.html"> 
    106117<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>