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