[261] | 1 | \hypertarget{classbdm_1_1RV}{ |
---|
| 2 | \section{bdm::RV Class Reference} |
---|
| 3 | \label{classbdm_1_1RV}\index{bdm::RV@{bdm::RV}} |
---|
| 4 | } |
---|
| 5 | Class representing variables, most often random variables. |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | {\tt \#include $<$libBM.h$>$} |
---|
| 9 | |
---|
| 10 | Inheritance diagram for bdm::RV:\nopagebreak |
---|
| 11 | \begin{figure}[H] |
---|
| 12 | \begin{center} |
---|
| 13 | \leavevmode |
---|
| 14 | \includegraphics[width=64pt]{classbdm_1_1RV__inherit__graph} |
---|
| 15 | \end{center} |
---|
| 16 | \end{figure} |
---|
| 17 | Collaboration diagram for bdm::RV:\nopagebreak |
---|
| 18 | \begin{figure}[H] |
---|
| 19 | \begin{center} |
---|
| 20 | \leavevmode |
---|
| 21 | \includegraphics[width=64pt]{classbdm_1_1RV__coll__graph} |
---|
| 22 | \end{center} |
---|
| 23 | \end{figure} |
---|
| 24 | \subsection*{Public Member Functions} |
---|
| 25 | \begin{CompactItemize} |
---|
| 26 | \item |
---|
| 27 | \hypertarget{classbdm_1_1RV_3d93da01a64dab31074b25b7d93e5eae}{ |
---|
| 28 | \hyperlink{classbdm_1_1RV_3d93da01a64dab31074b25b7d93e5eae}{RV} (Array$<$ std::string $>$ in\_\-names, ivec in\_\-sizes, ivec in\_\-times)} |
---|
| 29 | \label{classbdm_1_1RV_3d93da01a64dab31074b25b7d93e5eae} |
---|
| 30 | |
---|
| 31 | \begin{CompactList}\small\item\em Full constructor. \item\end{CompactList}\item |
---|
| 32 | \hypertarget{classbdm_1_1RV_5bd1bd9ec51b91578ecc83a6b2398a20}{ |
---|
| 33 | \hyperlink{classbdm_1_1RV_5bd1bd9ec51b91578ecc83a6b2398a20}{RV} (Array$<$ std::string $>$ in\_\-names, ivec in\_\-sizes)} |
---|
| 34 | \label{classbdm_1_1RV_5bd1bd9ec51b91578ecc83a6b2398a20} |
---|
| 35 | |
---|
| 36 | \begin{CompactList}\small\item\em Constructor with times=0. \item\end{CompactList}\item |
---|
| 37 | \hypertarget{classbdm_1_1RV_a222dfef569e8f123180d40fde97c1cd}{ |
---|
| 38 | \hyperlink{classbdm_1_1RV_a222dfef569e8f123180d40fde97c1cd}{RV} (Array$<$ std::string $>$ in\_\-names)} |
---|
| 39 | \label{classbdm_1_1RV_a222dfef569e8f123180d40fde97c1cd} |
---|
| 40 | |
---|
| 41 | \begin{CompactList}\small\item\em Constructor with sizes=1, times=0. \item\end{CompactList}\item |
---|
| 42 | \hypertarget{classbdm_1_1RV_e319ca900261a5005a9b4b353ec16412}{ |
---|
| 43 | \hyperlink{classbdm_1_1RV_e319ca900261a5005a9b4b353ec16412}{RV} ()} |
---|
| 44 | \label{classbdm_1_1RV_e319ca900261a5005a9b4b353ec16412} |
---|
| 45 | |
---|
| 46 | \begin{CompactList}\small\item\em Constructor of empty \hyperlink{classbdm_1_1RV}{RV}. \item\end{CompactList}\item |
---|
| 47 | \hypertarget{classbdm_1_1RV_2174751a00ce19f941edd2c1a861be67}{ |
---|
| 48 | int \hyperlink{classbdm_1_1RV_2174751a00ce19f941edd2c1a861be67}{count} () const } |
---|
| 49 | \label{classbdm_1_1RV_2174751a00ce19f941edd2c1a861be67} |
---|
| 50 | |
---|
| 51 | \begin{CompactList}\small\item\em Return number of scalars in the \hyperlink{classbdm_1_1RV}{RV}. \item\end{CompactList}\item |
---|
| 52 | \hypertarget{classbdm_1_1RV_e9ec8c3e756651ff352ab5e3d3acda4b}{ |
---|
| 53 | int \hyperlink{classbdm_1_1RV_e9ec8c3e756651ff352ab5e3d3acda4b}{length} () const } |
---|
| 54 | \label{classbdm_1_1RV_e9ec8c3e756651ff352ab5e3d3acda4b} |
---|
| 55 | |
---|
| 56 | \begin{CompactList}\small\item\em Return length (number of entries) of the \hyperlink{classbdm_1_1RV}{RV}. \item\end{CompactList}\item |
---|
| 57 | ivec \hyperlink{classbdm_1_1RV_1367055b2608ad9d50d01a2da6cec869}{findself} (const \hyperlink{classbdm_1_1RV}{RV} \&rv2) const |
---|
| 58 | \begin{CompactList}\small\item\em Find indexes of self in another rv,. \item\end{CompactList}\item |
---|
| 59 | \hypertarget{classbdm_1_1RV_3bb011af88ae98f5c97955bb2c95cfee}{ |
---|
| 60 | bool \hyperlink{classbdm_1_1RV_3bb011af88ae98f5c97955bb2c95cfee}{equal} (const \hyperlink{classbdm_1_1RV}{RV} \&rv2) const } |
---|
| 61 | \label{classbdm_1_1RV_3bb011af88ae98f5c97955bb2c95cfee} |
---|
| 62 | |
---|
| 63 | \begin{CompactList}\small\item\em Compare if {\tt rv2} is identical to this {\tt \hyperlink{classbdm_1_1RV}{RV}}. \item\end{CompactList}\item |
---|
| 64 | bool \hyperlink{classbdm_1_1RV_87841b5ee43997b79789c0c22047e224}{add} (const \hyperlink{classbdm_1_1RV}{RV} \&rv2) |
---|
| 65 | \begin{CompactList}\small\item\em Add (concat) another variable to the current one,. \item\end{CompactList}\item |
---|
| 66 | \hypertarget{classbdm_1_1RV_aec44dabdf0a6d90fbae95e1356eda39}{ |
---|
| 67 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1RV_aec44dabdf0a6d90fbae95e1356eda39}{subt} (const \hyperlink{classbdm_1_1RV}{RV} \&rv2) const } |
---|
| 68 | \label{classbdm_1_1RV_aec44dabdf0a6d90fbae95e1356eda39} |
---|
| 69 | |
---|
| 70 | \begin{CompactList}\small\item\em Subtract another variable from the current one. \item\end{CompactList}\item |
---|
| 71 | \hypertarget{classbdm_1_1RV_c0c04ab99ded62e1e05bcefb151ebeb9}{ |
---|
| 72 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1RV_c0c04ab99ded62e1e05bcefb151ebeb9}{subselect} (const ivec \&ind) const } |
---|
| 73 | \label{classbdm_1_1RV_c0c04ab99ded62e1e05bcefb151ebeb9} |
---|
| 74 | |
---|
| 75 | \begin{CompactList}\small\item\em Select only variables at indeces ind. \item\end{CompactList}\item |
---|
| 76 | \hypertarget{classbdm_1_1RV_6f3daf0f857fff53a1c0a445fe160966}{ |
---|
| 77 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1RV_6f3daf0f857fff53a1c0a445fe160966}{operator()} (const ivec \&ind) const } |
---|
| 78 | \label{classbdm_1_1RV_6f3daf0f857fff53a1c0a445fe160966} |
---|
| 79 | |
---|
| 80 | \begin{CompactList}\small\item\em Select only variables at indeces ind. \item\end{CompactList}\item |
---|
| 81 | \hypertarget{classbdm_1_1RV_bd77cb0899f7fba1d0e34396137b7f1f}{ |
---|
| 82 | void \hyperlink{classbdm_1_1RV_bd77cb0899f7fba1d0e34396137b7f1f}{t} (int delta)} |
---|
| 83 | \label{classbdm_1_1RV_bd77cb0899f7fba1d0e34396137b7f1f} |
---|
| 84 | |
---|
| 85 | \begin{CompactList}\small\item\em Shift {\tt time} shifted by delta. \item\end{CompactList}\item |
---|
| 86 | \hypertarget{classbdm_1_1RV_8bdd7f4072749c7cc864b78a418ca388}{ |
---|
| 87 | \hyperlink{classbdm_1_1str}{str} \hyperlink{classbdm_1_1RV_8bdd7f4072749c7cc864b78a418ca388}{tostr} () const } |
---|
| 88 | \label{classbdm_1_1RV_8bdd7f4072749c7cc864b78a418ca388} |
---|
| 89 | |
---|
| 90 | \begin{CompactList}\small\item\em generate {\tt \hyperlink{classbdm_1_1str}{str}} from rv, by expanding sizes \item\end{CompactList}\item |
---|
| 91 | ivec \hyperlink{classbdm_1_1RV_cbebdb5e0d30101a6eb63550ef701c55}{dataind} (const \hyperlink{classbdm_1_1RV}{RV} \&crv) const |
---|
| 92 | \item |
---|
| 93 | void \hyperlink{classbdm_1_1RV_c92b92ecfd95c89be13ab3e6cb6855c1}{dataind} (const \hyperlink{classbdm_1_1RV}{RV} \&rv2, ivec \&selfi, ivec \&rv2i) const |
---|
| 94 | \item |
---|
| 95 | \hypertarget{classbdm_1_1RV_8bfda300b769a05598c55cb94fe61f52}{ |
---|
| 96 | int \hyperlink{classbdm_1_1RV_8bfda300b769a05598c55cb94fe61f52}{mint} ()} |
---|
| 97 | \label{classbdm_1_1RV_8bfda300b769a05598c55cb94fe61f52} |
---|
| 98 | |
---|
| 99 | \begin{CompactList}\small\item\em Minimum time-offset. \item\end{CompactList}\item |
---|
| 100 | \hypertarget{classbdm_1_1RV_ae0c6e729851a43c82a5b1c199474ef2}{ |
---|
| 101 | Array$<$ std::string $>$ \& \hyperlink{classbdm_1_1RV_ae0c6e729851a43c82a5b1c199474ef2}{\_\-names} ()} |
---|
| 102 | \label{classbdm_1_1RV_ae0c6e729851a43c82a5b1c199474ef2} |
---|
| 103 | |
---|
| 104 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 105 | \hypertarget{classbdm_1_1RV_172390b8525ef5aac684228241fff7b5}{ |
---|
| 106 | int \hyperlink{classbdm_1_1RV_172390b8525ef5aac684228241fff7b5}{id} (int at)} |
---|
| 107 | \label{classbdm_1_1RV_172390b8525ef5aac684228241fff7b5} |
---|
| 108 | |
---|
| 109 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 110 | \hypertarget{classbdm_1_1RV_8e64d02005a02aef72f214286977d8de}{ |
---|
| 111 | int \hyperlink{classbdm_1_1RV_8e64d02005a02aef72f214286977d8de}{size} (int at)} |
---|
| 112 | \label{classbdm_1_1RV_8e64d02005a02aef72f214286977d8de} |
---|
| 113 | |
---|
| 114 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 115 | \hypertarget{classbdm_1_1RV_aff4de8185750b506492623847520518}{ |
---|
| 116 | int \hyperlink{classbdm_1_1RV_aff4de8185750b506492623847520518}{time} (int at)} |
---|
| 117 | \label{classbdm_1_1RV_aff4de8185750b506492623847520518} |
---|
| 118 | |
---|
| 119 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 120 | \hypertarget{classbdm_1_1RV_d05af87595cfb7fa2e0fadeae5597fa8}{ |
---|
| 121 | std::string \hyperlink{classbdm_1_1RV_d05af87595cfb7fa2e0fadeae5597fa8}{name} (int at)} |
---|
| 122 | \label{classbdm_1_1RV_d05af87595cfb7fa2e0fadeae5597fa8} |
---|
| 123 | |
---|
| 124 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 125 | \hypertarget{classbdm_1_1RV_602cea0aecebc5146d81657df5127543}{ |
---|
| 126 | void \hyperlink{classbdm_1_1RV_602cea0aecebc5146d81657df5127543}{set\_\-id} (int at, int id0)} |
---|
| 127 | \label{classbdm_1_1RV_602cea0aecebc5146d81657df5127543} |
---|
| 128 | |
---|
| 129 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 130 | \hypertarget{classbdm_1_1RV_0b2c9e73ff66847c3644ebc3eb559a03}{ |
---|
| 131 | void \hyperlink{classbdm_1_1RV_0b2c9e73ff66847c3644ebc3eb559a03}{set\_\-size} (int at, int size0)} |
---|
| 132 | \label{classbdm_1_1RV_0b2c9e73ff66847c3644ebc3eb559a03} |
---|
| 133 | |
---|
| 134 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 135 | \hypertarget{classbdm_1_1RV_fb2892d12dc978549e9491aed327dfd4}{ |
---|
| 136 | void \hyperlink{classbdm_1_1RV_fb2892d12dc978549e9491aed327dfd4}{set\_\-time} (int at, int time0)} |
---|
| 137 | \label{classbdm_1_1RV_fb2892d12dc978549e9491aed327dfd4} |
---|
| 138 | |
---|
| 139 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 140 | \hypertarget{classbdm_1_1RV_176e9c0c35b51fee0ad8813a39883a63}{ |
---|
| 141 | void \hyperlink{classbdm_1_1RV_176e9c0c35b51fee0ad8813a39883a63}{newids} ()} |
---|
| 142 | \label{classbdm_1_1RV_176e9c0c35b51fee0ad8813a39883a63} |
---|
| 143 | |
---|
| 144 | \begin{CompactList}\small\item\em Assign unused ids to this rv. \item\end{CompactList}\end{CompactItemize} |
---|
| 145 | \subsection*{Protected Attributes} |
---|
| 146 | \begin{CompactItemize} |
---|
| 147 | \item |
---|
| 148 | \hypertarget{classbdm_1_1RV_38203096d950671def44de8cf1c6bb2e}{ |
---|
| 149 | int \hyperlink{classbdm_1_1RV_38203096d950671def44de8cf1c6bb2e}{tsize}} |
---|
| 150 | \label{classbdm_1_1RV_38203096d950671def44de8cf1c6bb2e} |
---|
| 151 | |
---|
| 152 | \begin{CompactList}\small\item\em size = sum of sizes \item\end{CompactList}\item |
---|
| 153 | \hypertarget{classbdm_1_1RV_b11bfdceb831ed30d33b852dd4a6b385}{ |
---|
| 154 | int \hyperlink{classbdm_1_1RV_b11bfdceb831ed30d33b852dd4a6b385}{len}} |
---|
| 155 | \label{classbdm_1_1RV_b11bfdceb831ed30d33b852dd4a6b385} |
---|
| 156 | |
---|
| 157 | \begin{CompactList}\small\item\em len = number of individual rvs \item\end{CompactList}\item |
---|
| 158 | \hypertarget{classbdm_1_1RV_0a9a4769ab5a322495bea0cd8091500b}{ |
---|
| 159 | ivec \hyperlink{classbdm_1_1RV_0a9a4769ab5a322495bea0cd8091500b}{ids}} |
---|
| 160 | \label{classbdm_1_1RV_0a9a4769ab5a322495bea0cd8091500b} |
---|
| 161 | |
---|
| 162 | \begin{CompactList}\small\item\em Vector of unique IDs. \item\end{CompactList}\item |
---|
| 163 | \hypertarget{classbdm_1_1RV_0112d25045f6f8fabdc9e821029928ee}{ |
---|
| 164 | ivec \hyperlink{classbdm_1_1RV_0112d25045f6f8fabdc9e821029928ee}{sizes}} |
---|
| 165 | \label{classbdm_1_1RV_0112d25045f6f8fabdc9e821029928ee} |
---|
| 166 | |
---|
| 167 | \begin{CompactList}\small\item\em Vector of sizes. \item\end{CompactList}\item |
---|
| 168 | \hypertarget{classbdm_1_1RV_ef6703854820bbf61736738f1bac6896}{ |
---|
| 169 | ivec \hyperlink{classbdm_1_1RV_ef6703854820bbf61736738f1bac6896}{times}} |
---|
| 170 | \label{classbdm_1_1RV_ef6703854820bbf61736738f1bac6896} |
---|
| 171 | |
---|
| 172 | \begin{CompactList}\small\item\em Vector of shifts from current time. \item\end{CompactList}\item |
---|
| 173 | \hypertarget{classbdm_1_1RV_9a87c46918c3c0db0bdca854a48a44aa}{ |
---|
| 174 | Array$<$ std::string $>$ \hyperlink{classbdm_1_1RV_9a87c46918c3c0db0bdca854a48a44aa}{names}} |
---|
| 175 | \label{classbdm_1_1RV_9a87c46918c3c0db0bdca854a48a44aa} |
---|
| 176 | |
---|
| 177 | \begin{CompactList}\small\item\em Array of names. \item\end{CompactList}\end{CompactItemize} |
---|
| 178 | \subsection*{Friends} |
---|
| 179 | \begin{CompactItemize} |
---|
| 180 | \item |
---|
| 181 | \hypertarget{classbdm_1_1RV_cad6f15535d10437f6690cb4492176a8}{ |
---|
| 182 | std::ostream \& \hyperlink{classbdm_1_1RV_cad6f15535d10437f6690cb4492176a8}{operator$<$$<$} (std::ostream \&os, const \hyperlink{classbdm_1_1RV}{RV} \&rv)} |
---|
| 183 | \label{classbdm_1_1RV_cad6f15535d10437f6690cb4492176a8} |
---|
| 184 | |
---|
| 185 | \begin{CompactList}\small\item\em Printing output e.g. for debugging. \item\end{CompactList}\end{CompactItemize} |
---|
| 186 | |
---|
| 187 | |
---|
| 188 | \subsection{Detailed Description} |
---|
| 189 | Class representing variables, most often random variables. |
---|
| 190 | |
---|
| 191 | More?... |
---|
| 192 | |
---|
| 193 | \subsection{Member Function Documentation} |
---|
| 194 | \hypertarget{classbdm_1_1RV_1367055b2608ad9d50d01a2da6cec869}{ |
---|
| 195 | \index{bdm::RV@{bdm::RV}!findself@{findself}} |
---|
| 196 | \index{findself@{findself}!bdm::RV@{bdm::RV}} |
---|
| 197 | \subsubsection[findself]{\setlength{\rightskip}{0pt plus 5cm}ivec bdm::RV::findself (const {\bf RV} \& {\em rv2}) const}} |
---|
| 198 | \label{classbdm_1_1RV_1367055b2608ad9d50d01a2da6cec869} |
---|
| 199 | |
---|
| 200 | |
---|
| 201 | Find indexes of self in another rv,. |
---|
| 202 | |
---|
| 203 | \begin{Desc} |
---|
| 204 | \item[Returns:]ivec of the same size as self. \end{Desc} |
---|
| 205 | |
---|
| 206 | |
---|
| 207 | References ids, len, length(), and times. |
---|
| 208 | |
---|
| 209 | Referenced by add(), dataind(), and subt().\hypertarget{classbdm_1_1RV_87841b5ee43997b79789c0c22047e224}{ |
---|
| 210 | \index{bdm::RV@{bdm::RV}!add@{add}} |
---|
| 211 | \index{add@{add}!bdm::RV@{bdm::RV}} |
---|
| 212 | \subsubsection[add]{\setlength{\rightskip}{0pt plus 5cm}bool bdm::RV::add (const {\bf RV} \& {\em rv2})}} |
---|
| 213 | \label{classbdm_1_1RV_87841b5ee43997b79789c0c22047e224} |
---|
| 214 | |
---|
| 215 | |
---|
| 216 | Add (concat) another variable to the current one,. |
---|
| 217 | |
---|
| 218 | \begin{Desc} |
---|
| 219 | \item[Returns:]true if all rv2 were added, false if rv2 is in conflict \end{Desc} |
---|
| 220 | |
---|
| 221 | |
---|
| 222 | References bdm::concat(), findself(), ids, len, names, sizes, times, and tsize. |
---|
| 223 | |
---|
| 224 | Referenced by bdm::concat(), bdm::compositepdf::getrv(), bdm::merger::merger(), bdm::MPF$<$ BM\_\-T $>$::MPF(), and bdm::compositepdf::setrvc().\hypertarget{classbdm_1_1RV_cbebdb5e0d30101a6eb63550ef701c55}{ |
---|
| 225 | \index{bdm::RV@{bdm::RV}!dataind@{dataind}} |
---|
| 226 | \index{dataind@{dataind}!bdm::RV@{bdm::RV}} |
---|
| 227 | \subsubsection[dataind]{\setlength{\rightskip}{0pt plus 5cm}ivec bdm::RV::dataind (const {\bf RV} \& {\em crv}) const}} |
---|
| 228 | \label{classbdm_1_1RV_cbebdb5e0d30101a6eb63550ef701c55} |
---|
| 229 | |
---|
| 230 | |
---|
| 231 | when this rv is a part of bigger rv, this function returns indeces of self in the data vector of the bigger crv. Then, data can be copied via: data\_\-of\_\-this = cdata(ind); |
---|
| 232 | |
---|
| 233 | References bdm::concat(), count(), ids, bdm::str::ids, len, times, bdm::str::times, tostr(), and tsize. |
---|
| 234 | |
---|
| 235 | Referenced by bdm::enorm$<$ sq\_\-T $>$::condition(), bdm::datalink\_\-m2e::datalink\_\-m2e(), bdm::datalink\_\-m2m::datalink\_\-m2m(), and bdm::enorm$<$ sq\_\-T $>$::marginal().\hypertarget{classbdm_1_1RV_c92b92ecfd95c89be13ab3e6cb6855c1}{ |
---|
| 236 | \index{bdm::RV@{bdm::RV}!dataind@{dataind}} |
---|
| 237 | \index{dataind@{dataind}!bdm::RV@{bdm::RV}} |
---|
| 238 | \subsubsection[dataind]{\setlength{\rightskip}{0pt plus 5cm}void bdm::RV::dataind (const {\bf RV} \& {\em rv2}, \/ ivec \& {\em selfi}, \/ ivec \& {\em rv2i}) const}} |
---|
| 239 | \label{classbdm_1_1RV_c92b92ecfd95c89be13ab3e6cb6855c1} |
---|
| 240 | |
---|
| 241 | |
---|
| 242 | generate mutual indeces when copying data betwenn self and crv. Data are copied via: data\_\-of\_\-this(selfi) = data\_\-of\_\-rv2(rv2i) |
---|
| 243 | |
---|
| 244 | References bdm::concat(), findself(), ids, bdm::str::ids, len, length(), times, bdm::str::times, and tostr(). |
---|
| 245 | |
---|
| 246 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
| 247 | \item |
---|
| 248 | \hyperlink{libBM_8h}{libBM.h}\item |
---|
| 249 | libBM.cpp\end{CompactItemize} |
---|