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: work/mixpp/bdm/math/chmat.h Source File</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><a href="annotated.html"><span>Classes</span></a></li> |
---|
12 | <li class="current"><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 | <h1>work/mixpp/bdm/math/chmat.h</h1><a href="chmat_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 |
---|
17 | <a name="l00013"></a>00013 <span class="preprocessor">#ifndef CHMAT_H</span> |
---|
18 | <a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define CHMAT_H</span> |
---|
19 | <a name="l00015"></a>00015 <span class="preprocessor"></span> |
---|
20 | <a name="l00016"></a>00016 <span class="preprocessor">#include <itpp/itbase.h></span> |
---|
21 | <a name="l00017"></a>00017 <span class="preprocessor">#include "<a class="code" href="libDC_8h.html" title="Matrices in decomposed forms (LDL&#39;, LU, UDU&#39;, etc).">libDC.h</a>"</span> |
---|
22 | <a name="l00018"></a>00018 |
---|
23 | <a name="l00019"></a>00019 <span class="keyword">using namespace </span>itpp; |
---|
24 | <a name="l00020"></a>00020 |
---|
25 | <a name="l00026"></a><a class="code" href="classchmat.html">00026</a> <span class="keyword">class </span><a class="code" href="classchmat.html" title="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</a> : <span class="keyword">public</span> <a class="code" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</a> { |
---|
26 | <a name="l00027"></a>00027 <span class="keyword">protected</span>: |
---|
27 | <a name="l00029"></a><a class="code" href="classchmat.html#95158bb150f5e7f939168abcd577fd9c">00029</a> mat <a class="code" href="classchmat.html#95158bb150f5e7f939168abcd577fd9c" title="Upper chollesky triangle of the matrix.">Ch</a>; |
---|
28 | <a name="l00030"></a>00030 <span class="keyword">public</span>: |
---|
29 | <a name="l00031"></a>00031 |
---|
30 | <a name="l00032"></a>00032 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classchmat.html#bbc2d98d7455b1f38828907d442836bf">opupdt</a> ( <span class="keyword">const</span> vec &v, <span class="keywordtype">double</span> w ); |
---|
31 | <a name="l00033"></a>00033 <span class="keyword">virtual</span> mat <a class="code" href="classchmat.html#a37e2c726e4fc3ad50b26ac2ca6c1452" title="Conversion to full matrix.">to_mat</a>(); |
---|
32 | <a name="l00034"></a>00034 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classchmat.html#66f509f92b0ccf020e2a2a32566e0777" title="Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C&#39;$.">mult_sym</a> ( <span class="keyword">const</span> mat &C ); |
---|
33 | <a name="l00035"></a>00035 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classchmat.html#07f50d1332b901eee962e8b1913102f7" title="Inplace symmetric multiplication by a SQUARE transpose of matrix $C$, i.e. $V = C&#39;*V*C$...">mult_sym_t</a> ( <span class="keyword">const</span> mat &C ); |
---|
34 | <a name="l00036"></a>00036 <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classchmat.html#b504ca818203b13e667cb3c503980382" title="Logarithm of a determinant.">logdet</a>() <span class="keyword">const</span>; |
---|
35 | <a name="l00037"></a>00037 <span class="keyword">virtual</span> vec <a class="code" href="classchmat.html#b22aa239dbaca33e3fb93b4f674d7051" title="Multiplies square root of $V$ by vector $x$.">sqrt_mult</a> ( <span class="keyword">const</span> vec &v ) <span class="keyword">const</span>; |
---|
36 | <a name="l00038"></a>00038 <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classchmat.html#6807737c7ffdb7041256b51db7592248" title="Evaluates quadratic form $x= v&#39;*V*v$;.">qform</a> ( <span class="keyword">const</span> vec &v ) <span class="keyword">const</span>; |
---|
37 | <a name="l00039"></a>00039 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classchmat.html#d0a995d312ecc11d3b43693f5e224ba9" title="Clearing matrix so that it corresponds to zeros.">clear</a>(); |
---|
38 | <a name="l00040"></a>00040 <span class="comment">//extra defs</span> |
---|
39 | <a name="l00041"></a>00041 <span class="keyword">virtual</span> <span class="keywordtype">void</span> inv ( mat &Inv ); |
---|
40 | <a name="l00042"></a>00042 <span class="keyword">virtual</span> <span class="keywordtype">void</span> inv ( <a class="code" href="classchmat.html" title="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</a> &Inv ); |
---|
41 | <a name="l00043"></a>00043 |
---|
42 | <a name="l00045"></a><a class="code" href="classchmat.html#ba62fbf7cb8e065a4f3d24457824e89b">00045</a> <span class="keyword">virtual</span> <a class="code" href="classchmat.html#ba62fbf7cb8e065a4f3d24457824e89b" title="Destructor for future use;.">~chmat</a>() {}; |
---|
43 | <a name="l00047"></a><a class="code" href="classchmat.html#fdd73b0c596161637fd25bdf2c670c39">00047</a> <a class="code" href="classchmat.html#fdd73b0c596161637fd25bdf2c670c39" title="Default constructor.">chmat</a> ( <span class="keyword">const</span> <span class="keywordtype">int</span> dim0 ) : <a class="code" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</a> ( dim0 ),<a class="code" href="classchmat.html#95158bb150f5e7f939168abcd577fd9c" title="Upper chollesky triangle of the matrix.">Ch</a> ( dim0,dim0 ) {}; |
---|
44 | <a name="l00049"></a><a class="code" href="classchmat.html#8334a00f30f0a05f893c2aeec395ef10">00049</a> <a class="code" href="classchmat.html#fdd73b0c596161637fd25bdf2c670c39" title="Default constructor.">chmat</a> ( <span class="keyword">const</span> mat &M ) : <a class="code" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</a> ( M.<a class="code" href="classsqmat.html#071e80ced9cc3b8cbb360fa7462eb646" title="Reimplementing common functions of mat: cols().">rows</a>() ),<a class="code" href="classchmat.html#95158bb150f5e7f939168abcd577fd9c" title="Upper chollesky triangle of the matrix.">Ch</a> ( M.<a class="code" href="classsqmat.html#071e80ced9cc3b8cbb360fa7462eb646" title="Reimplementing common functions of mat: cols().">rows</a>(),M.<a class="code" href="classsqmat.html#ecc2e2540f95a04f4449842588170f5b" title="Reimplementing common functions of mat: cols().">cols</a>() ) { |
---|
45 | <a name="l00050"></a>00050 mat Q; |
---|
46 | <a name="l00051"></a>00051 it_assert_debug ( M.rows() ==M.cols(),<span class="stringliteral">"chmat:: input matrix must be square!"</span> ); |
---|
47 | <a name="l00052"></a>00052 <a class="code" href="classchmat.html#95158bb150f5e7f939168abcd577fd9c" title="Upper chollesky triangle of the matrix.">Ch</a>=chol ( M ); |
---|
48 | <a name="l00053"></a>00053 }; |
---|
49 | <a name="l00055"></a><a class="code" href="classchmat.html#9c50d31c999d85d8e9d8cf2b69b6ac8c">00055</a> mat & <a class="code" href="classchmat.html#9c50d31c999d85d8e9d8cf2b69b6ac8c" title="Access function.">_Ch</a>(){<span class="keywordflow">return</span> <a class="code" href="classchmat.html#95158bb150f5e7f939168abcd577fd9c" title="Upper chollesky triangle of the matrix.">Ch</a>;} |
---|
50 | <a name="l00056"></a>00056 }; |
---|
51 | <a name="l00057"></a>00057 |
---|
52 | <a name="l00058"></a>00058 <span class="comment">/*</span> |
---|
53 | <a name="l00059"></a>00059 <span class="comment"></span> |
---|
54 | <a name="l00062"></a>00062 <span class="comment">inline chmat& chmat::operator += ( const chmat &ldA ) {this->add ( ldA );return *this;}</span> |
---|
55 | <a name="l00064"></a>00064 <span class="comment">inline chmat& chmat::operator -= ( const chmat &ldA ) {this->add ( ldA,-1.0 );return *this;}</span> |
---|
56 | <a name="l00065"></a>00065 <span class="comment">*/</span> |
---|
57 | <a name="l00066"></a>00066 <span class="preprocessor">#endif // CHMAT_H</span> |
---|
58 | </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Wed Mar 12 16:15:44 2008 for mixpp by |
---|
59 | <a href="http://www.doxygen.org/index.html"> |
---|
60 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> |
---|
61 | </body> |
---|
62 | </html> |
---|