1 | <?xml version='1.0' encoding='UTF-8' standalone='no'?> |
---|
2 | <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.5.6"> |
---|
3 | <compounddef id="chmat_8h" kind="file"> |
---|
4 | <compoundname>chmat.h</compoundname> |
---|
5 | <includes local="no">itpp/itbase.h</includes> |
---|
6 | <includes refid="libDC_8h" local="yes">libDC.h</includes> |
---|
7 | <includes refid="itpp__ext_8h" local="yes">../itpp_ext.h</includes> |
---|
8 | <includedby refid="libKF_8h" local="yes">work/git/mixpp/bdm/estim/libKF.h</includedby> |
---|
9 | <includedby refid="chmat_8cpp" local="yes">work/git/mixpp/bdm/math/chmat.cpp</includedby> |
---|
10 | <includedby refid="sim__var_8cpp" local="no">work/git/mixpp/pmsm/sim_var.cpp</includedby> |
---|
11 | <includedby refid="chmat__test_8cpp" local="no">work/git/mixpp/tests/chmat_test.cpp</includedby> |
---|
12 | <includedby refid="rv__test_8cpp" local="yes">work/git/mixpp/tests/rv_test.cpp</includedby> |
---|
13 | <includedby refid="test0_8cpp" local="yes">work/git/mixpp/tests/test0.cpp</includedby> |
---|
14 | <incdepgraph> |
---|
15 | <node id="292"> |
---|
16 | <label>../itpp_ext.h</label> |
---|
17 | <link refid="itpp__ext_8h-source"/> |
---|
18 | <childnode refid="290" relation="include"> |
---|
19 | </childnode> |
---|
20 | </node> |
---|
21 | <node id="290"> |
---|
22 | <label>itpp/itbase.h</label> |
---|
23 | </node> |
---|
24 | <node id="289"> |
---|
25 | <label>work/git/mixpp/bdm/math/chmat.h</label> |
---|
26 | <link refid="chmat.h"/> |
---|
27 | <childnode refid="290" relation="include"> |
---|
28 | </childnode> |
---|
29 | <childnode refid="291" relation="include"> |
---|
30 | </childnode> |
---|
31 | <childnode refid="292" relation="include"> |
---|
32 | </childnode> |
---|
33 | </node> |
---|
34 | <node id="291"> |
---|
35 | <label>libDC.h</label> |
---|
36 | <link refid="libDC_8h"/> |
---|
37 | <childnode refid="290" relation="include"> |
---|
38 | </childnode> |
---|
39 | </node> |
---|
40 | </incdepgraph> |
---|
41 | <invincdepgraph> |
---|
42 | <node id="295"> |
---|
43 | <label>work/git/mixpp/bdm/estim/ekf_templ.h</label> |
---|
44 | <link refid="ekf__templ_8h"/> |
---|
45 | <childnode refid="296" relation="include"> |
---|
46 | </childnode> |
---|
47 | </node> |
---|
48 | <node id="297"> |
---|
49 | <label>work/git/mixpp/pmsm/sim_var.cpp</label> |
---|
50 | <link refid="sim__var_8cpp"/> |
---|
51 | </node> |
---|
52 | <node id="293"> |
---|
53 | <label>work/git/mixpp/bdm/math/chmat.h</label> |
---|
54 | <link refid="chmat.h"/> |
---|
55 | <childnode refid="294" relation="include"> |
---|
56 | </childnode> |
---|
57 | <childnode refid="297" relation="include"> |
---|
58 | </childnode> |
---|
59 | </node> |
---|
60 | <node id="294"> |
---|
61 | <label>work/git/mixpp/bdm/estim/libKF.h</label> |
---|
62 | <link refid="libKF_8h"/> |
---|
63 | <childnode refid="295" relation="include"> |
---|
64 | </childnode> |
---|
65 | <childnode refid="297" relation="include"> |
---|
66 | </childnode> |
---|
67 | <childnode refid="298" relation="include"> |
---|
68 | </childnode> |
---|
69 | </node> |
---|
70 | <node id="298"> |
---|
71 | <label>work/git/mixpp/pmsm/simulator_zdenek/ekf_example/ekf_obj.h</label> |
---|
72 | <link refid="ekf__obj_8h"/> |
---|
73 | </node> |
---|
74 | <node id="296"> |
---|
75 | <label>work/git/mixpp/pmsm/pmsm_mix.cpp</label> |
---|
76 | <link refid="pmsm__mix_8cpp"/> |
---|
77 | </node> |
---|
78 | </invincdepgraph> |
---|
79 | <innerclass refid="classchmat" prot="public">chmat</innerclass> |
---|
80 | <briefdescription> |
---|
81 | <para>Matrices in decomposed forms (LDL', LU, UDU', etc). </para> </briefdescription> |
---|
82 | <detaileddescription> |
---|
83 | <para><simplesect kind="author"><para>Vaclav Smidl.</para></simplesect> |
---|
84 | ----------------------------------- BDM++ - C++ library for Bayesian Decision Making under Uncertainty</para><para>Using IT++ for numerical operations ----------------------------------- </para> </detaileddescription> |
---|
85 | <programlisting> |
---|
86 | <codeline lineno="1"></codeline> |
---|
87 | <codeline lineno="13"><highlight class="preprocessor">#ifndef<sp/>CHMAT_H</highlight></codeline> |
---|
88 | <codeline lineno="14"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#define<sp/>CHMAT_H</highlight></codeline> |
---|
89 | <codeline lineno="15"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> |
---|
90 | <codeline lineno="16"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><itpp/itbase.h></highlight><highlight class="normal"></highlight></codeline> |
---|
91 | <codeline lineno="17"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"<ref refid="libDC_8h" kindref="compound" tooltip="Matrices in decomposed forms (LDL&#39;, LU, UDU&#39;, etc).">libDC.h</ref>"</highlight><highlight class="normal"></highlight></codeline> |
---|
92 | <codeline lineno="18"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"../itpp_ext.h"</highlight><highlight class="normal"></highlight></codeline> |
---|
93 | <codeline lineno="19"><highlight class="normal"></highlight></codeline> |
---|
94 | <codeline lineno="20"><highlight class="normal"></highlight><highlight class="keyword">using<sp/>namespace<sp/></highlight><highlight class="normal">itpp;</highlight></codeline> |
---|
95 | <codeline lineno="21"><highlight class="normal"></highlight></codeline> |
---|
96 | <codeline lineno="27" refid="classchmat" refkind="compound"><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classsqmat" kindref="compound" tooltip="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</ref><sp/>{</highlight></codeline> |
---|
97 | <codeline lineno="28"><highlight class="normal"></highlight><highlight class="keyword">protected</highlight><highlight class="normal">:</highlight></codeline> |
---|
98 | <codeline lineno="30" refid="classchmat_195158bb150f5e7f939168abcd577fd9c" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/><ref refid="classchmat_195158bb150f5e7f939168abcd577fd9c" kindref="member" tooltip="Upper triangle of the cholesky matrix.">Ch</ref>;</highlight></codeline> |
---|
99 | <codeline lineno="31"><highlight class="normal"></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline> |
---|
100 | <codeline lineno="32"><highlight class="normal"></highlight></codeline> |
---|
101 | <codeline lineno="33"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classchmat_1bbc2d98d7455b1f38828907d442836bf" kindref="member">opupdt</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>vec<sp/>&v,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>w<sp/>);</highlight></codeline> |
---|
102 | <codeline lineno="34"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/><ref refid="classchmat_1a37e2c726e4fc3ad50b26ac2ca6c1452" kindref="member" tooltip="Conversion to full matrix.">to_mat</ref>();</highlight></codeline> |
---|
103 | <codeline lineno="35"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classchmat_166f509f92b0ccf020e2a2a32566e0777" kindref="member" tooltip="Inplace symmetric multiplication by a SQUARE matrix , i.e. .">mult_sym</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>mat<sp/>&C<sp/>);</highlight></codeline> |
---|
104 | <codeline lineno="36"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classchmat_166f509f92b0ccf020e2a2a32566e0777" kindref="member" tooltip="Inplace symmetric multiplication by a SQUARE matrix , i.e. .">mult_sym</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>mat<sp/>&C<sp/>,<sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref><sp/>&U<sp/>)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline> |
---|
105 | <codeline lineno="37"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classchmat_107f50d1332b901eee962e8b1913102f7" kindref="member" tooltip="Inplace symmetric multiplication by a SQUARE transpose of matrix , i.e. .">mult_sym_t</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>mat<sp/>&C<sp/>);</highlight></codeline> |
---|
106 | <codeline lineno="38"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classchmat_107f50d1332b901eee962e8b1913102f7" kindref="member" tooltip="Inplace symmetric multiplication by a SQUARE transpose of matrix , i.e. .">mult_sym_t</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>mat<sp/>&C,<sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref><sp/>&U<sp/>)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline> |
---|
107 | <codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/><ref refid="classchmat_1b504ca818203b13e667cb3c503980382" kindref="member" tooltip="Logarithm of a determinant.">logdet</ref>()<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline> |
---|
108 | <codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/><ref refid="classchmat_1b22aa239dbaca33e3fb93b4f674d7051" kindref="member" tooltip="Multiplies square root of by vector .">sqrt_mult</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>vec<sp/>&v<sp/>)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline> |
---|
109 | <codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/><ref refid="classchmat_16807737c7ffdb7041256b51db7592248" kindref="member" tooltip="Evaluates quadratic form ;.">qform</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>vec<sp/>&v<sp/>)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline> |
---|
110 | <codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/><ref refid="classchmat_1b49427cff186c62f5df3724e5d2c34b4" kindref="member" tooltip="Evaluates quadratic form ;.">invqform</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>vec<sp/>&v<sp/>)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline> |
---|
111 | <codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classchmat_1d0a995d312ecc11d3b43693f5e224ba9" kindref="member" tooltip="Clearing matrix so that it corresponds to zeros.">clear</ref>();</highlight></codeline> |
---|
112 | <codeline lineno="45" refid="classchmat_1f3921e3e5e31337cdbda40a3a5467257" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">add</highlight><highlight class="normal"><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref><sp/>&A2,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>w=1.0<sp/>)<sp/>{};</highlight></codeline> |
---|
113 | <codeline lineno="47" refid="classchmat_15ce4e21a9012a4e98c1f0ed1ca5669bd" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classchmat_15ce4e21a9012a4e98c1f0ed1ca5669bd" kindref="member" tooltip="Inversion in the same form, i.e. cholesky.">inv</ref><sp/>(<sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref><sp/>&Inv<sp/>)</highlight><highlight class="keyword"><sp/>const<sp/><sp/><sp/></highlight><highlight class="normal">{<sp/>(<sp/>Inv.<ref refid="classchmat_195158bb150f5e7f939168abcd577fd9c" kindref="member" tooltip="Upper triangle of the cholesky matrix.">Ch</ref><sp/>)<sp/>=<sp/>itpp::inv<sp/>(<sp/><ref refid="classchmat_195158bb150f5e7f939168abcd577fd9c" kindref="member" tooltip="Upper triangle of the cholesky matrix.">Ch</ref><sp/>).T();};<sp/></highlight><highlight class="comment">//Fixme:<sp/>can<sp/>be<sp/>more<sp/>efficient</highlight><highlight class="normal"></highlight></codeline> |
---|
114 | <codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>;</highlight></codeline> |
---|
115 | <codeline lineno="49"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/>void<sp/>inv<sp/>(<sp/>mat<sp/>&Inv<sp/>);</highlight><highlight class="normal"></highlight></codeline> |
---|
116 | <codeline lineno="50"><highlight class="normal"></highlight></codeline> |
---|
117 | <codeline lineno="52" refid="classchmat_1ba62fbf7cb8e065a4f3d24457824e89b" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/><ref refid="classchmat_1ba62fbf7cb8e065a4f3d24457824e89b" kindref="member" tooltip="Destructor for future use;.">~chmat</ref>()<sp/>{};</highlight></codeline> |
---|
118 | <codeline lineno="54" refid="classchmat_1fdd73b0c596161637fd25bdf2c670c39" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classchmat_1fdd73b0c596161637fd25bdf2c670c39" kindref="member" tooltip="Default constructor.">chmat</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>dim0<sp/>)<sp/>:<sp/><ref refid="classsqmat" kindref="compound" tooltip="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</ref><sp/>(<sp/>dim0<sp/>),<ref refid="classchmat_195158bb150f5e7f939168abcd577fd9c" kindref="member" tooltip="Upper triangle of the cholesky matrix.">Ch</ref><sp/>(<sp/>dim0,dim0<sp/>)<sp/>{};</highlight></codeline> |
---|
119 | <codeline lineno="56" refid="classchmat_1d4f0a94e81279295e60e72812130f9d4" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classchmat_1fdd73b0c596161637fd25bdf2c670c39" kindref="member" tooltip="Default constructor.">chmat</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>vec<sp/>&v)<sp/>:<sp/><ref refid="classsqmat" kindref="compound" tooltip="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</ref><sp/>(<sp/>v.length()<sp/>),<ref refid="classchmat_195158bb150f5e7f939168abcd577fd9c" kindref="member" tooltip="Upper triangle of the cholesky matrix.">Ch</ref><sp/>(<sp/>diag(sqrt(v))<sp/>)<sp/>{};</highlight></codeline> |
---|
120 | <codeline lineno="58" refid="classchmat_1d92f3bd9a727b8c88a8c7385feb3449a" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classchmat_1fdd73b0c596161637fd25bdf2c670c39" kindref="member" tooltip="Default constructor.">chmat</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref><sp/>&Ch0)<sp/>:<sp/><ref refid="classsqmat" kindref="compound" tooltip="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</ref><sp/>(<sp/>Ch0.<ref refid="classsqmat_10abed904bdc0882373ba9adba919689d" kindref="member" tooltip="dimension of the square matrix">dim</ref>),<ref refid="classchmat_195158bb150f5e7f939168abcd577fd9c" kindref="member" tooltip="Upper triangle of the cholesky matrix.">Ch</ref><sp/>(<sp/>Ch0.<ref refid="classsqmat_10abed904bdc0882373ba9adba919689d" kindref="member" tooltip="dimension of the square matrix">dim</ref>,Ch0.<ref refid="classsqmat_10abed904bdc0882373ba9adba919689d" kindref="member" tooltip="dimension of the square matrix">dim</ref><sp/>)<sp/>{<ref refid="classchmat_195158bb150f5e7f939168abcd577fd9c" kindref="member" tooltip="Upper triangle of the cholesky matrix.">Ch</ref>=Ch0.<ref refid="classchmat_195158bb150f5e7f939168abcd577fd9c" kindref="member" tooltip="Upper triangle of the cholesky matrix.">Ch</ref>;};</highlight></codeline> |
---|
121 | <codeline lineno="60" refid="classchmat_18334a00f30f0a05f893c2aeec395ef10" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classchmat_1fdd73b0c596161637fd25bdf2c670c39" kindref="member" tooltip="Default constructor.">chmat</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>mat<sp/>&M<sp/>)<sp/>:<sp/><ref refid="classsqmat" kindref="compound" tooltip="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</ref><sp/>(<sp/>M.<ref refid="classsqmat_1071e80ced9cc3b8cbb360fa7462eb646" kindref="member" tooltip="Reimplementing common functions of mat: cols().">rows</ref>()<sp/>),<ref refid="classchmat_195158bb150f5e7f939168abcd577fd9c" kindref="member" tooltip="Upper triangle of the cholesky matrix.">Ch</ref><sp/>(<sp/>M.<ref refid="classsqmat_1071e80ced9cc3b8cbb360fa7462eb646" kindref="member" tooltip="Reimplementing common functions of mat: cols().">rows</ref>(),M.<ref refid="classsqmat_1ecc2e2540f95a04f4449842588170f5b" kindref="member" tooltip="Reimplementing common functions of mat: cols().">cols</ref>()<sp/>)<sp/>{</highlight></codeline> |
---|
122 | <codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>Q;</highlight></codeline> |
---|
123 | <codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_assert_debug<sp/>(<sp/>M.rows()<sp/>==M.cols(),</highlight><highlight class="stringliteral">"chmat::<sp/>input<sp/>matrix<sp/>must<sp/>be<sp/>square!"</highlight><highlight class="normal"><sp/>);</highlight></codeline> |
---|
124 | <codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classchmat_195158bb150f5e7f939168abcd577fd9c" kindref="member" tooltip="Upper triangle of the cholesky matrix.">Ch</ref>=chol<sp/>(<sp/>M<sp/>);</highlight></codeline> |
---|
125 | <codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>};</highlight></codeline> |
---|
126 | <codeline lineno="66" refid="classchmat_19c50d31c999d85d8e9d8cf2b69b6ac8c" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>&<sp/><ref refid="classchmat_19c50d31c999d85d8e9d8cf2b69b6ac8c" kindref="member" tooltip="Access function.">_Ch</ref>()<sp/>{</highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classchmat_195158bb150f5e7f939168abcd577fd9c" kindref="member" tooltip="Upper triangle of the cholesky matrix.">Ch</ref>;}</highlight></codeline> |
---|
127 | <codeline lineno="68" refid="classchmat_1a4fc7f9b0539b97c414442a22f3db6e8" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classchmat_1a4fc7f9b0539b97c414442a22f3db6e8" kindref="member" tooltip="Access functions.">setD</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>vec<sp/>&nD<sp/>)<sp/>{<ref refid="classchmat_195158bb150f5e7f939168abcd577fd9c" kindref="member" tooltip="Upper triangle of the cholesky matrix.">Ch</ref>=diag<sp/>(<sp/>sqrt(nD)<sp/>);}</highlight></codeline> |
---|
128 | <codeline lineno="70" refid="classchmat_14b9271097d8317d9514c5d0d62cccb39" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classchmat_1a4fc7f9b0539b97c414442a22f3db6e8" kindref="member" tooltip="Access functions.">setD</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>vec<sp/>&nD,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>)<sp/>{</highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>j=i;j<nD.length();j++<sp/>)<sp/>{<ref refid="classchmat_195158bb150f5e7f939168abcd577fd9c" kindref="member" tooltip="Upper triangle of the cholesky matrix.">Ch</ref>(<sp/>j,j<sp/>)<sp/>=sqrt(nD<sp/>(<sp/>j-i<sp/>));}}<sp/></highlight><highlight class="comment">//Fixme<sp/>can<sp/>be<sp/>more<sp/>general</highlight><highlight class="normal"></highlight></codeline> |
---|
129 | <codeline lineno="71"><highlight class="normal"></highlight></codeline> |
---|
130 | <codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref>&<sp/><ref refid="classchmat_16a8b39fe3a28d2c8e3fc0d74141229fb" kindref="member" tooltip="Operators.">operator += </ref>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref><sp/>&A2<sp/>);</highlight></codeline> |
---|
131 | <codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref>&<sp/><ref refid="classchmat_1a8c3628a8c15eb0009e57c66fcac1a76" kindref="member" tooltip="mapping of negative add operation to operators">operator -= </ref>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref><sp/>&A2<sp/>)<sp/>;</highlight></codeline> |
---|
132 | <codeline lineno="75"><highlight class="normal">};</highlight></codeline> |
---|
133 | <codeline lineno="76"><highlight class="normal"></highlight></codeline> |
---|
134 | <codeline lineno="77"><highlight class="normal"></highlight></codeline> |
---|
135 | <codeline lineno="80" refid="classchmat_16a8b39fe3a28d2c8e3fc0d74141229fb" refkind="member"><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref>&<sp/><ref refid="classchmat_16a8b39fe3a28d2c8e3fc0d74141229fb" kindref="member" tooltip="Operators.">chmat::operator += </ref>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref><sp/>&A2<sp/>)<sp/><sp/>{this-></highlight><highlight class="keyword">add</highlight><highlight class="normal"><sp/>(<sp/>A2<sp/>);</highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>*</highlight><highlight class="keyword">this</highlight><highlight class="normal">;}</highlight></codeline> |
---|
136 | <codeline lineno="82" refid="classchmat_1a8c3628a8c15eb0009e57c66fcac1a76" refkind="member"><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref>&<sp/><ref refid="classchmat_1a8c3628a8c15eb0009e57c66fcac1a76" kindref="member" tooltip="mapping of negative add operation to operators">chmat::operator -= </ref>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref><sp/>&A2<sp/>)<sp/><sp/>{this-></highlight><highlight class="keyword">add</highlight><highlight class="normal"><sp/>(<sp/>A2,-1.0<sp/>);</highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>*</highlight><highlight class="keyword">this</highlight><highlight class="normal">;}</highlight></codeline> |
---|
137 | <codeline lineno="83"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/>//<sp/>CHMAT_H</highlight></codeline> |
---|
138 | </programlisting> |
---|
139 | <location file="/home/smidl/work/git/mixpp/bdm/math/chmat.h"/> |
---|
140 | </compounddef> |
---|
141 | </doxygen> |
---|