93 | | <a name="l00152"></a><a class="code" href="classfsqmat.html#922f8190c13987cbcdb33ec2bf5cf105">00152</a> <span class="keywordtype">void</span> <a class="code" href="classfsqmat.html#922f8190c13987cbcdb33ec2bf5cf105" title="Access functions.">setD</a> (<span class="keyword">const</span> vec &nD){<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>=diag(nD);} |
94 | | <a name="l00154"></a><a class="code" href="classfsqmat.html#bcf837b2956745e8986044f5600dbd6e">00154</a> vec <a class="code" href="classfsqmat.html#bcf837b2956745e8986044f5600dbd6e" title="Access functions.">getD</a> (){<span class="keywordflow">return</span> diag(<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>);} |
95 | | <a name="l00156"></a><a class="code" href="classfsqmat.html#03a8f49eb4d38a054ecc522be59cd2ad">00156</a> <span class="keywordtype">void</span> <a class="code" href="classfsqmat.html#922f8190c13987cbcdb33ec2bf5cf105" title="Access functions.">setD</a> (<span class="keyword">const</span> vec &nD, <span class="keywordtype">int</span> i){<span class="keywordflow">for</span>(<span class="keywordtype">int</span> j=i;j<nD.length();j++){<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>(j,j)=nD(j-i);}} <span class="comment">//Fixme can be more general</span> |
96 | | <a name="l00157"></a>00157 |
97 | | <a name="l00159"></a><a class="code" href="classfsqmat.html#514d1fdd8a382dbd6a774f2cf1ebd3de">00159</a> <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="classfsqmat.html#514d1fdd8a382dbd6a774f2cf1ebd3de" title="add another fsqmat matrix">operator += </a>( <span class="keyword">const</span> <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &A ) {<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>+=A.<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>;<span class="keywordflow">return</span> *<span class="keyword">this</span>;}; |
98 | | <a name="l00161"></a><a class="code" href="classfsqmat.html#e976bc9d899961e1d2087b0630ed33b7">00161</a> <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="classfsqmat.html#e976bc9d899961e1d2087b0630ed33b7" title="subtrack another fsqmat matrix">operator -= </a>( <span class="keyword">const</span> <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &A ) {<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>-=A.<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>;<span class="keywordflow">return</span> *<span class="keyword">this</span>;}; |
99 | | <a name="l00163"></a><a class="code" href="classfsqmat.html#8f7ce97628a50e06641281096b2af9b7">00163</a> <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="classfsqmat.html#8f7ce97628a50e06641281096b2af9b7" title="multiply by a scalar">operator *= </a>( <span class="keywordtype">double</span> x ) {<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>*=x;<span class="keywordflow">return</span> *<span class="keyword">this</span>;}; |
100 | | <a name="l00164"></a>00164 <span class="comment">// fsqmat& operator = ( const fsqmat &A) {M=A.M; return *this;};</span> |
101 | | <a name="l00166"></a>00166 <span class="comment"></span> <span class="keyword">friend</span> std::ostream &<a class="code" href="classfsqmat.html#e06aba54d61e807b41bd68b5ee6ac22f" title="print full matrix">operator<< </a>( std::ostream &os, <span class="keyword">const</span> <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &sq ); |
102 | | <a name="l00167"></a>00167 |
103 | | <a name="l00168"></a>00168 }; |
104 | | <a name="l00169"></a>00169 |
105 | | <a name="l00175"></a><a class="code" href="classldmat.html">00175</a> <span class="keyword">class </span><a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a>: <a class="code" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</a> |
106 | | <a name="l00176"></a>00176 { |
107 | | <a name="l00177"></a>00177 <span class="keyword">public</span>: |
108 | | <a name="l00178"></a>00178 |
109 | | <a name="l00180"></a>00180 <a class="code" href="classldmat.html#a12dda6f529580b0377cc45226b43303" title="Default constructor.">ldmat</a> ( <span class="keyword">const</span> mat &<a class="code" href="classldmat.html#f74a64b99fe58a75ebd37bb679e121ea" title="Lower-triangular matrix .">L</a>, <span class="keyword">const</span> vec &<a class="code" href="classldmat.html#4cce04824539c4a8d062d9a36d6e014e" title="Positive vector .">D</a> ); |
110 | | <a name="l00182"></a>00182 <a class="code" href="classldmat.html#a12dda6f529580b0377cc45226b43303" title="Default constructor.">ldmat</a> (<span class="keyword">const</span> mat &V ); |
111 | | <a name="l00184"></a>00184 <a class="code" href="classldmat.html#a12dda6f529580b0377cc45226b43303" title="Default constructor.">ldmat</a> ( vec D0 ); |
112 | | <a name="l00186"></a>00186 <a class="code" href="classldmat.html#a12dda6f529580b0377cc45226b43303" title="Default constructor.">ldmat</a> (); |
113 | | <a name="l00188"></a>00188 <a class="code" href="classldmat.html#a12dda6f529580b0377cc45226b43303" title="Default constructor.">ldmat</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> dim0); |
114 | | <a name="l00189"></a>00189 |
115 | | <a name="l00191"></a><a class="code" href="classldmat.html#1e2734c0164ce5233c4d709679555138">00191</a> <span class="keyword">virtual</span> <a class="code" href="classldmat.html#1e2734c0164ce5233c4d709679555138" title="Destructor for future use;.">~ldmat</a>(){}; |
116 | | <a name="l00192"></a>00192 |
117 | | <a name="l00193"></a>00193 <span class="comment">// Reimplementation of compulsory operatios</span> |
118 | | <a name="l00194"></a>00194 |
119 | | <a name="l00195"></a>00195 <span class="keywordtype">void</span> <a class="code" href="classldmat.html#0f0f6e083e6d947cf58097ffce3ccd1a">opupdt</a> ( <span class="keyword">const</span> vec &v, <span class="keywordtype">double</span> w ); |
120 | | <a name="l00196"></a>00196 mat <a class="code" href="classldmat.html#5b0515da8dc2293d9e4360b74cc26c9e" title="Conversion to full matrix.">to_mat</a>(); |
121 | | <a name="l00197"></a>00197 <span class="keywordtype">void</span> <a class="code" href="classldmat.html#e967b9425007f0cb6cd59b845f9756d8" title="Inplace symmetric multiplication by a SQUARE matrix , i.e. .">mult_sym</a> ( <span class="keyword">const</span> mat &C); |
122 | | <a name="l00198"></a>00198 <span class="keywordtype">void</span> <a class="code" href="classldmat.html#4fd155f38eb6dd5af4bdf9c98a7999a9" title="Inplace symmetric multiplication by a SQUARE transpose of matrix , i.e. .">mult_sym_t</a> ( <span class="keyword">const</span> mat &C); |
123 | | <a name="l00200"></a>00200 <span class="keywordtype">void</span> <span class="keyword">add</span> ( <span class="keyword">const</span> <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> &ld2, <span class="keywordtype">double</span> w=1.0 ); |
124 | | <a name="l00201"></a>00201 <span class="keywordtype">double</span> <a class="code" href="classldmat.html#2b42750ba4962d439aa52a77ae12949b" title="Logarithm of a determinant.">logdet</a>() <span class="keyword">const</span>; |
125 | | <a name="l00202"></a>00202 <span class="keywordtype">double</span> <a class="code" href="classldmat.html#d64f331b781903e913cb2ee836886f3f" title="Evaluates quadratic form ;.">qform</a> (<span class="keyword">const</span> vec &v ) <span class="keyword">const</span>; |
126 | | <a name="l00203"></a>00203 <span class="keywordtype">double</span> <a class="code" href="classldmat.html#d876c5f83e02b3e809b35c9de5068f14" title="Evaluates quadratic form ;.">invqform</a> (<span class="keyword">const</span> vec &v ) <span class="keyword">const</span>; |
127 | | <a name="l00204"></a>00204 <span class="comment">// sqmat& operator -= ( const sqmat & ld2 );</span> |
128 | | <a name="l00205"></a>00205 <span class="keywordtype">void</span> <a class="code" href="classldmat.html#4d6e401de9607332305c27e67972a07a" title="Clearing matrix so that it corresponds to zeros.">clear</a>(); |
129 | | <a name="l00206"></a>00206 <span class="keywordtype">int</span> <a class="code" href="classldmat.html#0fceb6b5b637cec89bb0a3d2e6be1306" title="access function">cols</a>() <span class="keyword">const</span>; |
130 | | <a name="l00207"></a>00207 <span class="keywordtype">int</span> <a class="code" href="classldmat.html#96dfb21865db4f5bd36fa70f9b0b1163" title="access function">rows</a>() <span class="keyword">const</span>; |
131 | | <a name="l00208"></a>00208 vec <a class="code" href="classldmat.html#fc380626ced6f9244fb58c5f0231174d" title="Multiplies square root of by vector .">sqrt_mult</a> ( <span class="keyword">const</span> vec &v ) <span class="keyword">const</span>; |
132 | | <a name="l00209"></a>00209 |
133 | | <a name="l00213"></a>00213 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classldmat.html#2c160cb123c1102face7a50ec566a031" title="Matrix inversion preserving the chosen form.">inv</a> ( <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> &Inv ) <span class="keyword">const</span>; |
134 | | <a name="l00214"></a>00214 |
135 | | <a name="l00219"></a>00219 <span class="keywordtype">void</span> <a class="code" href="classldmat.html#e967b9425007f0cb6cd59b845f9756d8" title="Inplace symmetric multiplication by a SQUARE matrix , i.e. .">mult_sym</a> ( <span class="keyword">const</span> mat &C, <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> &U) <span class="keyword">const</span>; |
136 | | <a name="l00220"></a>00220 |
137 | | <a name="l00225"></a>00225 <span class="keywordtype">void</span> <a class="code" href="classldmat.html#4fd155f38eb6dd5af4bdf9c98a7999a9" title="Inplace symmetric multiplication by a SQUARE transpose of matrix , i.e. .">mult_sym_t</a> ( <span class="keyword">const</span> mat &C, <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> &U) <span class="keyword">const</span>; |
138 | | <a name="l00226"></a>00226 |
139 | | <a name="l00227"></a>00227 |
140 | | <a name="l00234"></a>00234 <span class="keywordtype">void</span> <a class="code" href="classldmat.html#f291faa073e7bc8dfafc7ae93daa2506" title="Transforms general into pure .">ldform</a> (<span class="keyword">const</span> mat &A,<span class="keyword">const</span> vec &D0 ); |
141 | | <a name="l00235"></a>00235 |
142 | | <a name="l00237"></a><a class="code" href="classldmat.html#0884a613b94fde61bfc84288e73ce57f">00237</a> <span class="keywordtype">void</span> <a class="code" href="classldmat.html#0884a613b94fde61bfc84288e73ce57f" title="Access functions.">setD</a> (<span class="keyword">const</span> vec &nD){D=nD;} |
143 | | <a name="l00239"></a><a class="code" href="classldmat.html#7619922b4de18830ce5351c6b5667e60">00239</a> <span class="keywordtype">void</span> <a class="code" href="classldmat.html#0884a613b94fde61bfc84288e73ce57f" title="Access functions.">setD</a> (<span class="keyword">const</span> vec &nD, <span class="keywordtype">int</span> i){D.replace_mid(i,nD);} <span class="comment">//Fixme can be more general</span> |
144 | | <a name="l00241"></a><a class="code" href="classldmat.html#32ff66296627ff5341d7c0b973249614">00241</a> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="classldmat.html#32ff66296627ff5341d7c0b973249614" title="Access functions.">setL</a> (<span class="keyword">const</span> vec &nL){L=nL;} |
145 | | <a name="l00242"></a>00242 |
146 | | <a name="l00244"></a>00244 <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a>& <a class="code" href="classldmat.html#ca445ee152a56043af946ea095b2d8f8" title="add another ldmat matrix">operator += </a>( <span class="keyword">const</span> <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> &ldA ); |
147 | | <a name="l00246"></a>00246 <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a>& <a class="code" href="classldmat.html#e3f4d2d85ab1ba384c852329aa31d0fb" title="subtract another ldmat matrix">operator -= </a>( <span class="keyword">const</span> <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> &ldA ); |
148 | | <a name="l00248"></a>00248 <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a>& <a class="code" href="classldmat.html#16871b2d54be6e5dc73f78b8cb90771c" title="multiply by a scalar">operator *= </a>( <span class="keywordtype">double</span> x ); |
149 | | <a name="l00249"></a>00249 |
150 | | <a name="l00251"></a>00251 <span class="keyword">friend</span> std::ostream &<a class="code" href="classldmat.html#eaaa0baa6026b84cfcbced41c84599d1" title="print both L and D ">operator<< </a>( std::ostream &os, <span class="keyword">const</span> <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> &sq ); |
151 | | <a name="l00252"></a>00252 |
| 94 | <a name="l00152"></a><a class="code" href="classfsqmat.html#a2e0bf7dbbbbe1d3358064c4ad455f1f">00152</a> <span class="keywordtype">void</span> <span class="keyword">add</span> ( <span class="keyword">const</span> <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &fsq2, <span class="keywordtype">double</span> w=1.0 ){<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>+=fsq2.M;}; |
| 95 | <a name="l00153"></a>00153 |
| 96 | <a name="l00155"></a><a class="code" href="classfsqmat.html#922f8190c13987cbcdb33ec2bf5cf105">00155</a> <span class="keywordtype">void</span> <a class="code" href="classfsqmat.html#922f8190c13987cbcdb33ec2bf5cf105" title="Access functions.">setD</a> (<span class="keyword">const</span> vec &nD){<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>=diag(nD);} |
| 97 | <a name="l00157"></a><a class="code" href="classfsqmat.html#bcf837b2956745e8986044f5600dbd6e">00157</a> vec <a class="code" href="classfsqmat.html#bcf837b2956745e8986044f5600dbd6e" title="Access functions.">getD</a> (){<span class="keywordflow">return</span> diag(<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>);} |
| 98 | <a name="l00159"></a><a class="code" href="classfsqmat.html#03a8f49eb4d38a054ecc522be59cd2ad">00159</a> <span class="keywordtype">void</span> <a class="code" href="classfsqmat.html#922f8190c13987cbcdb33ec2bf5cf105" title="Access functions.">setD</a> (<span class="keyword">const</span> vec &nD, <span class="keywordtype">int</span> i){<span class="keywordflow">for</span>(<span class="keywordtype">int</span> j=i;j<nD.length();j++){<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>(j,j)=nD(j-i);}} <span class="comment">//Fixme can be more general</span> |
| 99 | <a name="l00160"></a>00160 |
| 100 | <a name="l00161"></a>00161 |
| 101 | <a name="l00163"></a><a class="code" href="classfsqmat.html#514d1fdd8a382dbd6a774f2cf1ebd3de">00163</a> <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="classfsqmat.html#514d1fdd8a382dbd6a774f2cf1ebd3de" title="add another fsqmat matrix">operator += </a>( <span class="keyword">const</span> <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &A ) {<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>+=A.<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>;<span class="keywordflow">return</span> *<span class="keyword">this</span>;}; |
| 102 | <a name="l00165"></a><a class="code" href="classfsqmat.html#e976bc9d899961e1d2087b0630ed33b7">00165</a> <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="classfsqmat.html#e976bc9d899961e1d2087b0630ed33b7" title="subtrack another fsqmat matrix">operator -= </a>( <span class="keyword">const</span> <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &A ) {<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>-=A.<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>;<span class="keywordflow">return</span> *<span class="keyword">this</span>;}; |
| 103 | <a name="l00167"></a><a class="code" href="classfsqmat.html#af800e7b2146da5e60897255dde80059">00167</a> <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="classfsqmat.html#af800e7b2146da5e60897255dde80059" title="multiply by a scalar">operator *= </a>( <span class="keywordtype">double</span> x ) {<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>*=x;<span class="keywordflow">return</span> *<span class="keyword">this</span>;}; |
| 104 | <a name="l00168"></a>00168 <span class="comment">// fsqmat& operator = ( const fsqmat &A) {M=A.M; return *this;};</span> |
| 105 | <a name="l00170"></a>00170 <span class="comment"></span> <span class="keyword">friend</span> std::ostream &<a class="code" href="classfsqmat.html#e06aba54d61e807b41bd68b5ee6ac22f" title="print full matrix">operator<< </a>( std::ostream &os, <span class="keyword">const</span> <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &sq ); |
| 106 | <a name="l00171"></a>00171 |
| 107 | <a name="l00172"></a>00172 }; |
| 108 | <a name="l00173"></a>00173 |
| 109 | <a name="l00179"></a><a class="code" href="classldmat.html">00179</a> <span class="keyword">class </span><a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a>: <a class="code" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</a> |
| 110 | <a name="l00180"></a>00180 { |
| 111 | <a name="l00181"></a>00181 <span class="keyword">public</span>: |
| 112 | <a name="l00182"></a>00182 |
| 113 | <a name="l00184"></a>00184 <a class="code" href="classldmat.html#a12dda6f529580b0377cc45226b43303" title="Default constructor.">ldmat</a> ( <span class="keyword">const</span> mat &<a class="code" href="classldmat.html#f74a64b99fe58a75ebd37bb679e121ea" title="Lower-triangular matrix .">L</a>, <span class="keyword">const</span> vec &<a class="code" href="classldmat.html#4cce04824539c4a8d062d9a36d6e014e" title="Positive vector .">D</a> ); |
| 114 | <a name="l00186"></a>00186 <a class="code" href="classldmat.html#a12dda6f529580b0377cc45226b43303" title="Default constructor.">ldmat</a> (<span class="keyword">const</span> mat &V ); |
| 115 | <a name="l00188"></a>00188 <a class="code" href="classldmat.html#a12dda6f529580b0377cc45226b43303" title="Default constructor.">ldmat</a> ( vec D0 ); |
| 116 | <a name="l00190"></a>00190 <a class="code" href="classldmat.html#a12dda6f529580b0377cc45226b43303" title="Default constructor.">ldmat</a> (); |
| 117 | <a name="l00192"></a>00192 <a class="code" href="classldmat.html#a12dda6f529580b0377cc45226b43303" title="Default constructor.">ldmat</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> dim0); |
| 118 | <a name="l00193"></a>00193 |
| 119 | <a name="l00195"></a><a class="code" href="classldmat.html#1e2734c0164ce5233c4d709679555138">00195</a> <span class="keyword">virtual</span> <a class="code" href="classldmat.html#1e2734c0164ce5233c4d709679555138" title="Destructor for future use;.">~ldmat</a>(){}; |
| 120 | <a name="l00196"></a>00196 |
| 121 | <a name="l00197"></a>00197 <span class="comment">// Reimplementation of compulsory operatios</span> |
| 122 | <a name="l00198"></a>00198 |
| 123 | <a name="l00199"></a>00199 <span class="keywordtype">void</span> <a class="code" href="classldmat.html#0f0f6e083e6d947cf58097ffce3ccd1a">opupdt</a> ( <span class="keyword">const</span> vec &v, <span class="keywordtype">double</span> w ); |
| 124 | <a name="l00200"></a>00200 mat <a class="code" href="classldmat.html#5b0515da8dc2293d9e4360b74cc26c9e" title="Conversion to full matrix.">to_mat</a>(); |
| 125 | <a name="l00201"></a>00201 <span class="keywordtype">void</span> <a class="code" href="classldmat.html#e967b9425007f0cb6cd59b845f9756d8" title="Inplace symmetric multiplication by a SQUARE matrix , i.e. .">mult_sym</a> ( <span class="keyword">const</span> mat &C); |
| 126 | <a name="l00202"></a>00202 <span class="keywordtype">void</span> <a class="code" href="classldmat.html#4fd155f38eb6dd5af4bdf9c98a7999a9" title="Inplace symmetric multiplication by a SQUARE transpose of matrix , i.e. .">mult_sym_t</a> ( <span class="keyword">const</span> mat &C); |
| 127 | <a name="l00204"></a>00204 <span class="keywordtype">void</span> <span class="keyword">add</span> ( <span class="keyword">const</span> <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> &ld2, <span class="keywordtype">double</span> w=1.0 ); |
| 128 | <a name="l00205"></a>00205 <span class="keywordtype">double</span> <a class="code" href="classldmat.html#2b42750ba4962d439aa52a77ae12949b" title="Logarithm of a determinant.">logdet</a>() <span class="keyword">const</span>; |
| 129 | <a name="l00206"></a>00206 <span class="keywordtype">double</span> <a class="code" href="classldmat.html#d64f331b781903e913cb2ee836886f3f" title="Evaluates quadratic form ;.">qform</a> (<span class="keyword">const</span> vec &v ) <span class="keyword">const</span>; |
| 130 | <a name="l00207"></a>00207 <span class="keywordtype">double</span> <a class="code" href="classldmat.html#d876c5f83e02b3e809b35c9de5068f14" title="Evaluates quadratic form ;.">invqform</a> (<span class="keyword">const</span> vec &v ) <span class="keyword">const</span>; |
| 131 | <a name="l00208"></a>00208 <span class="comment">// sqmat& operator -= ( const sqmat & ld2 );</span> |
| 132 | <a name="l00209"></a>00209 <span class="keywordtype">void</span> <a class="code" href="classldmat.html#4d6e401de9607332305c27e67972a07a" title="Clearing matrix so that it corresponds to zeros.">clear</a>(); |
| 133 | <a name="l00210"></a>00210 <span class="keywordtype">int</span> <a class="code" href="classldmat.html#0fceb6b5b637cec89bb0a3d2e6be1306" title="access function">cols</a>() <span class="keyword">const</span>; |
| 134 | <a name="l00211"></a>00211 <span class="keywordtype">int</span> <a class="code" href="classldmat.html#96dfb21865db4f5bd36fa70f9b0b1163" title="access function">rows</a>() <span class="keyword">const</span>; |
| 135 | <a name="l00212"></a>00212 vec <a class="code" href="classldmat.html#fc380626ced6f9244fb58c5f0231174d" title="Multiplies square root of by vector .">sqrt_mult</a> ( <span class="keyword">const</span> vec &v ) <span class="keyword">const</span>; |
| 136 | <a name="l00213"></a>00213 |
| 137 | <a name="l00217"></a>00217 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classldmat.html#2c160cb123c1102face7a50ec566a031" title="Matrix inversion preserving the chosen form.">inv</a> ( <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> &Inv ) <span class="keyword">const</span>; |
| 138 | <a name="l00218"></a>00218 |
| 139 | <a name="l00223"></a>00223 <span class="keywordtype">void</span> <a class="code" href="classldmat.html#e967b9425007f0cb6cd59b845f9756d8" title="Inplace symmetric multiplication by a SQUARE matrix , i.e. .">mult_sym</a> ( <span class="keyword">const</span> mat &C, <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> &U) <span class="keyword">const</span>; |
| 140 | <a name="l00224"></a>00224 |
| 141 | <a name="l00229"></a>00229 <span class="keywordtype">void</span> <a class="code" href="classldmat.html#4fd155f38eb6dd5af4bdf9c98a7999a9" title="Inplace symmetric multiplication by a SQUARE transpose of matrix , i.e. .">mult_sym_t</a> ( <span class="keyword">const</span> mat &C, <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> &U) <span class="keyword">const</span>; |
| 142 | <a name="l00230"></a>00230 |
| 143 | <a name="l00231"></a>00231 |
| 144 | <a name="l00238"></a>00238 <span class="keywordtype">void</span> <a class="code" href="classldmat.html#f291faa073e7bc8dfafc7ae93daa2506" title="Transforms general into pure .">ldform</a> (<span class="keyword">const</span> mat &A,<span class="keyword">const</span> vec &D0 ); |
| 145 | <a name="l00239"></a>00239 |
| 146 | <a name="l00241"></a><a class="code" href="classldmat.html#0884a613b94fde61bfc84288e73ce57f">00241</a> <span class="keywordtype">void</span> <a class="code" href="classldmat.html#0884a613b94fde61bfc84288e73ce57f" title="Access functions.">setD</a> (<span class="keyword">const</span> vec &nD){D=nD;} |
| 147 | <a name="l00243"></a><a class="code" href="classldmat.html#7619922b4de18830ce5351c6b5667e60">00243</a> <span class="keywordtype">void</span> <a class="code" href="classldmat.html#0884a613b94fde61bfc84288e73ce57f" title="Access functions.">setD</a> (<span class="keyword">const</span> vec &nD, <span class="keywordtype">int</span> i){D.replace_mid(i,nD);} <span class="comment">//Fixme can be more general</span> |
| 148 | <a name="l00245"></a><a class="code" href="classldmat.html#32ff66296627ff5341d7c0b973249614">00245</a> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="classldmat.html#32ff66296627ff5341d7c0b973249614" title="Access functions.">setL</a> (<span class="keyword">const</span> vec &nL){L=nL;} |
| 149 | <a name="l00246"></a>00246 |
| 150 | <a name="l00248"></a>00248 <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a>& <a class="code" href="classldmat.html#ca445ee152a56043af946ea095b2d8f8" title="add another ldmat matrix">operator += </a>( <span class="keyword">const</span> <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> &ldA ); |
| 151 | <a name="l00250"></a>00250 <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a>& <a class="code" href="classldmat.html#e3f4d2d85ab1ba384c852329aa31d0fb" title="subtract another ldmat matrix">operator -= </a>( <span class="keyword">const</span> <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> &ldA ); |
| 152 | <a name="l00252"></a>00252 <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a>& <a class="code" href="classldmat.html#875b7e6dcf73ae7001329099019fdb1d" title="multiply by a scalar">operator *= </a>( <span class="keywordtype">double</span> x ); |
153 | | <a name="l00254"></a>00254 <span class="keyword">protected</span>: |
154 | | <a name="l00256"></a><a class="code" href="classldmat.html#4cce04824539c4a8d062d9a36d6e014e">00256</a> vec D; |
155 | | <a name="l00258"></a><a class="code" href="classldmat.html#f74a64b99fe58a75ebd37bb679e121ea">00258</a> mat L; |
156 | | <a name="l00259"></a>00259 |
157 | | <a name="l00260"></a>00260 }; |
158 | | <a name="l00261"></a>00261 |
159 | | <a name="l00262"></a>00262 |
160 | | <a name="l00265"></a><a class="code" href="classldmat.html#ca445ee152a56043af946ea095b2d8f8">00265</a> <span class="keyword">inline</span> <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a>& <a class="code" href="classldmat.html#ca445ee152a56043af946ea095b2d8f8" title="add another ldmat matrix">ldmat::operator += </a>( <span class="keyword">const</span> <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> &ldA ) {this-><span class="keyword">add</span> ( ldA );<span class="keywordflow">return</span> *<span class="keyword">this</span>;} |
161 | | <a name="l00267"></a><a class="code" href="classldmat.html#e3f4d2d85ab1ba384c852329aa31d0fb">00267</a> <span class="keyword">inline</span> <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a>& <a class="code" href="classldmat.html#e3f4d2d85ab1ba384c852329aa31d0fb" title="subtract another ldmat matrix">ldmat::operator -= </a>( <span class="keyword">const</span> <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> &ldA ) {this-><span class="keyword">add</span> ( ldA,-1.0 );<span class="keywordflow">return</span> *<span class="keyword">this</span>;} |
162 | | <a name="l00269"></a><a class="code" href="classldmat.html#0fceb6b5b637cec89bb0a3d2e6be1306">00269</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classldmat.html#0fceb6b5b637cec89bb0a3d2e6be1306" title="access function">ldmat::cols</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classsqmat.html#0abed904bdc0882373ba9adba919689d" title="dimension of the square matrix">dim</a>;} |
163 | | <a name="l00271"></a><a class="code" href="classldmat.html#96dfb21865db4f5bd36fa70f9b0b1163">00271</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classldmat.html#96dfb21865db4f5bd36fa70f9b0b1163" title="access function">ldmat::rows</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classsqmat.html#0abed904bdc0882373ba9adba919689d" title="dimension of the square matrix">dim</a>;} |
164 | | <a name="l00272"></a>00272 |
165 | | <a name="l00273"></a>00273 <span class="preprocessor">#endif // DC_H</span> |
166 | | </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Fri Apr 18 11:15:14 2008 for mixpp by |
| 154 | <a name="l00255"></a>00255 <span class="keyword">friend</span> std::ostream &<a class="code" href="classldmat.html#eaaa0baa6026b84cfcbced41c84599d1" title="print both L and D ">operator<< </a>( std::ostream &os, <span class="keyword">const</span> <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> &sq ); |
| 155 | <a name="l00256"></a>00256 |
| 156 | <a name="l00257"></a>00257 |
| 157 | <a name="l00258"></a>00258 <span class="keyword">protected</span>: |
| 158 | <a name="l00260"></a><a class="code" href="classldmat.html#4cce04824539c4a8d062d9a36d6e014e">00260</a> vec D; |
| 159 | <a name="l00262"></a><a class="code" href="classldmat.html#f74a64b99fe58a75ebd37bb679e121ea">00262</a> mat L; |
| 160 | <a name="l00263"></a>00263 |
| 161 | <a name="l00264"></a>00264 }; |
| 162 | <a name="l00265"></a>00265 |
| 163 | <a name="l00266"></a>00266 |
| 164 | <a name="l00269"></a><a class="code" href="classldmat.html#ca445ee152a56043af946ea095b2d8f8">00269</a> <span class="keyword">inline</span> <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a>& <a class="code" href="classldmat.html#ca445ee152a56043af946ea095b2d8f8" title="add another ldmat matrix">ldmat::operator += </a>( <span class="keyword">const</span> <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> &ldA ) {this-><span class="keyword">add</span> ( ldA );<span class="keywordflow">return</span> *<span class="keyword">this</span>;} |
| 165 | <a name="l00271"></a><a class="code" href="classldmat.html#e3f4d2d85ab1ba384c852329aa31d0fb">00271</a> <span class="keyword">inline</span> <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a>& <a class="code" href="classldmat.html#e3f4d2d85ab1ba384c852329aa31d0fb" title="subtract another ldmat matrix">ldmat::operator -= </a>( <span class="keyword">const</span> <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> &ldA ) {this-><span class="keyword">add</span> ( ldA,-1.0 );<span class="keywordflow">return</span> *<span class="keyword">this</span>;} |
| 166 | <a name="l00273"></a><a class="code" href="classldmat.html#0fceb6b5b637cec89bb0a3d2e6be1306">00273</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classldmat.html#0fceb6b5b637cec89bb0a3d2e6be1306" title="access function">ldmat::cols</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classsqmat.html#0abed904bdc0882373ba9adba919689d" title="dimension of the square matrix">dim</a>;} |
| 167 | <a name="l00275"></a><a class="code" href="classldmat.html#96dfb21865db4f5bd36fa70f9b0b1163">00275</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classldmat.html#96dfb21865db4f5bd36fa70f9b0b1163" title="access function">ldmat::rows</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classsqmat.html#0abed904bdc0882373ba9adba919689d" title="dimension of the square matrix">dim</a>;} |
| 168 | <a name="l00276"></a>00276 |
| 169 | <a name="l00277"></a>00277 <span class="preprocessor">#endif // DC_H</span> |
| 170 | </pre></div></div> |
| 171 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Apr 29 20:46:25 2008 for mixpp by |