\hypertarget{classRV}{
\section{RV Class Reference}
\label{classRV}\index{RV@{RV}}
}
Class representing variables, most often random variables.  


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

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\hypertarget{classRV_bedfd8d197f0a7ac28a4d412dfc5b8af}{
\hyperlink{classRV_bedfd8d197f0a7ac28a4d412dfc5b8af}{RV} (Array$<$ std::string $>$ in\_\-names, ivec in\_\-sizes, ivec in\_\-times)}
\label{classRV_bedfd8d197f0a7ac28a4d412dfc5b8af}

\begin{CompactList}\small\item\em Full constructor. \item\end{CompactList}\item 
\hypertarget{classRV_7b88a74204fdf044e02f2807769839b7}{
\hyperlink{classRV_7b88a74204fdf044e02f2807769839b7}{RV} (Array$<$ std::string $>$ in\_\-names, ivec in\_\-sizes)}
\label{classRV_7b88a74204fdf044e02f2807769839b7}

\begin{CompactList}\small\item\em Constructor with times=0. \item\end{CompactList}\item 
\hypertarget{classRV_261702f85831392d7d67e2bcf0b69960}{
\hyperlink{classRV_261702f85831392d7d67e2bcf0b69960}{RV} (Array$<$ std::string $>$ in\_\-names)}
\label{classRV_261702f85831392d7d67e2bcf0b69960}

\begin{CompactList}\small\item\em Constructor with sizes=1, times=0. \item\end{CompactList}\item 
\hypertarget{classRV_6a22f5c06d6403870d4e414b1993bf9e}{
\hyperlink{classRV_6a22f5c06d6403870d4e414b1993bf9e}{RV} ()}
\label{classRV_6a22f5c06d6403870d4e414b1993bf9e}

\begin{CompactList}\small\item\em Constructor of empty \hyperlink{classRV}{RV}. \item\end{CompactList}\item 
\hypertarget{classRV_f5c7b8bd589eef09ccdf3329a0addea0}{
int \hyperlink{classRV_f5c7b8bd589eef09ccdf3329a0addea0}{count} () const }
\label{classRV_f5c7b8bd589eef09ccdf3329a0addea0}

\begin{CompactList}\small\item\em Return number of scalars in the \hyperlink{classRV}{RV}. \item\end{CompactList}\item 
\hypertarget{classRV_c114a6f3ff06796cc2f4dacba74291eb}{
int \hyperlink{classRV_c114a6f3ff06796cc2f4dacba74291eb}{length} () const }
\label{classRV_c114a6f3ff06796cc2f4dacba74291eb}

\begin{CompactList}\small\item\em Return length (number of entries) of the \hyperlink{classRV}{RV}. \item\end{CompactList}\item 
ivec \hyperlink{classRV_0c493a7a897f4d75682f4264e40779a1}{findself} (const \hyperlink{classRV}{RV} \&rv2) const 
\begin{CompactList}\small\item\em Find indexes of self in another rv,. \item\end{CompactList}\item 
\hypertarget{classRV_82cc7fa22ce91cf461a522ad62014c65}{
bool \hyperlink{classRV_82cc7fa22ce91cf461a522ad62014c65}{equal} (const \hyperlink{classRV}{RV} \&rv2) const }
\label{classRV_82cc7fa22ce91cf461a522ad62014c65}

\begin{CompactList}\small\item\em Compare if {\tt rv2} is identical to this {\tt \hyperlink{classRV}{RV}}. \item\end{CompactList}\item 
bool \hyperlink{classRV_935790526b630dec4ffefa9ec0c2b6fb}{add} (const \hyperlink{classRV}{RV} \&rv2)
\begin{CompactList}\small\item\em Add (concat) another variable to the current one,. \item\end{CompactList}\item 
\hypertarget{classRV_b9d175c327c21488b1e2fb756a84e149}{
\hyperlink{classRV}{RV} \hyperlink{classRV_b9d175c327c21488b1e2fb756a84e149}{subt} (const \hyperlink{classRV}{RV} \&rv2) const }
\label{classRV_b9d175c327c21488b1e2fb756a84e149}

\begin{CompactList}\small\item\em Subtract another variable from the current one. \item\end{CompactList}\item 
\hypertarget{classRV_b26d25a122be3303806af7726a625a0f}{
\hyperlink{classRV}{RV} \hyperlink{classRV_b26d25a122be3303806af7726a625a0f}{subselect} (const ivec \&ind) const }
\label{classRV_b26d25a122be3303806af7726a625a0f}

\begin{CompactList}\small\item\em Select only variables at indeces ind. \item\end{CompactList}\item 
\hypertarget{classRV_248dfb2387976db2658489347669278c}{
\hyperlink{classRV}{RV} \hyperlink{classRV_248dfb2387976db2658489347669278c}{operator()} (const ivec \&ind) const }
\label{classRV_248dfb2387976db2658489347669278c}

\begin{CompactList}\small\item\em Select only variables at indeces ind. \item\end{CompactList}\item 
\hypertarget{classRV_e0a158d53ab9430627241f844f4c9a60}{
void \hyperlink{classRV_e0a158d53ab9430627241f844f4c9a60}{t} (int delta)}
\label{classRV_e0a158d53ab9430627241f844f4c9a60}

\begin{CompactList}\small\item\em Shift {\tt time} shifted by delta. \item\end{CompactList}\item 
\hypertarget{classRV_52f3ade796814da627ff5a44d00986be}{
\hyperlink{classstr}{str} \hyperlink{classRV_52f3ade796814da627ff5a44d00986be}{tostr} () const }
\label{classRV_52f3ade796814da627ff5a44d00986be}

\begin{CompactList}\small\item\em generate {\tt \hyperlink{classstr}{str}} from rv, by expanding sizes \item\end{CompactList}\item 
ivec \hyperlink{classRV_bb724fa4e2d9ed7bfd0993b5975018a4}{dataind} (const \hyperlink{classRV}{RV} \&crv) const 
\begin{CompactList}\small\item\em generate indeces into \item\end{CompactList}\item 
\hypertarget{classRV_b88ef5124713c9e30fd9446846b3f044}{
Array$<$ std::string $>$ \& \hyperlink{classRV_b88ef5124713c9e30fd9446846b3f044}{\_\-names} ()}
\label{classRV_b88ef5124713c9e30fd9446846b3f044}

\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
\hypertarget{classRV_4a0069bc69f5a98d7ce9ed59077f2e6c}{
int \hyperlink{classRV_4a0069bc69f5a98d7ce9ed59077f2e6c}{id} (int at)}
\label{classRV_4a0069bc69f5a98d7ce9ed59077f2e6c}

\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
\hypertarget{classRV_20db23a5585d64a6e24404cc8379bc28}{
int \hyperlink{classRV_20db23a5585d64a6e24404cc8379bc28}{size} (int at)}
\label{classRV_20db23a5585d64a6e24404cc8379bc28}

\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
\hypertarget{classRV_af068cf478864fe1a4fbfc6b4693b088}{
int \hyperlink{classRV_af068cf478864fe1a4fbfc6b4693b088}{time} (int at)}
\label{classRV_af068cf478864fe1a4fbfc6b4693b088}

\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
\hypertarget{classRV_3ae4dd6e368f814a02710636ac8e1721}{
std::string \hyperlink{classRV_3ae4dd6e368f814a02710636ac8e1721}{name} (int at)}
\label{classRV_3ae4dd6e368f814a02710636ac8e1721}

\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
\hypertarget{classRV_f58db96c9f5b8a538e26f154b1047c62}{
void \hyperlink{classRV_f58db96c9f5b8a538e26f154b1047c62}{set\_\-id} (int at, int id0)}
\label{classRV_f58db96c9f5b8a538e26f154b1047c62}

\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
\hypertarget{classRV_70b24c39c5130b1e4753fa2eef495433}{
void \hyperlink{classRV_70b24c39c5130b1e4753fa2eef495433}{set\_\-size} (int at, int size0)}
\label{classRV_70b24c39c5130b1e4753fa2eef495433}

\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
\hypertarget{classRV_af668289c016d12ac2a9ddb85416006b}{
void \hyperlink{classRV_af668289c016d12ac2a9ddb85416006b}{set\_\-time} (int at, int time0)}
\label{classRV_af668289c016d12ac2a9ddb85416006b}

\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
\hypertarget{classRV_fc4a3175ff678cba7ae4109654f66ce5}{
void \hyperlink{classRV_fc4a3175ff678cba7ae4109654f66ce5}{newids} ()}
\label{classRV_fc4a3175ff678cba7ae4109654f66ce5}

\begin{CompactList}\small\item\em Assign unused ids to this rv. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
\hypertarget{classRV_f2396efe2e6d656ebe9e6f06018cbe25}{
int \hyperlink{classRV_f2396efe2e6d656ebe9e6f06018cbe25}{tsize}}
\label{classRV_f2396efe2e6d656ebe9e6f06018cbe25}

\begin{CompactList}\small\item\em size = sum of sizes \item\end{CompactList}\item 
\hypertarget{classRV_0d7b36e2bbccf880c8fcf1e8cc43c1a9}{
int \hyperlink{classRV_0d7b36e2bbccf880c8fcf1e8cc43c1a9}{len}}
\label{classRV_0d7b36e2bbccf880c8fcf1e8cc43c1a9}

\begin{CompactList}\small\item\em len = number of individual rvs \item\end{CompactList}\item 
\hypertarget{classRV_1bd7165140f4b880a7f344bbb1c433f9}{
ivec \hyperlink{classRV_1bd7165140f4b880a7f344bbb1c433f9}{ids}}
\label{classRV_1bd7165140f4b880a7f344bbb1c433f9}

\begin{CompactList}\small\item\em Vector of unique IDs. \item\end{CompactList}\item 
\hypertarget{classRV_c878aab13f34b420e1eb5b485563682b}{
ivec \hyperlink{classRV_c878aab13f34b420e1eb5b485563682b}{sizes}}
\label{classRV_c878aab13f34b420e1eb5b485563682b}

\begin{CompactList}\small\item\em Vector of sizes. \item\end{CompactList}\item 
\hypertarget{classRV_646e530c47a2dd38254b778d9f11ac89}{
ivec \hyperlink{classRV_646e530c47a2dd38254b778d9f11ac89}{times}}
\label{classRV_646e530c47a2dd38254b778d9f11ac89}

\begin{CompactList}\small\item\em Vector of shifts from current time. \item\end{CompactList}\item 
\hypertarget{classRV_df5d0030b277a1db2f1fd5fb79152acb}{
Array$<$ std::string $>$ \hyperlink{classRV_df5d0030b277a1db2f1fd5fb79152acb}{names}}
\label{classRV_df5d0030b277a1db2f1fd5fb79152acb}

\begin{CompactList}\small\item\em Array of names. \item\end{CompactList}\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
\hypertarget{classRV_cad6f15535d10437f6690cb4492176a8}{
std::ostream \& \hyperlink{classRV_cad6f15535d10437f6690cb4492176a8}{operator$<$$<$} (std::ostream \&os, const \hyperlink{classRV}{RV} \&rv)}
\label{classRV_cad6f15535d10437f6690cb4492176a8}

\begin{CompactList}\small\item\em Printing output e.g. for debugging. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Class representing variables, most often random variables. 

More?... 

\subsection{Member Function Documentation}
\hypertarget{classRV_0c493a7a897f4d75682f4264e40779a1}{
\index{RV@{RV}!findself@{findself}}
\index{findself@{findself}!RV@{RV}}
\subsubsection[findself]{\setlength{\rightskip}{0pt plus 5cm}ivec RV::findself (const {\bf RV} \& {\em rv2}) const}}
\label{classRV_0c493a7a897f4d75682f4264e40779a1}


Find indexes of self in another rv,. 

\begin{Desc}
\item[Returns:]ivec of the same size as self. \end{Desc}


References ids, len, length(), and times.

Referenced by add(), and subt().\hypertarget{classRV_935790526b630dec4ffefa9ec0c2b6fb}{
\index{RV@{RV}!add@{add}}
\index{add@{add}!RV@{RV}}
\subsubsection[add]{\setlength{\rightskip}{0pt plus 5cm}bool RV::add (const {\bf RV} \& {\em rv2})}}
\label{classRV_935790526b630dec4ffefa9ec0c2b6fb}


Add (concat) another variable to the current one,. 

\begin{Desc}
\item[Returns:]true if all rv2 were added, false if rv2 is in conflict \end{Desc}


References findself(), ids, len, names, sizes, times, and tsize.

Referenced by concat(), compositepdf::getrv(), MPF$<$ BM\_\-T $>$::MPF(), and compositepdf::setrvc().\hypertarget{classRV_bb724fa4e2d9ed7bfd0993b5975018a4}{
\index{RV@{RV}!dataind@{dataind}}
\index{dataind@{dataind}!RV@{RV}}
\subsubsection[dataind]{\setlength{\rightskip}{0pt plus 5cm}ivec RV::dataind (const {\bf RV} \& {\em crv}) const}}
\label{classRV_bb724fa4e2d9ed7bfd0993b5975018a4}


generate indeces into 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em crv}]data vector that form data vector of self. \end{description}
\end{Desc}


References count(), ids, str::ids, len, times, str::times, and tostr().

Referenced by enorm$<$ sq\_\-T $>$::condition(), enorm$<$ sq\_\-T $>$::marginal(), and compositepdf::setindices().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
work/git/mixpp/bdm/stat/\hyperlink{libBM_8h}{libBM.h}\item 
work/git/mixpp/bdm/stat/libBM.cpp\end{CompactItemize}
