\section{Kalman$<$ sq\_\-T $>$ Class Template Reference}
\label{classKalman}\index{Kalman@{Kalman}}
\doxyref{Kalman}{p.}{classKalman} filter with covariance matrices in square root form.  


{\tt \#include $<$libKF.h$>$}

Inheritance diagram for Kalman$<$ sq\_\-T $>$:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{classKalman__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for Kalman$<$ sq\_\-T $>$:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=81pt]{classKalman__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Kalman} ({\bf RV} rvx0, {\bf RV} rvy0, {\bf RV} rvu0)\label{classKalman_3d56b0a97b8c1e25fdd3b10eef3c2ad3}

\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
{\bf Kalman} (const {\bf Kalman}$<$ sq\_\-T $>$ \&K0)\label{classKalman_ce38e31810aea4db45a83ad05eaba009}

\begin{CompactList}\small\item\em Copy constructor. \item\end{CompactList}\item 
void {\bf set\_\-parameters} (const mat \&A0, const mat \&B0, const mat \&C0, const mat \&D0, const sq\_\-T \&R0, const sq\_\-T \&Q0)\label{classKalman_239b28a0380946f5749b2f8d2807f93a}

\begin{CompactList}\small\item\em Set parameters with check of relevance. \item\end{CompactList}\item 
void {\bf set\_\-est} (const vec \&mu0, const sq\_\-T \&P0)\label{classKalman_80bcf29466d9a9dd2b8f74699807d0c0}

\begin{CompactList}\small\item\em Set estimate values, used e.g. in initialization. \item\end{CompactList}\item 
void {\bf bayes} (const vec \&dt)\label{classKalman_7750ffd73f261828a32c18aaeb65c75c}

\begin{CompactList}\small\item\em Here dt = [yt;ut] of appropriate dimensions. \item\end{CompactList}\item 
{\bf epdf} \& {\bf \_\-epdf} ()\label{classKalman_a213c57aef55b2645e550bed81cfc0d4}

\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
mat \& {\bf \_\-\_\-K} ()\label{classKalman_980fcd41c6c548c5da7b8b67c8e6da79}

\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
vec {\bf \_\-dP} ()\label{classKalman_ac9540f3850b74d89a5fe4db6fc358ce}

\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
void {\bf bayes} (mat Dt)\label{classBM_87b07867fd4c133aa89a18543f68d9f9}

\begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item 
const {\bf RV} \& {\bf \_\-rv} () const \label{classBM_126bd2595c48e311fc2a7ab72876092a}

\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
double {\bf \_\-ll} () const \label{classBM_87f4a547d2c29180be88175e5eab9c88}

\begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
{\bf RV} {\bf rvy}\label{classKalman_7501230c2fafa3655887d2da23b3184c}

\begin{CompactList}\small\item\em Indetifier of output rv. \item\end{CompactList}\item 
{\bf RV} {\bf rvu}\label{classKalman_44a16ffd5ac1e6e39bae34fea9e1e498}

\begin{CompactList}\small\item\em Indetifier of exogeneous rv. \item\end{CompactList}\item 
int {\bf dimx}\label{classKalman_39c8c403b46fa3b8c7da77cb2e3729eb}

\begin{CompactList}\small\item\em cache of rv.count() \item\end{CompactList}\item 
int {\bf dimy}\label{classKalman_ba17b956df1e38b31fbbc299c8213b6a}

\begin{CompactList}\small\item\em cache of rvy.count() \item\end{CompactList}\item 
int {\bf dimu}\label{classKalman_b0153795a1444b6968a86409c778d9ce}

\begin{CompactList}\small\item\em cache of rvu.count() \item\end{CompactList}\item 
mat {\bf A}\label{classKalman_5e02efe86ee91e9c74b93b425fe060b9}

\begin{CompactList}\small\item\em Matrix A. \item\end{CompactList}\item 
mat {\bf B}\label{classKalman_dc87704284a6c0bca13bf51f4345a50a}

\begin{CompactList}\small\item\em Matrix B. \item\end{CompactList}\item 
mat {\bf C}\label{classKalman_86a805cd6515872d1132ad0d6eb5dc13}

\begin{CompactList}\small\item\em Matrix C. \item\end{CompactList}\item 
mat {\bf D}\label{classKalman_d69f774ba3335c970c1c5b1d182f4dd1}

\begin{CompactList}\small\item\em Matrix D. \item\end{CompactList}\item 
sq\_\-T {\bf Q}\label{classKalman_9b69015c800eb93f3ee49da23a6f55d9}

\begin{CompactList}\small\item\em Matrix Q in square-root form. \item\end{CompactList}\item 
sq\_\-T {\bf R}\label{classKalman_11d171dc0e0ab111c56a70f98b97b3ec}

\begin{CompactList}\small\item\em Matrix R in square-root form. \item\end{CompactList}\item 
{\bf enorm}$<$ sq\_\-T $>$ {\bf est}\label{classKalman_5568c74bac67ae6d3b1061dba60c9424}

\begin{CompactList}\small\item\em posterior density on \$x\_\-t\$ \item\end{CompactList}\item 
{\bf enorm}$<$ sq\_\-T $>$ {\bf fy}\label{classKalman_e580ab06483952bd03f2e651763e184f}

\begin{CompactList}\small\item\em preditive density on \$y\_\-t\$ \item\end{CompactList}\item 
mat {\bf \_\-K}\label{classKalman_d422f51467c7a06174af2476d2826132}

\begin{CompactList}\small\item\em placeholder for \doxyref{Kalman}{p.}{classKalman} gain \item\end{CompactList}\item 
vec \& {\bf \_\-yp}\label{classKalman_764bbc95238eda11fc81c5ebd0b1dcfd}

\begin{CompactList}\small\item\em cache of fy.mu \item\end{CompactList}\item 
sq\_\-T \& {\bf \_\-Ry}\label{classKalman_45c9f928d2d62e0c884900fb3380f904}

\begin{CompactList}\small\item\em cache of fy.R \item\end{CompactList}\item 
vec \& {\bf \_\-mu}\label{classKalman_fe803a81d2d847b0b1db3c6b29c18061}

\begin{CompactList}\small\item\em cache of est.mu \item\end{CompactList}\item 
sq\_\-T \& {\bf \_\-P}\label{classKalman_9fb808cc94a4c2652e1fb93be9bb7dcf}

\begin{CompactList}\small\item\em cache of est.R \item\end{CompactList}\item 
{\bf RV} {\bf rv}\label{classBM_af00f0612fabe66241dd507188cdbf88}

\begin{CompactList}\small\item\em Random variable of the posterior. \item\end{CompactList}\item 
double {\bf ll}\label{classBM_5623fef6572a08c2b53b8c87b82dc979}

\begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item 
bool {\bf evalll}\label{classBM_bf6fb59b30141074f8ee1e2f43d03129}

\begin{CompactList}\small\item\em If true, the filter will compute likelihood of the data record and store it in {\tt ll} . Set to false if you want to save time. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$class sq\_\-T$>$ class Kalman$<$ sq\_\-T $>$}

\doxyref{Kalman}{p.}{classKalman} filter with covariance matrices in square root form. 

Parameter evolution model:\[ x_t = A x_{t-1} + B u_t + Q^{1/2} e_t \] Observation model: \[ y_t = C x_{t-1} + C u_t + Q^{1/2} w_t. \] Where \$e\_\-t\$ and \$w\_\-t\$ are independent vectors Normal(0,1)-distributed disturbances. 

The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
work/mixpp/bdm/estim/{\bf libKF.h}\end{CompactItemize}
