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