| 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: chmat 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.3 --> | 
|---|
| 8 | <div class="tabs"> | 
|---|
| 9 |   <ul> | 
|---|
| 10 |     <li><a href="index.html"><span>Main Page</span></a></li> | 
|---|
| 11 |     <li class="current"><a href="annotated.html"><span>Classes</span></a></li> | 
|---|
| 12 |     <li><a href="files.html"><span>Files</span></a></li> | 
|---|
| 13 |     <li><a href="pages.html"><span>Related Pages</span></a></li> | 
|---|
| 14 |   </ul> | 
|---|
| 15 | </div> | 
|---|
| 16 | <div class="tabs"> | 
|---|
| 17 |   <ul> | 
|---|
| 18 |     <li><a href="annotated.html"><span>Class List</span></a></li> | 
|---|
| 19 |     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> | 
|---|
| 20 |     <li><a href="functions.html"><span>Class Members</span></a></li> | 
|---|
| 21 |   </ul> | 
|---|
| 22 | </div> | 
|---|
| 23 | <h1>chmat Class Reference</h1><!-- doxytag: class="chmat" --><!-- doxytag: inherits="sqmat" -->Symmetric matrix stored in square root decomposition using upper cholesky.   | 
|---|
| 24 | <a href="#_details">More...</a> | 
|---|
| 25 | <p> | 
|---|
| 26 | <code>#include <<a class="el" href="chmat_8h-source.html">chmat.h</a>></code> | 
|---|
| 27 | <p> | 
|---|
| 28 | <div class="dynheader"> | 
|---|
| 29 | Inheritance diagram for chmat:</div> | 
|---|
| 30 | <div class="dynsection"> | 
|---|
| 31 | <p><center><img src="classchmat__inherit__graph.png" border="0" usemap="#chmat__inherit__map" alt="Inheritance graph"></center> | 
|---|
| 32 | <map name="chmat__inherit__map"> | 
|---|
| 33 | <area shape="rect" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form..." alt="" coords="5,7,67,33"></map> | 
|---|
| 34 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> | 
|---|
| 35 | <div class="dynheader"> | 
|---|
| 36 | Collaboration diagram for chmat:</div> | 
|---|
| 37 | <div class="dynsection"> | 
|---|
| 38 | <p><center><img src="classchmat__coll__graph.png" border="0" usemap="#chmat__coll__map" alt="Collaboration graph"></center> | 
|---|
| 39 | <map name="chmat__coll__map"> | 
|---|
| 40 | <area shape="rect" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form..." alt="" coords="5,7,67,33"></map> | 
|---|
| 41 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> | 
|---|
| 42 |  | 
|---|
| 43 | <p> | 
|---|
| 44 | <a href="classchmat-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> | 
|---|
| 45 | <tr><td></td></tr> | 
|---|
| 46 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> | 
|---|
| 47 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classchmat.html#bbc2d98d7455b1f38828907d442836bf">opupdt</a> (const vec &v, double w)</td></tr> | 
|---|
| 48 |  | 
|---|
| 49 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a37e2c726e4fc3ad50b26ac2ca6c1452"></a><!-- doxytag: member="chmat::to_mat" ref="a37e2c726e4fc3ad50b26ac2ca6c1452" args="()" --> | 
|---|
| 50 | virtual mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classchmat.html#a37e2c726e4fc3ad50b26ac2ca6c1452">to_mat</a> ()</td></tr> | 
|---|
| 51 |  | 
|---|
| 52 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Conversion to full matrix. <br></td></tr> | 
|---|
| 53 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classchmat.html#66f509f92b0ccf020e2a2a32566e0777">mult_sym</a> (const mat &C)</td></tr> | 
|---|
| 54 |  | 
|---|
| 55 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C'$.  <a href="#66f509f92b0ccf020e2a2a32566e0777"></a><br></td></tr> | 
|---|
| 56 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classchmat.html#07f50d1332b901eee962e8b1913102f7">mult_sym_t</a> (const mat &C)</td></tr> | 
|---|
| 57 |  | 
|---|
| 58 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Inplace symmetric multiplication by a SQUARE transpose of matrix $C$, i.e. $V = C'*V*C$.  <a href="#07f50d1332b901eee962e8b1913102f7"></a><br></td></tr> | 
|---|
| 59 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b504ca818203b13e667cb3c503980382"></a><!-- doxytag: member="chmat::logdet" ref="b504ca818203b13e667cb3c503980382" args="() const " --> | 
|---|
| 60 | virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classchmat.html#b504ca818203b13e667cb3c503980382">logdet</a> () const </td></tr> | 
|---|
| 61 |  | 
|---|
| 62 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Logarithm of a determinant. <br></td></tr> | 
|---|
| 63 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classchmat.html#b22aa239dbaca33e3fb93b4f674d7051">sqrt_mult</a> (const vec &v) const </td></tr> | 
|---|
| 64 |  | 
|---|
| 65 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiplies square root of $V$ by vector $x$.  <a href="#b22aa239dbaca33e3fb93b4f674d7051"></a><br></td></tr> | 
|---|
| 66 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6807737c7ffdb7041256b51db7592248"></a><!-- doxytag: member="chmat::qform" ref="6807737c7ffdb7041256b51db7592248" args="(const vec &v) const " --> | 
|---|
| 67 | virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classchmat.html#6807737c7ffdb7041256b51db7592248">qform</a> (const vec &v) const </td></tr> | 
|---|
| 68 |  | 
|---|
| 69 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Evaluates quadratic form $x= v'*V*v$;. <br></td></tr> | 
|---|
| 70 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d0a995d312ecc11d3b43693f5e224ba9"></a><!-- doxytag: member="chmat::clear" ref="d0a995d312ecc11d3b43693f5e224ba9" args="()" --> | 
|---|
| 71 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classchmat.html#d0a995d312ecc11d3b43693f5e224ba9">clear</a> ()</td></tr> | 
|---|
| 72 |  | 
|---|
| 73 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Clearing matrix so that it corresponds to zeros. <br></td></tr> | 
|---|
| 74 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9875dc244d23ccec039fd2e5447a9cf7"></a><!-- doxytag: member="chmat::inv" ref="9875dc244d23ccec039fd2e5447a9cf7" args="(mat &Inv)" --> | 
|---|
| 75 | virtual void </td><td class="memItemRight" valign="bottom"><b>inv</b> (mat &Inv)</td></tr> | 
|---|
| 76 |  | 
|---|
| 77 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="465a895ce060429a35ee451182aa546a"></a><!-- doxytag: member="chmat::inv" ref="465a895ce060429a35ee451182aa546a" args="(chmat &Inv)" --> | 
|---|
| 78 | virtual void </td><td class="memItemRight" valign="bottom"><b>inv</b> (<a class="el" href="classchmat.html">chmat</a> &Inv)</td></tr> | 
|---|
| 79 |  | 
|---|
| 80 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ba62fbf7cb8e065a4f3d24457824e89b"></a><!-- doxytag: member="chmat::~chmat" ref="ba62fbf7cb8e065a4f3d24457824e89b" args="()" --> | 
|---|
| 81 | virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classchmat.html#ba62fbf7cb8e065a4f3d24457824e89b">~chmat</a> ()</td></tr> | 
|---|
| 82 |  | 
|---|
| 83 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor for future use;. <br></td></tr> | 
|---|
| 84 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fdd73b0c596161637fd25bdf2c670c39"></a><!-- doxytag: member="chmat::chmat" ref="fdd73b0c596161637fd25bdf2c670c39" args="(const int dim0)" --> | 
|---|
| 85 |  </td><td class="memItemRight" valign="bottom"><a class="el" href="classchmat.html#fdd73b0c596161637fd25bdf2c670c39">chmat</a> (const int dim0)</td></tr> | 
|---|
| 86 |  | 
|---|
| 87 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr> | 
|---|
| 88 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8334a00f30f0a05f893c2aeec395ef10"></a><!-- doxytag: member="chmat::chmat" ref="8334a00f30f0a05f893c2aeec395ef10" args="(const mat &M)" --> | 
|---|
| 89 |  </td><td class="memItemRight" valign="bottom"><a class="el" href="classchmat.html#8334a00f30f0a05f893c2aeec395ef10">chmat</a> (const mat &M)</td></tr> | 
|---|
| 90 |  | 
|---|
| 91 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor (m3k:cholform). <br></td></tr> | 
|---|
| 92 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9c50d31c999d85d8e9d8cf2b69b6ac8c"></a><!-- doxytag: member="chmat::_Ch" ref="9c50d31c999d85d8e9d8cf2b69b6ac8c" args="()" --> | 
|---|
| 93 | mat & </td><td class="memItemRight" valign="bottom"><a class="el" href="classchmat.html#9c50d31c999d85d8e9d8cf2b69b6ac8c">_Ch</a> ()</td></tr> | 
|---|
| 94 |  | 
|---|
| 95 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Access function. <br></td></tr> | 
|---|
| 96 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ecc2e2540f95a04f4449842588170f5b"></a><!-- doxytag: member="chmat::cols" ref="ecc2e2540f95a04f4449842588170f5b" args="() const " --> | 
|---|
| 97 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classsqmat.html#ecc2e2540f95a04f4449842588170f5b">cols</a> () const </td></tr> | 
|---|
| 98 |  | 
|---|
| 99 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Reimplementing common functions of mat: <a class="el" href="classsqmat.html#ecc2e2540f95a04f4449842588170f5b" title="Reimplementing common functions of mat: cols().">cols()</a>. <br></td></tr> | 
|---|
| 100 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="071e80ced9cc3b8cbb360fa7462eb646"></a><!-- doxytag: member="chmat::rows" ref="071e80ced9cc3b8cbb360fa7462eb646" args="() const " --> | 
|---|
| 101 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classsqmat.html#071e80ced9cc3b8cbb360fa7462eb646">rows</a> () const </td></tr> | 
|---|
| 102 |  | 
|---|
| 103 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Reimplementing common functions of mat: <a class="el" href="classsqmat.html#ecc2e2540f95a04f4449842588170f5b" title="Reimplementing common functions of mat: cols().">cols()</a>. <br></td></tr> | 
|---|
| 104 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> | 
|---|
| 105 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="95158bb150f5e7f939168abcd577fd9c"></a><!-- doxytag: member="chmat::Ch" ref="95158bb150f5e7f939168abcd577fd9c" args="" --> | 
|---|
| 106 | mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classchmat.html#95158bb150f5e7f939168abcd577fd9c">Ch</a></td></tr> | 
|---|
| 107 |  | 
|---|
| 108 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Upper chollesky triangle of the matrix. <br></td></tr> | 
|---|
| 109 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0abed904bdc0882373ba9adba919689d"></a><!-- doxytag: member="chmat::dim" ref="0abed904bdc0882373ba9adba919689d" args="" --> | 
|---|
| 110 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classsqmat.html#0abed904bdc0882373ba9adba919689d">dim</a></td></tr> | 
|---|
| 111 |  | 
|---|
| 112 | <tr><td class="mdescLeft"> </td><td class="mdescRight">dimension of the square matrix <br></td></tr> | 
|---|
| 113 | </table> | 
|---|
| 114 | <hr><a name="_details"></a><h2>Detailed Description</h2> | 
|---|
| 115 | Symmetric matrix stored in square root decomposition using upper cholesky.  | 
|---|
| 116 | <p> | 
|---|
| 117 | This matrix represent $A=Ch Ch'$ where only the upper triangle is stored; <hr><h2>Member Function Documentation</h2> | 
|---|
| 118 | <a class="anchor" name="bbc2d98d7455b1f38828907d442836bf"></a><!-- doxytag: member="chmat::opupdt" ref="bbc2d98d7455b1f38828907d442836bf" args="(const vec &v, double w)" --> | 
|---|
| 119 | <div class="memitem"> | 
|---|
| 120 | <div class="memproto"> | 
|---|
| 121 |       <table class="memname"> | 
|---|
| 122 |         <tr> | 
|---|
| 123 |           <td class="memname">void chmat::opupdt           </td> | 
|---|
| 124 |           <td>(</td> | 
|---|
| 125 |           <td class="paramtype">const vec & </td> | 
|---|
| 126 |           <td class="paramname"> <em>v</em>, </td> | 
|---|
| 127 |         </tr> | 
|---|
| 128 |         <tr> | 
|---|
| 129 |           <td class="paramkey"></td> | 
|---|
| 130 |           <td></td> | 
|---|
| 131 |           <td class="paramtype">double </td> | 
|---|
| 132 |           <td class="paramname"> <em>w</em></td><td> </td> | 
|---|
| 133 |         </tr> | 
|---|
| 134 |         <tr> | 
|---|
| 135 |           <td></td> | 
|---|
| 136 |           <td>)</td> | 
|---|
| 137 |           <td></td><td></td><td width="100%"><code> [virtual]</code></td> | 
|---|
| 138 |         </tr> | 
|---|
| 139 |       </table> | 
|---|
| 140 | </div> | 
|---|
| 141 | <div class="memdoc"> | 
|---|
| 142 |  | 
|---|
| 143 | <p> | 
|---|
| 144 | Perfroms a rank-1 update by outer product of vectors: $V = V + w v v'$. <dl compact><dt><b>Parameters:</b></dt><dd> | 
|---|
| 145 |   <table border="0" cellspacing="2" cellpadding="0"> | 
|---|
| 146 |     <tr><td valign="top"></td><td valign="top"><em>v</em> </td><td>Vector forming the outer product to be added </td></tr> | 
|---|
| 147 |     <tr><td valign="top"></td><td valign="top"><em>w</em> </td><td>weight of updating; can be negative</td></tr> | 
|---|
| 148 |   </table> | 
|---|
| 149 | </dl> | 
|---|
| 150 | BLAS-2b operation.  | 
|---|
| 151 | <p>Implements <a class="el" href="classsqmat.html#b223484796661f2dadb5607a86ce0581">sqmat</a>.</p> | 
|---|
| 152 |  | 
|---|
| 153 | </div> | 
|---|
| 154 | </div><p> | 
|---|
| 155 | <a class="anchor" name="66f509f92b0ccf020e2a2a32566e0777"></a><!-- doxytag: member="chmat::mult_sym" ref="66f509f92b0ccf020e2a2a32566e0777" args="(const mat &C)" --> | 
|---|
| 156 | <div class="memitem"> | 
|---|
| 157 | <div class="memproto"> | 
|---|
| 158 |       <table class="memname"> | 
|---|
| 159 |         <tr> | 
|---|
| 160 |           <td class="memname">void chmat::mult_sym           </td> | 
|---|
| 161 |           <td>(</td> | 
|---|
| 162 |           <td class="paramtype">const mat & </td> | 
|---|
| 163 |           <td class="paramname"> <em>C</em>          </td> | 
|---|
| 164 |           <td> ) </td> | 
|---|
| 165 |           <td width="100%"><code> [virtual]</code></td> | 
|---|
| 166 |         </tr> | 
|---|
| 167 |       </table> | 
|---|
| 168 | </div> | 
|---|
| 169 | <div class="memdoc"> | 
|---|
| 170 |  | 
|---|
| 171 | <p> | 
|---|
| 172 | Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C'$.  | 
|---|
| 173 | <p> | 
|---|
| 174 | <dl compact><dt><b>Parameters:</b></dt><dd> | 
|---|
| 175 |   <table border="0" cellspacing="2" cellpadding="0"> | 
|---|
| 176 |     <tr><td valign="top"></td><td valign="top"><em>C</em> </td><td>multiplying matrix, </td></tr> | 
|---|
| 177 |   </table> | 
|---|
| 178 | </dl> | 
|---|
| 179 |  | 
|---|
| 180 | <p>Implements <a class="el" href="classsqmat.html#60fbbfa9e483b8187c135f787ee53afa">sqmat</a>.</p> | 
|---|
| 181 |  | 
|---|
| 182 | </div> | 
|---|
| 183 | </div><p> | 
|---|
| 184 | <a class="anchor" name="07f50d1332b901eee962e8b1913102f7"></a><!-- doxytag: member="chmat::mult_sym_t" ref="07f50d1332b901eee962e8b1913102f7" args="(const mat &C)" --> | 
|---|
| 185 | <div class="memitem"> | 
|---|
| 186 | <div class="memproto"> | 
|---|
| 187 |       <table class="memname"> | 
|---|
| 188 |         <tr> | 
|---|
| 189 |           <td class="memname">void chmat::mult_sym_t           </td> | 
|---|
| 190 |           <td>(</td> | 
|---|
| 191 |           <td class="paramtype">const mat & </td> | 
|---|
| 192 |           <td class="paramname"> <em>C</em>          </td> | 
|---|
| 193 |           <td> ) </td> | 
|---|
| 194 |           <td width="100%"><code> [virtual]</code></td> | 
|---|
| 195 |         </tr> | 
|---|
| 196 |       </table> | 
|---|
| 197 | </div> | 
|---|
| 198 | <div class="memdoc"> | 
|---|
| 199 |  | 
|---|
| 200 | <p> | 
|---|
| 201 | Inplace symmetric multiplication by a SQUARE transpose of matrix $C$, i.e. $V = C'*V*C$.  | 
|---|
| 202 | <p> | 
|---|
| 203 | <dl compact><dt><b>Parameters:</b></dt><dd> | 
|---|
| 204 |   <table border="0" cellspacing="2" cellpadding="0"> | 
|---|
| 205 |     <tr><td valign="top"></td><td valign="top"><em>C</em> </td><td>multiplying matrix, </td></tr> | 
|---|
| 206 |   </table> | 
|---|
| 207 | </dl> | 
|---|
| 208 |  | 
|---|
| 209 | <p>Implements <a class="el" href="classsqmat.html#6909e906da17725b1b80f3cae7cf3325">sqmat</a>.</p> | 
|---|
| 210 |  | 
|---|
| 211 | </div> | 
|---|
| 212 | </div><p> | 
|---|
| 213 | <a class="anchor" name="b22aa239dbaca33e3fb93b4f674d7051"></a><!-- doxytag: member="chmat::sqrt_mult" ref="b22aa239dbaca33e3fb93b4f674d7051" args="(const vec &v) const " --> | 
|---|
| 214 | <div class="memitem"> | 
|---|
| 215 | <div class="memproto"> | 
|---|
| 216 |       <table class="memname"> | 
|---|
| 217 |         <tr> | 
|---|
| 218 |           <td class="memname">vec chmat::sqrt_mult           </td> | 
|---|
| 219 |           <td>(</td> | 
|---|
| 220 |           <td class="paramtype">const vec & </td> | 
|---|
| 221 |           <td class="paramname"> <em>v</em>          </td> | 
|---|
| 222 |           <td> ) </td> | 
|---|
| 223 |           <td width="100%"> const<code> [inline, virtual]</code></td> | 
|---|
| 224 |         </tr> | 
|---|
| 225 |       </table> | 
|---|
| 226 | </div> | 
|---|
| 227 | <div class="memdoc"> | 
|---|
| 228 |  | 
|---|
| 229 | <p> | 
|---|
| 230 | Multiplies square root of $V$ by vector $x$.  | 
|---|
| 231 | <p> | 
|---|
| 232 | Used e.g. in generating normal samples.  | 
|---|
| 233 | <p>Implements <a class="el" href="classsqmat.html#6b79438b5d7544a9c8e110a145355d8f">sqmat</a>.</p> | 
|---|
| 234 |  | 
|---|
| 235 | </div> | 
|---|
| 236 | </div><p> | 
|---|
| 237 | <hr>The documentation for this class was generated from the following files:<ul> | 
|---|
| 238 | <li>work/mixpp/bdm/math/<a class="el" href="chmat_8h-source.html">chmat.h</a><li>work/mixpp/bdm/math/chmat.cpp</ul> | 
|---|
| 239 | <hr size="1"><address style="text-align: right;"><small>Generated on Wed Mar 12 16:15:49 2008 for mixpp by  | 
|---|
| 240 | <a href="http://www.doxygen.org/index.html"> | 
|---|
| 241 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> | 
|---|
| 242 | </body> | 
|---|
| 243 | </html> | 
|---|