[172] | 1 | \hypertarget{classRV}{ |
---|
[8] | 2 | \section{RV Class Reference} |
---|
| 3 | \label{classRV}\index{RV@{RV}} |
---|
[172] | 4 | } |
---|
[8] | 5 | Class representing variables, most often random variables. |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | {\tt \#include $<$libBM.h$>$} |
---|
| 9 | |
---|
| 10 | \subsection*{Public Member Functions} |
---|
| 11 | \begin{CompactItemize} |
---|
| 12 | \item |
---|
[172] | 13 | \hypertarget{classRV_bedfd8d197f0a7ac28a4d412dfc5b8af}{ |
---|
| 14 | \hyperlink{classRV_bedfd8d197f0a7ac28a4d412dfc5b8af}{RV} (Array$<$ std::string $>$ in\_\-names, ivec in\_\-sizes, ivec in\_\-times)} |
---|
| 15 | \label{classRV_bedfd8d197f0a7ac28a4d412dfc5b8af} |
---|
[8] | 16 | |
---|
[162] | 17 | \begin{CompactList}\small\item\em Full constructor. \item\end{CompactList}\item |
---|
[172] | 18 | \hypertarget{classRV_7b88a74204fdf044e02f2807769839b7}{ |
---|
| 19 | \hyperlink{classRV_7b88a74204fdf044e02f2807769839b7}{RV} (Array$<$ std::string $>$ in\_\-names, ivec in\_\-sizes)} |
---|
| 20 | \label{classRV_7b88a74204fdf044e02f2807769839b7} |
---|
[8] | 21 | |
---|
[162] | 22 | \begin{CompactList}\small\item\em Constructor with times=0. \item\end{CompactList}\item |
---|
[172] | 23 | \hypertarget{classRV_261702f85831392d7d67e2bcf0b69960}{ |
---|
| 24 | \hyperlink{classRV_261702f85831392d7d67e2bcf0b69960}{RV} (Array$<$ std::string $>$ in\_\-names)} |
---|
| 25 | \label{classRV_261702f85831392d7d67e2bcf0b69960} |
---|
[162] | 26 | |
---|
| 27 | \begin{CompactList}\small\item\em Constructor with sizes=1, times=0. \item\end{CompactList}\item |
---|
[172] | 28 | \hypertarget{classRV_6a22f5c06d6403870d4e414b1993bf9e}{ |
---|
| 29 | \hyperlink{classRV_6a22f5c06d6403870d4e414b1993bf9e}{RV} ()} |
---|
| 30 | \label{classRV_6a22f5c06d6403870d4e414b1993bf9e} |
---|
[8] | 31 | |
---|
[172] | 32 | \begin{CompactList}\small\item\em Constructor of empty \hyperlink{classRV}{RV}. \item\end{CompactList}\item |
---|
| 33 | \hypertarget{classRV_f5c7b8bd589eef09ccdf3329a0addea0}{ |
---|
| 34 | int \hyperlink{classRV_f5c7b8bd589eef09ccdf3329a0addea0}{count} () const } |
---|
| 35 | \label{classRV_f5c7b8bd589eef09ccdf3329a0addea0} |
---|
[8] | 36 | |
---|
[172] | 37 | \begin{CompactList}\small\item\em Return number of scalars in the \hyperlink{classRV}{RV}. \item\end{CompactList}\item |
---|
| 38 | \hypertarget{classRV_c114a6f3ff06796cc2f4dacba74291eb}{ |
---|
| 39 | int \hyperlink{classRV_c114a6f3ff06796cc2f4dacba74291eb}{length} () const } |
---|
| 40 | \label{classRV_c114a6f3ff06796cc2f4dacba74291eb} |
---|
[91] | 41 | |
---|
[172] | 42 | \begin{CompactList}\small\item\em Return length (number of entries) of the \hyperlink{classRV}{RV}. \item\end{CompactList}\item |
---|
| 43 | ivec \hyperlink{classRV_0c493a7a897f4d75682f4264e40779a1}{findself} (const \hyperlink{classRV}{RV} \&rv2) const |
---|
[162] | 44 | \begin{CompactList}\small\item\em Find indexes of self in another rv,. \item\end{CompactList}\item |
---|
[172] | 45 | \hypertarget{classRV_82cc7fa22ce91cf461a522ad62014c65}{ |
---|
| 46 | bool \hyperlink{classRV_82cc7fa22ce91cf461a522ad62014c65}{equal} (const \hyperlink{classRV}{RV} \&rv2) const } |
---|
| 47 | \label{classRV_82cc7fa22ce91cf461a522ad62014c65} |
---|
[8] | 48 | |
---|
[172] | 49 | \begin{CompactList}\small\item\em Compare if {\tt rv2} is identical to this {\tt \hyperlink{classRV}{RV}}. \item\end{CompactList}\item |
---|
| 50 | bool \hyperlink{classRV_935790526b630dec4ffefa9ec0c2b6fb}{add} (const \hyperlink{classRV}{RV} \&rv2) |
---|
[162] | 51 | \begin{CompactList}\small\item\em Add (concat) another variable to the current one,. \item\end{CompactList}\item |
---|
[180] | 52 | \hypertarget{classRV_b9d175c327c21488b1e2fb756a84e149}{ |
---|
| 53 | \hyperlink{classRV}{RV} \hyperlink{classRV_b9d175c327c21488b1e2fb756a84e149}{subt} (const \hyperlink{classRV}{RV} \&rv2) const } |
---|
| 54 | \label{classRV_b9d175c327c21488b1e2fb756a84e149} |
---|
[8] | 55 | |
---|
| 56 | \begin{CompactList}\small\item\em Subtract another variable from the current one. \item\end{CompactList}\item |
---|
[180] | 57 | \hypertarget{classRV_b26d25a122be3303806af7726a625a0f}{ |
---|
| 58 | \hyperlink{classRV}{RV} \hyperlink{classRV_b26d25a122be3303806af7726a625a0f}{subselect} (const ivec \&ind) const } |
---|
| 59 | \label{classRV_b26d25a122be3303806af7726a625a0f} |
---|
[8] | 60 | |
---|
| 61 | \begin{CompactList}\small\item\em Select only variables at indeces ind. \item\end{CompactList}\item |
---|
[180] | 62 | \hypertarget{classRV_248dfb2387976db2658489347669278c}{ |
---|
| 63 | \hyperlink{classRV}{RV} \hyperlink{classRV_248dfb2387976db2658489347669278c}{operator()} (const ivec \&ind) const } |
---|
| 64 | \label{classRV_248dfb2387976db2658489347669278c} |
---|
[8] | 65 | |
---|
| 66 | \begin{CompactList}\small\item\em Select only variables at indeces ind. \item\end{CompactList}\item |
---|
[172] | 67 | \hypertarget{classRV_e0a158d53ab9430627241f844f4c9a60}{ |
---|
| 68 | void \hyperlink{classRV_e0a158d53ab9430627241f844f4c9a60}{t} (int delta)} |
---|
| 69 | \label{classRV_e0a158d53ab9430627241f844f4c9a60} |
---|
[8] | 70 | |
---|
[162] | 71 | \begin{CompactList}\small\item\em Shift {\tt time} shifted by delta. \item\end{CompactList}\item |
---|
[172] | 72 | \hypertarget{classRV_52f3ade796814da627ff5a44d00986be}{ |
---|
| 73 | \hyperlink{classstr}{str} \hyperlink{classRV_52f3ade796814da627ff5a44d00986be}{tostr} () const } |
---|
| 74 | \label{classRV_52f3ade796814da627ff5a44d00986be} |
---|
[22] | 75 | |
---|
[172] | 76 | \begin{CompactList}\small\item\em generate {\tt \hyperlink{classstr}{str}} from rv, by expanding sizes \item\end{CompactList}\item |
---|
[180] | 77 | ivec \hyperlink{classRV_bb724fa4e2d9ed7bfd0993b5975018a4}{dataind} (const \hyperlink{classRV}{RV} \&crv) const |
---|
[162] | 78 | \begin{CompactList}\small\item\em generate indeces into \item\end{CompactList}\item |
---|
[172] | 79 | \hypertarget{classRV_b88ef5124713c9e30fd9446846b3f044}{ |
---|
| 80 | Array$<$ std::string $>$ \& \hyperlink{classRV_b88ef5124713c9e30fd9446846b3f044}{\_\-names} ()} |
---|
| 81 | \label{classRV_b88ef5124713c9e30fd9446846b3f044} |
---|
[79] | 82 | |
---|
[91] | 83 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
[172] | 84 | \hypertarget{classRV_4a0069bc69f5a98d7ce9ed59077f2e6c}{ |
---|
| 85 | int \hyperlink{classRV_4a0069bc69f5a98d7ce9ed59077f2e6c}{id} (int at)} |
---|
| 86 | \label{classRV_4a0069bc69f5a98d7ce9ed59077f2e6c} |
---|
[91] | 87 | |
---|
| 88 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
[172] | 89 | \hypertarget{classRV_20db23a5585d64a6e24404cc8379bc28}{ |
---|
| 90 | int \hyperlink{classRV_20db23a5585d64a6e24404cc8379bc28}{size} (int at)} |
---|
| 91 | \label{classRV_20db23a5585d64a6e24404cc8379bc28} |
---|
[91] | 92 | |
---|
| 93 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
[172] | 94 | \hypertarget{classRV_af068cf478864fe1a4fbfc6b4693b088}{ |
---|
| 95 | int \hyperlink{classRV_af068cf478864fe1a4fbfc6b4693b088}{time} (int at)} |
---|
| 96 | \label{classRV_af068cf478864fe1a4fbfc6b4693b088} |
---|
[91] | 97 | |
---|
| 98 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
[172] | 99 | \hypertarget{classRV_3ae4dd6e368f814a02710636ac8e1721}{ |
---|
| 100 | std::string \hyperlink{classRV_3ae4dd6e368f814a02710636ac8e1721}{name} (int at)} |
---|
| 101 | \label{classRV_3ae4dd6e368f814a02710636ac8e1721} |
---|
[91] | 102 | |
---|
[172] | 103 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
[180] | 104 | \hypertarget{classRV_f58db96c9f5b8a538e26f154b1047c62}{ |
---|
| 105 | void \hyperlink{classRV_f58db96c9f5b8a538e26f154b1047c62}{set\_\-id} (int at, int id0)} |
---|
| 106 | \label{classRV_f58db96c9f5b8a538e26f154b1047c62} |
---|
| 107 | |
---|
| 108 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 109 | \hypertarget{classRV_70b24c39c5130b1e4753fa2eef495433}{ |
---|
| 110 | void \hyperlink{classRV_70b24c39c5130b1e4753fa2eef495433}{set\_\-size} (int at, int size0)} |
---|
| 111 | \label{classRV_70b24c39c5130b1e4753fa2eef495433} |
---|
| 112 | |
---|
| 113 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 114 | \hypertarget{classRV_af668289c016d12ac2a9ddb85416006b}{ |
---|
| 115 | void \hyperlink{classRV_af668289c016d12ac2a9ddb85416006b}{set\_\-time} (int at, int time0)} |
---|
| 116 | \label{classRV_af668289c016d12ac2a9ddb85416006b} |
---|
| 117 | |
---|
| 118 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
[172] | 119 | \hypertarget{classRV_fc4a3175ff678cba7ae4109654f66ce5}{ |
---|
| 120 | void \hyperlink{classRV_fc4a3175ff678cba7ae4109654f66ce5}{newids} ()} |
---|
| 121 | \label{classRV_fc4a3175ff678cba7ae4109654f66ce5} |
---|
| 122 | |
---|
| 123 | \begin{CompactList}\small\item\em Assign unused ids to this rv. \item\end{CompactList}\end{CompactItemize} |
---|
[32] | 124 | \subsection*{Protected Attributes} |
---|
| 125 | \begin{CompactItemize} |
---|
| 126 | \item |
---|
[172] | 127 | \hypertarget{classRV_f2396efe2e6d656ebe9e6f06018cbe25}{ |
---|
| 128 | int \hyperlink{classRV_f2396efe2e6d656ebe9e6f06018cbe25}{tsize}} |
---|
| 129 | \label{classRV_f2396efe2e6d656ebe9e6f06018cbe25} |
---|
[32] | 130 | |
---|
| 131 | \begin{CompactList}\small\item\em size = sum of sizes \item\end{CompactList}\item |
---|
[172] | 132 | \hypertarget{classRV_0d7b36e2bbccf880c8fcf1e8cc43c1a9}{ |
---|
| 133 | int \hyperlink{classRV_0d7b36e2bbccf880c8fcf1e8cc43c1a9}{len}} |
---|
| 134 | \label{classRV_0d7b36e2bbccf880c8fcf1e8cc43c1a9} |
---|
[32] | 135 | |
---|
| 136 | \begin{CompactList}\small\item\em len = number of individual rvs \item\end{CompactList}\item |
---|
[172] | 137 | \hypertarget{classRV_1bd7165140f4b880a7f344bbb1c433f9}{ |
---|
| 138 | ivec \hyperlink{classRV_1bd7165140f4b880a7f344bbb1c433f9}{ids}} |
---|
| 139 | \label{classRV_1bd7165140f4b880a7f344bbb1c433f9} |
---|
[32] | 140 | |
---|
[33] | 141 | \begin{CompactList}\small\item\em Vector of unique IDs. \item\end{CompactList}\item |
---|
[172] | 142 | \hypertarget{classRV_c878aab13f34b420e1eb5b485563682b}{ |
---|
| 143 | ivec \hyperlink{classRV_c878aab13f34b420e1eb5b485563682b}{sizes}} |
---|
| 144 | \label{classRV_c878aab13f34b420e1eb5b485563682b} |
---|
[32] | 145 | |
---|
[33] | 146 | \begin{CompactList}\small\item\em Vector of sizes. \item\end{CompactList}\item |
---|
[172] | 147 | \hypertarget{classRV_646e530c47a2dd38254b778d9f11ac89}{ |
---|
| 148 | ivec \hyperlink{classRV_646e530c47a2dd38254b778d9f11ac89}{times}} |
---|
| 149 | \label{classRV_646e530c47a2dd38254b778d9f11ac89} |
---|
[32] | 150 | |
---|
[33] | 151 | \begin{CompactList}\small\item\em Vector of shifts from current time. \item\end{CompactList}\item |
---|
[172] | 152 | \hypertarget{classRV_df5d0030b277a1db2f1fd5fb79152acb}{ |
---|
| 153 | Array$<$ std::string $>$ \hyperlink{classRV_df5d0030b277a1db2f1fd5fb79152acb}{names}} |
---|
| 154 | \label{classRV_df5d0030b277a1db2f1fd5fb79152acb} |
---|
[32] | 155 | |
---|
[33] | 156 | \begin{CompactList}\small\item\em Array of names. \item\end{CompactList}\end{CompactItemize} |
---|
[8] | 157 | \subsection*{Friends} |
---|
| 158 | \begin{CompactItemize} |
---|
| 159 | \item |
---|
[172] | 160 | \hypertarget{classRV_cad6f15535d10437f6690cb4492176a8}{ |
---|
| 161 | std::ostream \& \hyperlink{classRV_cad6f15535d10437f6690cb4492176a8}{operator$<$$<$} (std::ostream \&os, const \hyperlink{classRV}{RV} \&rv)} |
---|
| 162 | \label{classRV_cad6f15535d10437f6690cb4492176a8} |
---|
[8] | 163 | |
---|
[162] | 164 | \begin{CompactList}\small\item\em Printing output e.g. for debugging. \item\end{CompactList}\end{CompactItemize} |
---|
[8] | 165 | |
---|
| 166 | |
---|
| 167 | \subsection{Detailed Description} |
---|
| 168 | Class representing variables, most often random variables. |
---|
| 169 | |
---|
| 170 | More?... |
---|
| 171 | |
---|
[162] | 172 | \subsection{Member Function Documentation} |
---|
[172] | 173 | \hypertarget{classRV_0c493a7a897f4d75682f4264e40779a1}{ |
---|
[162] | 174 | \index{RV@{RV}!findself@{findself}} |
---|
| 175 | \index{findself@{findself}!RV@{RV}} |
---|
[172] | 176 | \subsubsection[findself]{\setlength{\rightskip}{0pt plus 5cm}ivec RV::findself (const {\bf RV} \& {\em rv2}) const}} |
---|
| 177 | \label{classRV_0c493a7a897f4d75682f4264e40779a1} |
---|
[162] | 178 | |
---|
| 179 | |
---|
| 180 | Find indexes of self in another rv,. |
---|
| 181 | |
---|
| 182 | \begin{Desc} |
---|
| 183 | \item[Returns:]ivec of the same size as self. \end{Desc} |
---|
| 184 | |
---|
| 185 | |
---|
| 186 | References ids, len, length(), and times. |
---|
| 187 | |
---|
[172] | 188 | Referenced by add(), and subt().\hypertarget{classRV_935790526b630dec4ffefa9ec0c2b6fb}{ |
---|
| 189 | \index{RV@{RV}!add@{add}} |
---|
[162] | 190 | \index{add@{add}!RV@{RV}} |
---|
[172] | 191 | \subsubsection[add]{\setlength{\rightskip}{0pt plus 5cm}bool RV::add (const {\bf RV} \& {\em rv2})}} |
---|
| 192 | \label{classRV_935790526b630dec4ffefa9ec0c2b6fb} |
---|
[162] | 193 | |
---|
| 194 | |
---|
| 195 | Add (concat) another variable to the current one,. |
---|
| 196 | |
---|
| 197 | \begin{Desc} |
---|
[172] | 198 | \item[Returns:]true if all rv2 were added, false if rv2 is in conflict \end{Desc} |
---|
[162] | 199 | |
---|
| 200 | |
---|
| 201 | References findself(), ids, len, names, sizes, times, and tsize. |
---|
| 202 | |
---|
[180] | 203 | Referenced by concat(), and MPF$<$ BM\_\-T $>$::MPF().\hypertarget{classRV_bb724fa4e2d9ed7bfd0993b5975018a4}{ |
---|
[172] | 204 | \index{RV@{RV}!dataind@{dataind}} |
---|
[162] | 205 | \index{dataind@{dataind}!RV@{RV}} |
---|
[180] | 206 | \subsubsection[dataind]{\setlength{\rightskip}{0pt plus 5cm}ivec RV::dataind (const {\bf RV} \& {\em crv}) const}} |
---|
| 207 | \label{classRV_bb724fa4e2d9ed7bfd0993b5975018a4} |
---|
[162] | 208 | |
---|
| 209 | |
---|
| 210 | generate indeces into |
---|
| 211 | |
---|
| 212 | \begin{Desc} |
---|
| 213 | \item[Parameters:] |
---|
| 214 | \begin{description} |
---|
| 215 | \item[{\em crv}]data vector that form data vector of self. \end{description} |
---|
| 216 | \end{Desc} |
---|
| 217 | |
---|
| 218 | |
---|
[172] | 219 | References count(), ids, str::ids, len, times, str::times, and tostr(). |
---|
[162] | 220 | |
---|
[8] | 221 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
| 222 | \item |
---|
[172] | 223 | work/git/mixpp/bdm/stat/\hyperlink{libBM_8h}{libBM.h}\item |
---|
[145] | 224 | work/git/mixpp/bdm/stat/libBM.cpp\end{CompactItemize} |
---|