root/doc/latex/classbdm_1_1RV.tex @ 271

Revision 271, 12.1 kB (checked in by smidl, 16 years ago)

Next major revision

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