1 | \hypertarget{classfsqmat}{ |
---|
2 | \section{fsqmat Class Reference} |
---|
3 | \label{classfsqmat}\index{fsqmat@{fsqmat}} |
---|
4 | } |
---|
5 | Fake \hyperlink{classsqmat}{sqmat}. This class maps \hyperlink{classsqmat}{sqmat} operations to operations on full matrix. |
---|
6 | |
---|
7 | |
---|
8 | {\tt \#include $<$libDC.h$>$} |
---|
9 | |
---|
10 | Inheritance diagram for fsqmat:\nopagebreak |
---|
11 | \begin{figure}[H] |
---|
12 | \begin{center} |
---|
13 | \leavevmode |
---|
14 | \includegraphics[width=45pt]{classfsqmat__inherit__graph} |
---|
15 | \end{center} |
---|
16 | \end{figure} |
---|
17 | Collaboration diagram for fsqmat:\nopagebreak |
---|
18 | \begin{figure}[H] |
---|
19 | \begin{center} |
---|
20 | \leavevmode |
---|
21 | \includegraphics[width=45pt]{classfsqmat__coll__graph} |
---|
22 | \end{center} |
---|
23 | \end{figure} |
---|
24 | \subsection*{Public Member Functions} |
---|
25 | \begin{CompactItemize} |
---|
26 | \item |
---|
27 | void \hyperlink{classfsqmat_b36530e155667fe9f1bd58394e50c65a}{opupdt} (const vec \&v, double w) |
---|
28 | \item |
---|
29 | \hypertarget{classfsqmat_f54fc955e8e3b43d15afa92124bc24b3}{ |
---|
30 | mat \hyperlink{classfsqmat_f54fc955e8e3b43d15afa92124bc24b3}{to\_\-mat} () const } |
---|
31 | \label{classfsqmat_f54fc955e8e3b43d15afa92124bc24b3} |
---|
32 | |
---|
33 | \begin{CompactList}\small\item\em Conversion to full matrix. \item\end{CompactList}\item |
---|
34 | void \hyperlink{classfsqmat_5530d2756b5d991de755e6121c9a452e}{mult\_\-sym} (const mat \&C) |
---|
35 | \begin{CompactList}\small\item\em Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C'$. \item\end{CompactList}\item |
---|
36 | void \hyperlink{classfsqmat_92052a8adc2054b63e42d1373d145c89}{mult\_\-sym\_\-t} (const mat \&C) |
---|
37 | \begin{CompactList}\small\item\em Inplace symmetric multiplication by a SQUARE transpose of matrix $C$, i.e. $V = C'*V*C$. \item\end{CompactList}\item |
---|
38 | \hypertarget{classfsqmat_d4eddc3743c8865cc5ed92d14de0e3e3}{ |
---|
39 | void \hyperlink{classfsqmat_d4eddc3743c8865cc5ed92d14de0e3e3}{mult\_\-sym} (const mat \&C, \hyperlink{classfsqmat}{fsqmat} \&U) const } |
---|
40 | \label{classfsqmat_d4eddc3743c8865cc5ed92d14de0e3e3} |
---|
41 | |
---|
42 | \begin{CompactList}\small\item\em store result of {\tt mult\_\-sym} in external matrix $U$ \item\end{CompactList}\item |
---|
43 | \hypertarget{classfsqmat_ae4949ad2a32553c7fa04d6d1483770a}{ |
---|
44 | void \hyperlink{classfsqmat_ae4949ad2a32553c7fa04d6d1483770a}{mult\_\-sym\_\-t} (const mat \&C, \hyperlink{classfsqmat}{fsqmat} \&U) const } |
---|
45 | \label{classfsqmat_ae4949ad2a32553c7fa04d6d1483770a} |
---|
46 | |
---|
47 | \begin{CompactList}\small\item\em store result of {\tt mult\_\-sym\_\-t} in external matrix $U$ \item\end{CompactList}\item |
---|
48 | \hypertarget{classfsqmat_cfa4c359483d2322f32d1d50050f8ac4}{ |
---|
49 | void \hyperlink{classfsqmat_cfa4c359483d2322f32d1d50050f8ac4}{clear} ()} |
---|
50 | \label{classfsqmat_cfa4c359483d2322f32d1d50050f8ac4} |
---|
51 | |
---|
52 | \begin{CompactList}\small\item\em Clearing matrix so that it corresponds to zeros. \item\end{CompactList}\item |
---|
53 | \hypertarget{classfsqmat_79e3f73e0ccd663c7f7e08083d272940}{ |
---|
54 | \hyperlink{classfsqmat_79e3f73e0ccd663c7f7e08083d272940}{fsqmat} ()} |
---|
55 | \label{classfsqmat_79e3f73e0ccd663c7f7e08083d272940} |
---|
56 | |
---|
57 | \begin{CompactList}\small\item\em Default initialization. \item\end{CompactList}\item |
---|
58 | \hypertarget{classfsqmat_40eae99305e7c7240fa95cfec125b06f}{ |
---|
59 | \hyperlink{classfsqmat_40eae99305e7c7240fa95cfec125b06f}{fsqmat} (const int dim0)} |
---|
60 | \label{classfsqmat_40eae99305e7c7240fa95cfec125b06f} |
---|
61 | |
---|
62 | \begin{CompactList}\small\item\em Default initialization with proper size. \item\end{CompactList}\item |
---|
63 | \hypertarget{classfsqmat_1929fbc9fe375f1d67f979d0d302336f}{ |
---|
64 | \hyperlink{classfsqmat_1929fbc9fe375f1d67f979d0d302336f}{fsqmat} (const mat \&\hyperlink{classfsqmat_a7a1fcb9aae19d1e4daddfc9c22ce453}{M})} |
---|
65 | \label{classfsqmat_1929fbc9fe375f1d67f979d0d302336f} |
---|
66 | |
---|
67 | \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item |
---|
68 | \hypertarget{classfsqmat_9e19a5e26083f4a493b6fad38cc40fab}{ |
---|
69 | \hyperlink{classfsqmat_9e19a5e26083f4a493b6fad38cc40fab}{fsqmat} (const \hyperlink{classfsqmat}{fsqmat} \&\hyperlink{classfsqmat_a7a1fcb9aae19d1e4daddfc9c22ce453}{M}, const ivec \&perm)} |
---|
70 | \label{classfsqmat_9e19a5e26083f4a493b6fad38cc40fab} |
---|
71 | |
---|
72 | \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item |
---|
73 | \hypertarget{classfsqmat_c01f3e9bb590f2a2921369d672f3ce1e}{ |
---|
74 | \hyperlink{classfsqmat_c01f3e9bb590f2a2921369d672f3ce1e}{fsqmat} (const vec \&d)} |
---|
75 | \label{classfsqmat_c01f3e9bb590f2a2921369d672f3ce1e} |
---|
76 | |
---|
77 | \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item |
---|
78 | \hypertarget{classfsqmat_2a8f104e4befbc2aa90d8b11edfedb2e}{ |
---|
79 | virtual \hyperlink{classfsqmat_2a8f104e4befbc2aa90d8b11edfedb2e}{$\sim$fsqmat} ()} |
---|
80 | \label{classfsqmat_2a8f104e4befbc2aa90d8b11edfedb2e} |
---|
81 | |
---|
82 | \begin{CompactList}\small\item\em Destructor for future use;. \item\end{CompactList}\item |
---|
83 | virtual void \hyperlink{classfsqmat_9fa853e1ca28f2a1a1c43377e798ecb1}{inv} (\hyperlink{classfsqmat}{fsqmat} \&Inv) |
---|
84 | \begin{CompactList}\small\item\em Matrix inversion preserving the chosen form. \item\end{CompactList}\item |
---|
85 | \hypertarget{classfsqmat_eb0d1358f536e4453b5f99d0418ca1e5}{ |
---|
86 | double \hyperlink{classfsqmat_eb0d1358f536e4453b5f99d0418ca1e5}{logdet} () const } |
---|
87 | \label{classfsqmat_eb0d1358f536e4453b5f99d0418ca1e5} |
---|
88 | |
---|
89 | \begin{CompactList}\small\item\em Logarithm of a determinant. \item\end{CompactList}\item |
---|
90 | \hypertarget{classfsqmat_a6c91b0389e73404324b2314b08d6e87}{ |
---|
91 | double \hyperlink{classfsqmat_a6c91b0389e73404324b2314b08d6e87}{qform} (const vec \&v) const } |
---|
92 | \label{classfsqmat_a6c91b0389e73404324b2314b08d6e87} |
---|
93 | |
---|
94 | \begin{CompactList}\small\item\em Evaluates quadratic form $x= v'*V*v$;. \item\end{CompactList}\item |
---|
95 | \hypertarget{classfsqmat_58075da64ddadd4df40654c35b928c6f}{ |
---|
96 | double \hyperlink{classfsqmat_58075da64ddadd4df40654c35b928c6f}{invqform} (const vec \&v) const } |
---|
97 | \label{classfsqmat_58075da64ddadd4df40654c35b928c6f} |
---|
98 | |
---|
99 | \begin{CompactList}\small\item\em Evaluates quadratic form $x= v'*inv(V)*v$;. \item\end{CompactList}\item |
---|
100 | vec \hyperlink{classfsqmat_842a774077ee34ac3c36d180ab33e103}{sqrt\_\-mult} (const vec \&v) const |
---|
101 | \begin{CompactList}\small\item\em Multiplies square root of $V$ by vector $x$. \item\end{CompactList}\item |
---|
102 | \hypertarget{classfsqmat_a2e0bf7dbbbbe1d3358064c4ad455f1f}{ |
---|
103 | void \hyperlink{classfsqmat_a2e0bf7dbbbbe1d3358064c4ad455f1f}{add} (const \hyperlink{classfsqmat}{fsqmat} \&fsq2, double w=1.0)} |
---|
104 | \label{classfsqmat_a2e0bf7dbbbbe1d3358064c4ad455f1f} |
---|
105 | |
---|
106 | \begin{CompactList}\small\item\em Add another matrix in fsq form with weight w. \item\end{CompactList}\item |
---|
107 | \hypertarget{classfsqmat_922f8190c13987cbcdb33ec2bf5cf105}{ |
---|
108 | void \hyperlink{classfsqmat_922f8190c13987cbcdb33ec2bf5cf105}{setD} (const vec \&nD)} |
---|
109 | \label{classfsqmat_922f8190c13987cbcdb33ec2bf5cf105} |
---|
110 | |
---|
111 | \begin{CompactList}\small\item\em Access functions. \item\end{CompactList}\item |
---|
112 | \hypertarget{classfsqmat_bcf837b2956745e8986044f5600dbd6e}{ |
---|
113 | vec \hyperlink{classfsqmat_bcf837b2956745e8986044f5600dbd6e}{getD} ()} |
---|
114 | \label{classfsqmat_bcf837b2956745e8986044f5600dbd6e} |
---|
115 | |
---|
116 | \begin{CompactList}\small\item\em Access functions. \item\end{CompactList}\item |
---|
117 | \hypertarget{classfsqmat_03a8f49eb4d38a054ecc522be59cd2ad}{ |
---|
118 | void \hyperlink{classfsqmat_03a8f49eb4d38a054ecc522be59cd2ad}{setD} (const vec \&nD, int i)} |
---|
119 | \label{classfsqmat_03a8f49eb4d38a054ecc522be59cd2ad} |
---|
120 | |
---|
121 | \begin{CompactList}\small\item\em Access functions. \item\end{CompactList}\item |
---|
122 | \hypertarget{classfsqmat_514d1fdd8a382dbd6a774f2cf1ebd3de}{ |
---|
123 | \hyperlink{classfsqmat}{fsqmat} \& \hyperlink{classfsqmat_514d1fdd8a382dbd6a774f2cf1ebd3de}{operator+=} (const \hyperlink{classfsqmat}{fsqmat} \&A)} |
---|
124 | \label{classfsqmat_514d1fdd8a382dbd6a774f2cf1ebd3de} |
---|
125 | |
---|
126 | \begin{CompactList}\small\item\em add another \hyperlink{classfsqmat}{fsqmat} matrix \item\end{CompactList}\item |
---|
127 | \hypertarget{classfsqmat_e976bc9d899961e1d2087b0630ed33b7}{ |
---|
128 | \hyperlink{classfsqmat}{fsqmat} \& \hyperlink{classfsqmat_e976bc9d899961e1d2087b0630ed33b7}{operator-=} (const \hyperlink{classfsqmat}{fsqmat} \&A)} |
---|
129 | \label{classfsqmat_e976bc9d899961e1d2087b0630ed33b7} |
---|
130 | |
---|
131 | \begin{CompactList}\small\item\em subtrack another \hyperlink{classfsqmat}{fsqmat} matrix \item\end{CompactList}\item |
---|
132 | \hypertarget{classfsqmat_af800e7b2146da5e60897255dde80059}{ |
---|
133 | \hyperlink{classfsqmat}{fsqmat} \& \hyperlink{classfsqmat_af800e7b2146da5e60897255dde80059}{operator$\ast$=} (double x)} |
---|
134 | \label{classfsqmat_af800e7b2146da5e60897255dde80059} |
---|
135 | |
---|
136 | \begin{CompactList}\small\item\em multiply by a scalar \item\end{CompactList}\item |
---|
137 | \hypertarget{classsqmat_ecc2e2540f95a04f4449842588170f5b}{ |
---|
138 | int \hyperlink{classsqmat_ecc2e2540f95a04f4449842588170f5b}{cols} () const } |
---|
139 | \label{classsqmat_ecc2e2540f95a04f4449842588170f5b} |
---|
140 | |
---|
141 | \begin{CompactList}\small\item\em Reimplementing common functions of mat: \hyperlink{classsqmat_ecc2e2540f95a04f4449842588170f5b}{cols()}. \item\end{CompactList}\item |
---|
142 | \hypertarget{classsqmat_071e80ced9cc3b8cbb360fa7462eb646}{ |
---|
143 | int \hyperlink{classsqmat_071e80ced9cc3b8cbb360fa7462eb646}{rows} () const } |
---|
144 | \label{classsqmat_071e80ced9cc3b8cbb360fa7462eb646} |
---|
145 | |
---|
146 | \begin{CompactList}\small\item\em Reimplementing common functions of mat: \hyperlink{classsqmat_ecc2e2540f95a04f4449842588170f5b}{cols()}. \item\end{CompactList}\end{CompactItemize} |
---|
147 | \subsection*{Protected Attributes} |
---|
148 | \begin{CompactItemize} |
---|
149 | \item |
---|
150 | \hypertarget{classfsqmat_a7a1fcb9aae19d1e4daddfc9c22ce453}{ |
---|
151 | mat \hyperlink{classfsqmat_a7a1fcb9aae19d1e4daddfc9c22ce453}{M}} |
---|
152 | \label{classfsqmat_a7a1fcb9aae19d1e4daddfc9c22ce453} |
---|
153 | |
---|
154 | \begin{CompactList}\small\item\em Full matrix on which the operations are performed. \item\end{CompactList}\item |
---|
155 | \hypertarget{classsqmat_0abed904bdc0882373ba9adba919689d}{ |
---|
156 | int \hyperlink{classsqmat_0abed904bdc0882373ba9adba919689d}{dim}} |
---|
157 | \label{classsqmat_0abed904bdc0882373ba9adba919689d} |
---|
158 | |
---|
159 | \begin{CompactList}\small\item\em dimension of the square matrix \item\end{CompactList}\end{CompactItemize} |
---|
160 | \subsection*{Friends} |
---|
161 | \begin{CompactItemize} |
---|
162 | \item |
---|
163 | \hypertarget{classfsqmat_e06aba54d61e807b41bd68b5ee6ac22f}{ |
---|
164 | std::ostream \& \hyperlink{classfsqmat_e06aba54d61e807b41bd68b5ee6ac22f}{operator$<$$<$} (std::ostream \&os, const \hyperlink{classfsqmat}{fsqmat} \&sq)} |
---|
165 | \label{classfsqmat_e06aba54d61e807b41bd68b5ee6ac22f} |
---|
166 | |
---|
167 | \begin{CompactList}\small\item\em print full matrix \item\end{CompactList}\end{CompactItemize} |
---|
168 | |
---|
169 | |
---|
170 | \subsection{Detailed Description} |
---|
171 | Fake \hyperlink{classsqmat}{sqmat}. This class maps \hyperlink{classsqmat}{sqmat} operations to operations on full matrix. |
---|
172 | |
---|
173 | This class can be used to compare performance of algorithms using decomposed matrices with perormance of the same algorithms using full matrices; |
---|
174 | |
---|
175 | \subsection{Member Function Documentation} |
---|
176 | \hypertarget{classfsqmat_b36530e155667fe9f1bd58394e50c65a}{ |
---|
177 | \index{fsqmat@{fsqmat}!opupdt@{opupdt}} |
---|
178 | \index{opupdt@{opupdt}!fsqmat@{fsqmat}} |
---|
179 | \subsubsection[opupdt]{\setlength{\rightskip}{0pt plus 5cm}void fsqmat::opupdt (const vec \& {\em v}, \/ double {\em w})\hspace{0.3cm}{\tt \mbox{[}virtual\mbox{]}}}} |
---|
180 | \label{classfsqmat_b36530e155667fe9f1bd58394e50c65a} |
---|
181 | |
---|
182 | |
---|
183 | Perfroms a rank-1 update by outer product of vectors: $V = V + w v v'$. \begin{Desc} |
---|
184 | \item[Parameters:] |
---|
185 | \begin{description} |
---|
186 | \item[{\em v}]Vector forming the outer product to be added \item[{\em w}]weight of updating; can be negative\end{description} |
---|
187 | \end{Desc} |
---|
188 | BLAS-2b operation. |
---|
189 | |
---|
190 | Implements \hyperlink{classsqmat_b223484796661f2dadb5607a86ce0581}{sqmat}. |
---|
191 | |
---|
192 | References M.\hypertarget{classfsqmat_5530d2756b5d991de755e6121c9a452e}{ |
---|
193 | \index{fsqmat@{fsqmat}!mult\_\-sym@{mult\_\-sym}} |
---|
194 | \index{mult\_\-sym@{mult\_\-sym}!fsqmat@{fsqmat}} |
---|
195 | \subsubsection[mult\_\-sym]{\setlength{\rightskip}{0pt plus 5cm}void fsqmat::mult\_\-sym (const mat \& {\em C})\hspace{0.3cm}{\tt \mbox{[}virtual\mbox{]}}}} |
---|
196 | \label{classfsqmat_5530d2756b5d991de755e6121c9a452e} |
---|
197 | |
---|
198 | |
---|
199 | Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C'$. |
---|
200 | |
---|
201 | \begin{Desc} |
---|
202 | \item[Parameters:] |
---|
203 | \begin{description} |
---|
204 | \item[{\em C}]multiplying matrix, \end{description} |
---|
205 | \end{Desc} |
---|
206 | |
---|
207 | |
---|
208 | Implements \hyperlink{classsqmat_60fbbfa9e483b8187c135f787ee53afa}{sqmat}. |
---|
209 | |
---|
210 | References M. |
---|
211 | |
---|
212 | Referenced by EKF$<$ sq\_\-T $>$::bayes().\hypertarget{classfsqmat_92052a8adc2054b63e42d1373d145c89}{ |
---|
213 | \index{fsqmat@{fsqmat}!mult\_\-sym\_\-t@{mult\_\-sym\_\-t}} |
---|
214 | \index{mult\_\-sym\_\-t@{mult\_\-sym\_\-t}!fsqmat@{fsqmat}} |
---|
215 | \subsubsection[mult\_\-sym\_\-t]{\setlength{\rightskip}{0pt plus 5cm}void fsqmat::mult\_\-sym\_\-t (const mat \& {\em C})\hspace{0.3cm}{\tt \mbox{[}virtual\mbox{]}}}} |
---|
216 | \label{classfsqmat_92052a8adc2054b63e42d1373d145c89} |
---|
217 | |
---|
218 | |
---|
219 | Inplace symmetric multiplication by a SQUARE transpose of matrix $C$, i.e. $V = C'*V*C$. |
---|
220 | |
---|
221 | \begin{Desc} |
---|
222 | \item[Parameters:] |
---|
223 | \begin{description} |
---|
224 | \item[{\em C}]multiplying matrix, \end{description} |
---|
225 | \end{Desc} |
---|
226 | |
---|
227 | |
---|
228 | Implements \hyperlink{classsqmat_6909e906da17725b1b80f3cae7cf3325}{sqmat}. |
---|
229 | |
---|
230 | References M.\hypertarget{classfsqmat_9fa853e1ca28f2a1a1c43377e798ecb1}{ |
---|
231 | \index{fsqmat@{fsqmat}!inv@{inv}} |
---|
232 | \index{inv@{inv}!fsqmat@{fsqmat}} |
---|
233 | \subsubsection[inv]{\setlength{\rightskip}{0pt plus 5cm}void fsqmat::inv ({\bf fsqmat} \& {\em Inv})\hspace{0.3cm}{\tt \mbox{[}virtual\mbox{]}}}} |
---|
234 | \label{classfsqmat_9fa853e1ca28f2a1a1c43377e798ecb1} |
---|
235 | |
---|
236 | |
---|
237 | Matrix inversion preserving the chosen form. |
---|
238 | |
---|
239 | \begin{Desc} |
---|
240 | \item[Parameters:] |
---|
241 | \begin{description} |
---|
242 | \item[{\em Inv}]a space where the inverse is stored. \end{description} |
---|
243 | \end{Desc} |
---|
244 | |
---|
245 | |
---|
246 | References M. |
---|
247 | |
---|
248 | Referenced by EKF$<$ sq\_\-T $>$::bayes(), and egiw::evallog\_\-nn().\hypertarget{classfsqmat_842a774077ee34ac3c36d180ab33e103}{ |
---|
249 | \index{fsqmat@{fsqmat}!sqrt\_\-mult@{sqrt\_\-mult}} |
---|
250 | \index{sqrt\_\-mult@{sqrt\_\-mult}!fsqmat@{fsqmat}} |
---|
251 | \subsubsection[sqrt\_\-mult]{\setlength{\rightskip}{0pt plus 5cm}vec fsqmat::sqrt\_\-mult (const vec \& {\em v}) const\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}} |
---|
252 | \label{classfsqmat_842a774077ee34ac3c36d180ab33e103} |
---|
253 | |
---|
254 | |
---|
255 | Multiplies square root of $V$ by vector $x$. |
---|
256 | |
---|
257 | Used e.g. in generating normal samples. |
---|
258 | |
---|
259 | Implements \hyperlink{classsqmat_6b79438b5d7544a9c8e110a145355d8f}{sqmat}. |
---|
260 | |
---|
261 | References M. |
---|
262 | |
---|
263 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
264 | \item |
---|
265 | work/git/mixpp/bdm/math/\hyperlink{libDC_8h}{libDC.h}\item |
---|
266 | work/git/mixpp/bdm/math/libDC.cpp\end{CompactItemize} |
---|