[8] | 1 | \section{RV Class Reference} |
---|
| 2 | \label{classRV}\index{RV@{RV}} |
---|
| 3 | Class representing variables, most often random variables. |
---|
| 4 | |
---|
| 5 | |
---|
| 6 | {\tt \#include $<$libBM.h$>$} |
---|
| 7 | |
---|
| 8 | \subsection*{Public Member Functions} |
---|
| 9 | \begin{CompactItemize} |
---|
| 10 | \item |
---|
[162] | 11 | {\bf RV} (Array$<$ std::string $>$ in\_\-names, ivec in\_\-sizes, ivec in\_\-times)\label{classRV_bedfd8d197f0a7ac28a4d412dfc5b8af} |
---|
[8] | 12 | |
---|
[162] | 13 | \begin{CompactList}\small\item\em Full constructor. \item\end{CompactList}\item |
---|
| 14 | {\bf RV} (Array$<$ std::string $>$ in\_\-names, ivec in\_\-sizes)\label{classRV_7b88a74204fdf044e02f2807769839b7} |
---|
[8] | 15 | |
---|
[162] | 16 | \begin{CompactList}\small\item\em Constructor with times=0. \item\end{CompactList}\item |
---|
| 17 | {\bf RV} (Array$<$ std::string $>$ in\_\-names)\label{classRV_261702f85831392d7d67e2bcf0b69960} |
---|
| 18 | |
---|
| 19 | \begin{CompactList}\small\item\em Constructor with sizes=1, times=0. \item\end{CompactList}\item |
---|
[8] | 20 | {\bf RV} ()\label{classRV_6a22f5c06d6403870d4e414b1993bf9e} |
---|
| 21 | |
---|
[162] | 22 | \begin{CompactList}\small\item\em Constructor of empty \doxyref{RV}{p.}{classRV}. \item\end{CompactList}\item |
---|
[22] | 23 | int {\bf count} () const \label{classRV_f5c7b8bd589eef09ccdf3329a0addea0} |
---|
[8] | 24 | |
---|
[91] | 25 | \begin{CompactList}\small\item\em Return number of scalars in the \doxyref{RV}{p.}{classRV}. \item\end{CompactList}\item |
---|
| 26 | int {\bf length} () const \label{classRV_c114a6f3ff06796cc2f4dacba74291eb} |
---|
| 27 | |
---|
| 28 | \begin{CompactList}\small\item\em Return length (number of entries) of the \doxyref{RV}{p.}{classRV}. \item\end{CompactList}\item |
---|
[162] | 29 | ivec {\bf findself} (const {\bf RV} \&rv2) const |
---|
| 30 | \begin{CompactList}\small\item\em Find indexes of self in another rv,. \item\end{CompactList}\item |
---|
| 31 | bool {\bf equal} (const {\bf RV} \&rv2) const \label{classRV_82cc7fa22ce91cf461a522ad62014c65} |
---|
[8] | 32 | |
---|
[106] | 33 | \begin{CompactList}\small\item\em Compare if {\tt rv2} is identical to this {\tt \doxyref{RV}{p.}{classRV}}. \item\end{CompactList}\item |
---|
[162] | 34 | bool {\bf add} (const {\bf RV} \&rv2) |
---|
| 35 | \begin{CompactList}\small\item\em Add (concat) another variable to the current one,. \item\end{CompactList}\item |
---|
| 36 | {\bf RV} {\bf subt} (const {\bf RV} rv2) const \label{classRV_a85c47bd838ebbdcb6798d7843e87db2} |
---|
[8] | 37 | |
---|
| 38 | \begin{CompactList}\small\item\em Subtract another variable from the current one. \item\end{CompactList}\item |
---|
[162] | 39 | {\bf RV} {\bf subselect} (ivec ind) const \label{classRV_0a9ea7bc6fad270cc54a455a9f8f387d} |
---|
[8] | 40 | |
---|
| 41 | \begin{CompactList}\small\item\em Select only variables at indeces ind. \item\end{CompactList}\item |
---|
[162] | 42 | {\bf RV} {\bf operator()} (ivec ind) const \label{classRV_65e5b820e482caff7f284d11898ef64f} |
---|
[8] | 43 | |
---|
| 44 | \begin{CompactList}\small\item\em Select only variables at indeces ind. \item\end{CompactList}\item |
---|
| 45 | void {\bf t} (int delta)\label{classRV_e0a158d53ab9430627241f844f4c9a60} |
---|
| 46 | |
---|
[162] | 47 | \begin{CompactList}\small\item\em Shift {\tt time} shifted by delta. \item\end{CompactList}\item |
---|
| 48 | {\bf str} {\bf tostr} () const \label{classRV_52f3ade796814da627ff5a44d00986be} |
---|
[22] | 49 | |
---|
[162] | 50 | \begin{CompactList}\small\item\em generate {\tt \doxyref{str}{p.}{classstr}} from rv, by expanding sizes \item\end{CompactList}\item |
---|
| 51 | ivec {\bf dataind} ({\bf RV} crv) const |
---|
| 52 | \begin{CompactList}\small\item\em generate indeces into \item\end{CompactList}\item |
---|
[79] | 53 | Array$<$ std::string $>$ \& {\bf \_\-names} ()\label{classRV_b88ef5124713c9e30fd9446846b3f044} |
---|
| 54 | |
---|
[91] | 55 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 56 | int {\bf id} (int at)\label{classRV_4a0069bc69f5a98d7ce9ed59077f2e6c} |
---|
| 57 | |
---|
| 58 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 59 | int {\bf size} (int at)\label{classRV_20db23a5585d64a6e24404cc8379bc28} |
---|
| 60 | |
---|
| 61 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 62 | int {\bf time} (int at)\label{classRV_af068cf478864fe1a4fbfc6b4693b088} |
---|
| 63 | |
---|
| 64 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 65 | std::string {\bf name} (int at)\label{classRV_3ae4dd6e368f814a02710636ac8e1721} |
---|
| 66 | |
---|
[79] | 67 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize} |
---|
[32] | 68 | \subsection*{Protected Attributes} |
---|
| 69 | \begin{CompactItemize} |
---|
| 70 | \item |
---|
[91] | 71 | int {\bf tsize}\label{classRV_f2396efe2e6d656ebe9e6f06018cbe25} |
---|
[32] | 72 | |
---|
| 73 | \begin{CompactList}\small\item\em size = sum of sizes \item\end{CompactList}\item |
---|
| 74 | int {\bf len}\label{classRV_0d7b36e2bbccf880c8fcf1e8cc43c1a9} |
---|
| 75 | |
---|
| 76 | \begin{CompactList}\small\item\em len = number of individual rvs \item\end{CompactList}\item |
---|
[33] | 77 | ivec {\bf ids}\label{classRV_1bd7165140f4b880a7f344bbb1c433f9} |
---|
[32] | 78 | |
---|
[33] | 79 | \begin{CompactList}\small\item\em Vector of unique IDs. \item\end{CompactList}\item |
---|
| 80 | ivec {\bf sizes}\label{classRV_c878aab13f34b420e1eb5b485563682b} |
---|
[32] | 81 | |
---|
[33] | 82 | \begin{CompactList}\small\item\em Vector of sizes. \item\end{CompactList}\item |
---|
| 83 | ivec {\bf times}\label{classRV_646e530c47a2dd38254b778d9f11ac89} |
---|
[32] | 84 | |
---|
[33] | 85 | \begin{CompactList}\small\item\em Vector of shifts from current time. \item\end{CompactList}\item |
---|
| 86 | Array$<$ std::string $>$ {\bf names}\label{classRV_df5d0030b277a1db2f1fd5fb79152acb} |
---|
[32] | 87 | |
---|
[33] | 88 | \begin{CompactList}\small\item\em Array of names. \item\end{CompactList}\end{CompactItemize} |
---|
[8] | 89 | \subsection*{Friends} |
---|
| 90 | \begin{CompactItemize} |
---|
| 91 | \item |
---|
| 92 | std::ostream \& {\bf operator$<$$<$} (std::ostream \&os, const {\bf RV} \&rv)\label{classRV_cad6f15535d10437f6690cb4492176a8} |
---|
| 93 | |
---|
[162] | 94 | \begin{CompactList}\small\item\em Printing output e.g. for debugging. \item\end{CompactList}\end{CompactItemize} |
---|
[8] | 95 | |
---|
| 96 | |
---|
| 97 | \subsection{Detailed Description} |
---|
| 98 | Class representing variables, most often random variables. |
---|
| 99 | |
---|
| 100 | More?... |
---|
| 101 | |
---|
[162] | 102 | \subsection{Member Function Documentation} |
---|
| 103 | \index{RV@{RV}!findself@{findself}} |
---|
| 104 | \index{findself@{findself}!RV@{RV}} |
---|
| 105 | \subsubsection[findself]{\setlength{\rightskip}{0pt plus 5cm}ivec RV::findself (const {\bf RV} \& {\em rv2}) const}\label{classRV_0c493a7a897f4d75682f4264e40779a1} |
---|
| 106 | |
---|
| 107 | |
---|
| 108 | Find indexes of self in another rv,. |
---|
| 109 | |
---|
| 110 | \begin{Desc} |
---|
| 111 | \item[Returns:]ivec of the same size as self. \end{Desc} |
---|
| 112 | |
---|
| 113 | |
---|
| 114 | References ids, len, length(), and times. |
---|
| 115 | |
---|
| 116 | Referenced by add(), and subt().\index{RV@{RV}!add@{add}} |
---|
| 117 | \index{add@{add}!RV@{RV}} |
---|
| 118 | \subsubsection[add]{\setlength{\rightskip}{0pt plus 5cm}bool RV::add (const {\bf RV} \& {\em rv2})}\label{classRV_935790526b630dec4ffefa9ec0c2b6fb} |
---|
| 119 | |
---|
| 120 | |
---|
| 121 | Add (concat) another variable to the current one,. |
---|
| 122 | |
---|
| 123 | \begin{Desc} |
---|
| 124 | \item[Returns:]0 if all rv2 were added, 1 if rv2 is in conflict \end{Desc} |
---|
| 125 | |
---|
| 126 | |
---|
| 127 | References findself(), ids, len, names, sizes, times, and tsize. |
---|
| 128 | |
---|
| 129 | Referenced by concat(), MPF$<$ BM\_\-T $>$::MPF(), and mprod::mprod().\index{RV@{RV}!dataind@{dataind}} |
---|
| 130 | \index{dataind@{dataind}!RV@{RV}} |
---|
| 131 | \subsubsection[dataind]{\setlength{\rightskip}{0pt plus 5cm}ivec RV::dataind ({\bf RV} {\em crv}) const}\label{classRV_1844ea0d9c10428f5e0ee1d4d569ef0a} |
---|
| 132 | |
---|
| 133 | |
---|
| 134 | generate indeces into |
---|
| 135 | |
---|
| 136 | \begin{Desc} |
---|
| 137 | \item[Parameters:] |
---|
| 138 | \begin{description} |
---|
| 139 | \item[{\em crv}]data vector that form data vector of self. \end{description} |
---|
| 140 | \end{Desc} |
---|
| 141 | |
---|
| 142 | |
---|
| 143 | References ids, str::ids, len, times, str::times, and tostr(). |
---|
| 144 | |
---|
[8] | 145 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
| 146 | \item |
---|
[145] | 147 | work/git/mixpp/bdm/stat/{\bf libBM.h}\item |
---|
| 148 | work/git/mixpp/bdm/stat/libBM.cpp\end{CompactItemize} |
---|