\hypertarget{forward__algorithm_8h}{
\subsection{forward\_\-algorithm.h File Reference}
\label{forward__algorithm_8h}\index{forward\_\-algorithm.h@{forward\_\-algorithm.h}}
}


Contains an implementation fo the forward algorithm.  


{\ttfamily \#include $<$tr1/tuple$>$}\par
{\ttfamily \#include $<$tr1/array$>$}\par
{\ttfamily \#include $<$TooN/TooN.h$>$}\par
{\ttfamily \#include $<$vector$>$}\par
{\ttfamily \#include $<$cmath$>$}\par
\subsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
double \hyperlink{group__gUtility_ga8180400c575af0fd0a6338a75875bd22}{ln} (double x)
\item 
{\footnotesize template$<$int States, class Btype , class Otype $>$ }\\std::tr1::tuple$<$ double, TooN::Vector$<$ Btype::NumParameters $>$, TooN::Matrix$<$ Btype::NumParameters $>$ $>$ \hyperlink{group__gHMM_gad8e396017fa83143c23cef23eb7aa52a}{forward\_\-algorithm\_\-hessian} (TooN::Matrix$<$ States $>$ A, TooN::Vector$<$ States $>$ pi, const Btype \&B, const std::vector$<$ Otype $>$ \&O, bool compute\_\-deriv=1, bool compute\_\-hessian=1)
\item 
{\footnotesize template$<$int States, class Btype , class Otype $>$ }\\double \hyperlink{group__gHMM_ga15931236a398994295355281ab9d3aad}{forward\_\-algorithm} (TooN::Matrix$<$ States $>$ A, TooN::Vector$<$ States $>$ pi, const Btype \&B, const std::vector$<$ Otype $>$ \&O)
\item 
{\footnotesize template$<$int States, class Btype , class Otype $>$ }\\std::pair$<$ double, TooN::Vector$<$ Btype::NumParameters $>$ $>$ \hyperlink{group__gHMM_ga930d55cd3b8449c37365608136c01f6b}{forward\_\-algorithm\_\-deriv} (TooN::Matrix$<$ States $>$ A, TooN::Vector$<$ States $>$ pi, const Btype \&B, const std::vector$<$ Otype $>$ \&O)
\item 
{\footnotesize template$<$int States, class Btype , class Otype $>$ }\\std::vector$<$ std::tr1::array$<$ double, States $>$ $>$ \hyperlink{group__gHMM_ga7ad792b5840a0d87cf09b3ca1f965b25}{forward\_\-algorithm\_\-delta} (TooN::Matrix$<$ States $>$ A, TooN::Vector$<$ States $>$ pi, const Btype \&B, const std::vector$<$ Otype $>$ \&O)
\item 
{\footnotesize template$<$int States, class Btype , class Otype $>$ }\\void \hyperlink{group__gHMM_ga4b8c925bc5dce88e8360e7fb6d3eeba3}{forward\_\-algorithm\_\-delta2} (TooN::Matrix$<$ States $>$ A, TooN::Vector$<$ States $>$ pi, const Btype \&B, const std::vector$<$ Otype $>$ \&O, std::vector$<$ std::tr1::array$<$ double, States $>$ $>$ \&delta)
\item 
{\footnotesize template$<$int States, class Btype , class Otype $>$ }\\std::pair$<$ std::vector$<$ std::tr1::array$<$ double, States $>$ $>$, std::vector$<$ std::tr1::array$<$ double, States $>$ $>$ $>$ \hyperlink{group__gHMM_gae3026a883d9181ca6d0a45f2b90907cb}{forward\_\-backward\_\-algorithm} (TooN::Matrix$<$ States $>$ A, TooN::Vector$<$ States $>$ pi, const Btype \&B, const std::vector$<$ Otype $>$ \&O)
\item 
{\footnotesize template$<$class A , class Rng $>$ }\\int \hyperlink{group__gHMM_ga9e09dfeb90185e6608812cfa02685649}{select\_\-random\_\-element} (const A \&v, const double scale, Rng \&rng)
\item 
{\footnotesize template$<$int N, class Rng $>$ }\\int \hyperlink{group__gHMM_ga48e8bcf73f2d3d195aa2bd00dc341680}{sample\_\-unscaled\_\-log} (std::tr1::array$<$ double, N $>$ a, Rng \&rng)
\item 
{\footnotesize template$<$int States, class StateType , class Rng $>$ }\\std::vector$<$ StateType $>$ \hyperlink{group__gHMM_ga225966a4ff18994642fb6fc0a88fca1f}{backward\_\-sampling} (TooN::Matrix$<$ States $>$ A, const std::vector$<$ std::tr1::array$<$ double, States $>$ $>$ \&delta, Rng \&rng)
\end{DoxyCompactItemize}


\subsubsection{Detailed Description}
Contains an implementation fo the forward algorithm. 

Definition in file \hyperlink{forward__algorithm_8h_source}{forward\_\-algorithm.h}.

