132 | | <a name="l00141"></a><a class="code" href="classfsqmat.html#9e19a5e26083f4a493b6fad38cc40fab">00141</a> <a class="code" href="classfsqmat.html#9e19a5e26083f4a493b6fad38cc40fab" title="Constructor.">fsqmat</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 class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>, <span class="keyword">const</span> ivec &perm ):<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="group__errorhandlingfunc.html#g22d38e98332f9edff88cc501463eedce" title="Abort unconditionally.">it_error</a>(<span class="stringliteral">"not implemneted"</span>);}; |
133 | | <a name="l00143"></a><a class="code" href="classfsqmat.html#c01f3e9bb590f2a2921369d672f3ce1e">00143</a> <a class="code" href="classfsqmat.html#c01f3e9bb590f2a2921369d672f3ce1e" title="Constructor.">fsqmat</a> ( <span class="keyword">const</span> vec &d ):<a class="code" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</a>(d.<a class="code" href="group__matrix__functions.html#g97bb6b35d6d4c683c7558842e4500c2d" title="Length of vector.">length</a>()){<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>=<a class="code" href="group__diag.html#gb0938c932c1cbc19b2ce6c5ac1007553" title="Get the diagonal elements of the input matrix m.">diag</a>(d);}; |
| 132 | <a name="l00141"></a><a class="code" href="classfsqmat.html#9e19a5e26083f4a493b6fad38cc40fab">00141</a> <a class="code" href="classfsqmat.html#9e19a5e26083f4a493b6fad38cc40fab" title="Constructor.">fsqmat</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 class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>, <span class="keyword">const</span> ivec &perm ):<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>()){it_error(<span class="stringliteral">"not implemneted"</span>);}; |
| 133 | <a name="l00143"></a><a class="code" href="classfsqmat.html#c01f3e9bb590f2a2921369d672f3ce1e">00143</a> <a class="code" href="classfsqmat.html#c01f3e9bb590f2a2921369d672f3ce1e" title="Constructor.">fsqmat</a> ( <span class="keyword">const</span> vec &d ):<a class="code" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</a>(d.length()){<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>=diag(d);}; |
142 | | <a name="l00158"></a><a class="code" href="classfsqmat.html#58075da64ddadd4df40654c35b928c6f">00158</a> <span class="keywordtype">double</span> <a class="code" href="classfsqmat.html#58075da64ddadd4df40654c35b928c6f" title="Evaluates quadratic form ;.">invqform</a> (<span class="keyword">const</span> vec &v )<span class="keyword"> const </span>{<span class="keywordflow">return</span> ( v* ( <a class="code" href="group__inverse.html#g125b083397cc9450b8a67a485b545bc8" title="Inverse of real square matrix.Calculate the inverse of the real matrix .">itpp::inv</a>(<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>)*v ) );}; |
143 | | <a name="l00159"></a><a class="code" href="classfsqmat.html#842a774077ee34ac3c36d180ab33e103">00159</a> vec <a class="code" href="classfsqmat.html#842a774077ee34ac3c36d180ab33e103" title="Multiplies square root of by vector .">sqrt_mult</a> (<span class="keyword">const</span> vec &v )<span class="keyword"> const </span>{mat Ch=<a class="code" href="group__matrixdecomp.html#g8aa42136e884519422d4f2dd95e51cb5" title="Cholesky factorisation of real symmetric and positive definite matrix.">chol</a>(<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>); <span class="keywordflow">return</span> Ch*v;}; |
| 142 | <a name="l00158"></a><a class="code" href="classfsqmat.html#58075da64ddadd4df40654c35b928c6f">00158</a> <span class="keywordtype">double</span> <a class="code" href="classfsqmat.html#58075da64ddadd4df40654c35b928c6f" title="Evaluates quadratic form ;.">invqform</a> (<span class="keyword">const</span> vec &v )<span class="keyword"> const </span>{<span class="keywordflow">return</span> ( v* ( itpp::inv(<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>)*v ) );}; |
| 143 | <a name="l00159"></a><a class="code" href="classfsqmat.html#842a774077ee34ac3c36d180ab33e103">00159</a> vec <a class="code" href="classfsqmat.html#842a774077ee34ac3c36d180ab33e103" title="Multiplies square root of by vector .">sqrt_mult</a> (<span class="keyword">const</span> vec &v )<span class="keyword"> const </span>{mat Ch=chol(<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>); <span class="keywordflow">return</span> Ch*v;}; |
147 | | <a name="l00165"></a><a class="code" href="classfsqmat.html#922f8190c13987cbcdb33ec2bf5cf105">00165</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>=<a class="code" href="group__diag.html#gb0938c932c1cbc19b2ce6c5ac1007553" title="Get the diagonal elements of the input matrix m.">diag</a>(nD);} |
148 | | <a name="l00167"></a><a class="code" href="classfsqmat.html#bcf837b2956745e8986044f5600dbd6e">00167</a> vec <a class="code" href="classfsqmat.html#bcf837b2956745e8986044f5600dbd6e" title="Access functions.">getD</a> (){<span class="keywordflow">return</span> <a class="code" href="group__diag.html#gb0938c932c1cbc19b2ce6c5ac1007553" title="Get the diagonal elements of the input matrix m.">diag</a>(<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453" title="Full matrix on which the operations are performed.">M</a>);} |
| 147 | <a name="l00165"></a><a class="code" href="classfsqmat.html#922f8190c13987cbcdb33ec2bf5cf105">00165</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);} |
| 148 | <a name="l00167"></a><a class="code" href="classfsqmat.html#bcf837b2956745e8986044f5600dbd6e">00167</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>);} |