1 | \section{chmat Class Reference} |
---|
2 | \label{classchmat}\index{chmat@{chmat}} |
---|
3 | Symmetric matrix stored in square root decomposition using upper cholesky. |
---|
4 | |
---|
5 | |
---|
6 | {\tt \#include $<$chmat.h$>$} |
---|
7 | |
---|
8 | Inheritance diagram for chmat:\nopagebreak |
---|
9 | \begin{figure}[H] |
---|
10 | \begin{center} |
---|
11 | \leavevmode |
---|
12 | \includegraphics[width=45pt]{classchmat__inherit__graph} |
---|
13 | \end{center} |
---|
14 | \end{figure} |
---|
15 | Collaboration diagram for chmat:\nopagebreak |
---|
16 | \begin{figure}[H] |
---|
17 | \begin{center} |
---|
18 | \leavevmode |
---|
19 | \includegraphics[width=45pt]{classchmat__coll__graph} |
---|
20 | \end{center} |
---|
21 | \end{figure} |
---|
22 | \subsection*{Public Member Functions} |
---|
23 | \begin{CompactItemize} |
---|
24 | \item |
---|
25 | virtual void {\bf opupdt} (const vec \&v, double w) |
---|
26 | \item |
---|
27 | virtual mat {\bf to\_\-mat} ()\label{classchmat_a37e2c726e4fc3ad50b26ac2ca6c1452} |
---|
28 | |
---|
29 | \begin{CompactList}\small\item\em Conversion to full matrix. \item\end{CompactList}\item |
---|
30 | virtual void {\bf mult\_\-sym} (const mat \&C) |
---|
31 | \begin{CompactList}\small\item\em Inplace symmetric multiplication by a SQUARE matrix \$C\$, i.e. \$V = C$\ast$V$\ast$C'\$. \item\end{CompactList}\item |
---|
32 | virtual void {\bf mult\_\-sym\_\-t} (const mat \&C) |
---|
33 | \begin{CompactList}\small\item\em Inplace symmetric multiplication by a SQUARE transpose of matrix \$C\$, i.e. \$V = C'$\ast$V$\ast$C\$. \item\end{CompactList}\item |
---|
34 | virtual double {\bf logdet} () const \label{classchmat_b504ca818203b13e667cb3c503980382} |
---|
35 | |
---|
36 | \begin{CompactList}\small\item\em Logarithm of a determinant. \item\end{CompactList}\item |
---|
37 | virtual vec {\bf sqrt\_\-mult} (const vec \&v) const |
---|
38 | \begin{CompactList}\small\item\em Multiplies square root of \$V\$ by vector \$x\$. \item\end{CompactList}\item |
---|
39 | virtual double {\bf qform} (const vec \&v) const \label{classchmat_6807737c7ffdb7041256b51db7592248} |
---|
40 | |
---|
41 | \begin{CompactList}\small\item\em Evaluates quadratic form \$x= v'$\ast$V$\ast$v\$;. \item\end{CompactList}\item |
---|
42 | virtual void {\bf clear} ()\label{classchmat_d0a995d312ecc11d3b43693f5e224ba9} |
---|
43 | |
---|
44 | \begin{CompactList}\small\item\em Clearing matrix so that it corresponds to zeros. \item\end{CompactList}\item |
---|
45 | virtual void \textbf{inv} (mat \&Inv)\label{classchmat_9875dc244d23ccec039fd2e5447a9cf7} |
---|
46 | |
---|
47 | \item |
---|
48 | virtual void \textbf{inv} ({\bf chmat} \&Inv)\label{classchmat_465a895ce060429a35ee451182aa546a} |
---|
49 | |
---|
50 | \item |
---|
51 | virtual {\bf $\sim$chmat} ()\label{classchmat_ba62fbf7cb8e065a4f3d24457824e89b} |
---|
52 | |
---|
53 | \begin{CompactList}\small\item\em Destructor for future use;. \item\end{CompactList}\item |
---|
54 | {\bf chmat} (const int dim0)\label{classchmat_fdd73b0c596161637fd25bdf2c670c39} |
---|
55 | |
---|
56 | \begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item |
---|
57 | {\bf chmat} (const mat \&M)\label{classchmat_8334a00f30f0a05f893c2aeec395ef10} |
---|
58 | |
---|
59 | \begin{CompactList}\small\item\em Default constructor (m3k:cholform). \item\end{CompactList}\item |
---|
60 | mat \& {\bf \_\-Ch} ()\label{classchmat_9c50d31c999d85d8e9d8cf2b69b6ac8c} |
---|
61 | |
---|
62 | \begin{CompactList}\small\item\em Access function. \item\end{CompactList}\item |
---|
63 | int {\bf cols} () const \label{classsqmat_ecc2e2540f95a04f4449842588170f5b} |
---|
64 | |
---|
65 | \begin{CompactList}\small\item\em Reimplementing common functions of mat: \doxyref{cols()}{p.}{classsqmat_ecc2e2540f95a04f4449842588170f5b}. \item\end{CompactList}\item |
---|
66 | int {\bf rows} () const \label{classsqmat_071e80ced9cc3b8cbb360fa7462eb646} |
---|
67 | |
---|
68 | \begin{CompactList}\small\item\em Reimplementing common functions of mat: \doxyref{cols()}{p.}{classsqmat_ecc2e2540f95a04f4449842588170f5b}. \item\end{CompactList}\end{CompactItemize} |
---|
69 | \subsection*{Protected Attributes} |
---|
70 | \begin{CompactItemize} |
---|
71 | \item |
---|
72 | mat {\bf Ch}\label{classchmat_95158bb150f5e7f939168abcd577fd9c} |
---|
73 | |
---|
74 | \begin{CompactList}\small\item\em Upper chollesky triangle of the matrix. \item\end{CompactList}\item |
---|
75 | int {\bf dim}\label{classsqmat_0abed904bdc0882373ba9adba919689d} |
---|
76 | |
---|
77 | \begin{CompactList}\small\item\em dimension of the square matrix \item\end{CompactList}\end{CompactItemize} |
---|
78 | |
---|
79 | |
---|
80 | \subsection{Detailed Description} |
---|
81 | Symmetric matrix stored in square root decomposition using upper cholesky. |
---|
82 | |
---|
83 | This matrix represent \$A=Ch Ch'\$ where only the upper triangle is stored; |
---|
84 | |
---|
85 | \subsection{Member Function Documentation} |
---|
86 | \index{chmat@{chmat}!opupdt@{opupdt}} |
---|
87 | \index{opupdt@{opupdt}!chmat@{chmat}} |
---|
88 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void chmat::opupdt (const vec \& {\em v}, double {\em w})\hspace{0.3cm}{\tt [virtual]}}\label{classchmat_bbc2d98d7455b1f38828907d442836bf} |
---|
89 | |
---|
90 | |
---|
91 | Perfroms a rank-1 update by outer product of vectors: \$V = V + w v v'\$. \begin{Desc} |
---|
92 | \item[Parameters:] |
---|
93 | \begin{description} |
---|
94 | \item[{\em v}]Vector forming the outer product to be added \item[{\em w}]weight of updating; can be negative\end{description} |
---|
95 | \end{Desc} |
---|
96 | BLAS-2b operation. |
---|
97 | |
---|
98 | Implements {\bf sqmat} \doxyref{}{p.}{classsqmat_b223484796661f2dadb5607a86ce0581}.\index{chmat@{chmat}!mult_sym@{mult\_\-sym}} |
---|
99 | \index{mult_sym@{mult\_\-sym}!chmat@{chmat}} |
---|
100 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void chmat::mult\_\-sym (const mat \& {\em C})\hspace{0.3cm}{\tt [virtual]}}\label{classchmat_66f509f92b0ccf020e2a2a32566e0777} |
---|
101 | |
---|
102 | |
---|
103 | Inplace symmetric multiplication by a SQUARE matrix \$C\$, i.e. \$V = C$\ast$V$\ast$C'\$. |
---|
104 | |
---|
105 | \begin{Desc} |
---|
106 | \item[Parameters:] |
---|
107 | \begin{description} |
---|
108 | \item[{\em C}]multiplying matrix, \end{description} |
---|
109 | \end{Desc} |
---|
110 | |
---|
111 | |
---|
112 | Implements {\bf sqmat} \doxyref{}{p.}{classsqmat_60fbbfa9e483b8187c135f787ee53afa}.\index{chmat@{chmat}!mult_sym_t@{mult\_\-sym\_\-t}} |
---|
113 | \index{mult_sym_t@{mult\_\-sym\_\-t}!chmat@{chmat}} |
---|
114 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void chmat::mult\_\-sym\_\-t (const mat \& {\em C})\hspace{0.3cm}{\tt [virtual]}}\label{classchmat_07f50d1332b901eee962e8b1913102f7} |
---|
115 | |
---|
116 | |
---|
117 | Inplace symmetric multiplication by a SQUARE transpose of matrix \$C\$, i.e. \$V = C'$\ast$V$\ast$C\$. |
---|
118 | |
---|
119 | \begin{Desc} |
---|
120 | \item[Parameters:] |
---|
121 | \begin{description} |
---|
122 | \item[{\em C}]multiplying matrix, \end{description} |
---|
123 | \end{Desc} |
---|
124 | |
---|
125 | |
---|
126 | Implements {\bf sqmat} \doxyref{}{p.}{classsqmat_6909e906da17725b1b80f3cae7cf3325}.\index{chmat@{chmat}!sqrt_mult@{sqrt\_\-mult}} |
---|
127 | \index{sqrt_mult@{sqrt\_\-mult}!chmat@{chmat}} |
---|
128 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}vec chmat::sqrt\_\-mult (const vec \& {\em v}) const\hspace{0.3cm}{\tt [inline, virtual]}}\label{classchmat_b22aa239dbaca33e3fb93b4f674d7051} |
---|
129 | |
---|
130 | |
---|
131 | Multiplies square root of \$V\$ by vector \$x\$. |
---|
132 | |
---|
133 | Used e.g. in generating normal samples. |
---|
134 | |
---|
135 | Implements {\bf sqmat} \doxyref{}{p.}{classsqmat_6b79438b5d7544a9c8e110a145355d8f}. |
---|
136 | |
---|
137 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
138 | \item |
---|
139 | work/mixpp/bdm/math/{\bf chmat.h}\item |
---|
140 | work/mixpp/bdm/math/chmat.cpp\end{CompactItemize} |
---|