File: DataSet.html

package info (click to toggle)
torch 2-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 5,488 kB
  • ctags: 3,217
  • sloc: cpp: 14,272; makefile: 201
file content (214 lines) | stat: -rw-r--r-- 9,229 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>
<HEAD>
   <TITLE>class  DataSet</TITLE>
   <META NAME="GENERATOR" CONTENT="DOC++ 3.4.8">
</HEAD>
<BODY BGCOLOR="#ffffff">

<H2>class  <A HREF="#DOC.DOCU">DataSet</A></H2></H2><BLOCKQUOTE>Provides an interface to manipulate all kind of data.</BLOCKQUOTE>
<HR>

<H2>Inheritance:</H2>
<APPLET CODE="ClassGraph.class" WIDTH=600 HEIGHT=125>
<param name=classes value="CObject,MObject.html,CDataSet,MDataSet.html,CSeqDataSet,MSeqDataSet.html,CEuclideanDataSet,MEuclideanDataSet.html">
<param name=before value="M,M,M|_,Mr_">
<param name=after value="Md_,M,M,M">
<param name=indent value="0,1,1,1">
<param name=arrowdir value="down">
</APPLET>
<HR>

<DL>
<P><DL>
<DT><H3>Public Fields</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int* <B><A HREF="#DOC.10.1">selected_examples</A></B>
<DD><I>The indices of all selected examples.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.10.2">current_example</A></B>
<DD><I>Index of the current example.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.10.3">n_targets</A></B>
<DD><I>Targets size, for all examples</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void* <B><A HREF="#DOC.10.4">targets</A></B>
<DD><I>Pointer to the targets of the current example</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.10.5">n_inputs</A></B>
<DD><I>Input size, for all examples</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="List.html">List</A>* <B><A HREF="#DOC.10.6">inputs</A></B>
<DD><I>Pointer on the inputs of the current example</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.10.7">n_examples</A></B>
<DD><I>Number of examples in the dataset.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.10.8">n_real_examples</A></B>
<DD><I>Real number of examples in the dataset.</I>
</DL></P>

<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.10.9">DataSet</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.10.10">setExample</A></B>(int t)
<DD><I>Set <TT>targets</TT> and <TT>inputs</TT> to the targets and inputs of the example with the index <TT>selected_examples[t]</TT></I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual   void <B><A HREF="#DOC.10.11">setRealExample</A></B>(int t) = 0
<DD><I>Set <TT>targets</TT> and <TT>inputs</TT> to the targets and inputs of the example with the index <TT>t</TT></I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.10.12">pushSubset</A></B>(int* subset_, int n_examples_)
<DD><I>Set a new subset.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.10.13">popSubset</A></B>()
<DD><I>Remove the last subset.</I>
</DL></P>

</DL>
<HR><H3>Inherited from <A HREF="Object.html">Object</A>:</H3>
<DL>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>virtual   void <B>init</B>()
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>addOption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, int size, void* <!1><A HREF="Vec.html#DOC.81.3">ptr</A>, const char* <!1><A HREF="CmdLine.html#DOC.7.3">help</A>="", bool is_allowed_after_init=false)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>addIOption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, int* <!1><A HREF="Vec.html#DOC.81.3">ptr</A>, int init_value, const char* <!1><A HREF="CmdLine.html#DOC.7.3">help</A>="", bool is_allowed_after_init=false)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>addROption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, real* <!1><A HREF="Vec.html#DOC.81.3">ptr</A>, real init_value, const char* <!1><A HREF="CmdLine.html#DOC.7.3">help</A>="", bool is_allowed_after_init=false)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>addBOption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, bool* <!1><A HREF="Vec.html#DOC.81.3">ptr</A>, bool init_value, const char* <!1><A HREF="CmdLine.html#DOC.7.3">help</A>="", bool is_allowed_after_init=false)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>setOption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, void* <!1><A HREF="Vec.html#DOC.81.3">ptr</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>setIOption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, int option)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>setROption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, real option)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>setBOption</B>(const char* <!1><A HREF="SeqExample.html#DOC.107.9">name</A>, bool option)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual   void <B>loadFILE</B>(FILE* <!1><A HREF="Measurer.html#DOC.30.2">file</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual   void <B>saveFILE</B>(FILE* <!1><A HREF="Measurer.html#DOC.30.2">file</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>load</B>(const char* filename)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>save</B>(const char* filename)
</DL></P>

</DL>

<A NAME="DOC.DOCU"></A>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>Provides an interface to manipulate all kind of data.

<P></BLOCKQUOTE>
<DL>

<A NAME="selected_examples"></A>
<A NAME="DOC.10.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int* selected_examples</B></TT>
<DD>The indices of all selected examples.
When <TT>select_examples</TT> is false, it contains
the indices of all examples.
<DL><DT><DD></DL><P>
<A NAME="current_example"></A>
<A NAME="DOC.10.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int current_example</B></TT>
<DD>Index of the current example.
Warning:
<UL>
<LI> don't forget to set it in <TT>setRealExample()</TT> !
<LI> it's the <EM>real</EM> index and not the index
in the <TT>selected_examples</TT> table.
</UL>
<DL><DT><DD></DL><P>
<A NAME="n_targets"></A>
<A NAME="DOC.10.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int n_targets</B></TT>
<DD>Targets size, for all examples
<DL><DT><DD></DL><P>
<A NAME="targets"></A>
<A NAME="DOC.10.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void* targets</B></TT>
<DD>Pointer to the targets of the current example
<DL><DT><DD></DL><P>
<A NAME="n_inputs"></A>
<A NAME="DOC.10.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int n_inputs</B></TT>
<DD>Input size, for all examples
<DL><DT><DD></DL><P>
<A NAME="inputs"></A>
<A NAME="DOC.10.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="List.html">List</A>* inputs</B></TT>
<DD>Pointer on the inputs of the current example
<DL><DT><DD></DL><P>
<A NAME="n_examples"></A>
<A NAME="DOC.10.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int n_examples</B></TT>
<DD>Number of examples in the dataset.
If you're using <TT>select_examples</TT>, it's
the number of selected examples.
<DL><DT><DD></DL><P>
<A NAME="n_real_examples"></A>
<A NAME="DOC.10.8"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int n_real_examples</B></TT>
<DD>Real number of examples in the dataset.
It's the number of examples in memory.
(= <TT>n_examples</TT> if <TT>select_examples</TT> is false)
<DL><DT><DD></DL><P>
<A NAME="DataSet"></A>
<A NAME="DOC.10.9"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> DataSet()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="setExample"></A>
<A NAME="DOC.10.10"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void setExample(int t)</B></TT>
<DD>Set <TT>targets</TT> and <TT>inputs</TT> to the targets and inputs
of the example with the index <TT>selected_examples[t]</TT>
<DL><DT><DD></DL><P>
<A NAME="setRealExample"></A>
<A NAME="DOC.10.11"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual   void setRealExample(int t) = 0</B></TT>
<DD>Set <TT>targets</TT> and <TT>inputs</TT> to the targets and inputs
of the example with the index <TT>t</TT>
<DL><DT><DD></DL><P>
<A NAME="pushSubset"></A>
<A NAME="DOC.10.12"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void pushSubset(int* subset_, int n_examples_)</B></TT>
<DD>Set a new subset.
<UL>
<LI> <TT>subset_</TT> (of size <TT>n_examples_</TT>) is a set
of indices which define a subset of <TT>data</TT>.
<LI> if a <TT>pushSubset()</TT> has been already called,
the next <TT>pushSubset()</TT> defines a subset of the
previous subset, and so on...
<LI> this function set <TT>select_examples</TT> to <TT>true</TT>
and set the read indices of the examples in
<TT>selected_examples</TT>.
</UL>
<DL><DT><DD></DL><P>
<A NAME="popSubset"></A>
<A NAME="DOC.10.13"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void popSubset()</B></TT>
<DD>Remove the last subset.
<UL>
<LI> recomputes "selected_examples".
<LI> if it was the last subset, set <TT>select_examples</TT>
to <TT>false</TT>.
</UL>
<DL><DT><DD></DL><P></DL>
<HR>
<DL><DT><B>Direct child classes:
</B><DD><A HREF="SeqDataSet.html">SeqDataSet</A><BR>
<A HREF="EuclideanDataSet.html">EuclideanDataSet</A><BR>
</DL>

<DL><DT><DT><B>Author:</B><DD>Ronan Collobert (collober@iro.umontreal.ca)
<DD></DL><P><P><I><A HREF="index.html">Alphabetic index</A></I> <I><A HREF="HIER.html">HTML hierarchy of classes</A> or <A HREF="HIERjava.html">Java</A></I></P><HR>
<BR>
This page was generated with the help of <A HREF="http://docpp.sourceforge.net">DOC++</A>.
</BODY>
</HTML>