File: classQCPDataRange.html

package info (click to toggle)
qcustomplot 2.0.1%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,376 kB
  • sloc: cpp: 21,746; sh: 180; makefile: 2
file content (484 lines) | stat: -rw-r--r-- 29,710 bytes parent folder | download | duplicates (2)
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="author" content="Emanuel Eichhammer" />
<meta name="copyright" content="(C) 2011-2016 Emanuel Eichhammer" />
<title>QCPDataRange Class Reference</title>
<link href="qcp.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top">
<a class="headerLink"  href="index.html">Main Page</a> &middot;
<a class="headerLink"  href="classoverview.html">Class Overview</a> &middot;
<a class="headerLink"  href="hierarchy.html">Hierarchy</a> &middot;
<a class="headerLink"  href="annotated.html">All Classes</a> &middot;
<a class="headerLink"  href="pages.html">Special Pages</a>
<!-- Generated by Doxygen 1.8.12 -->
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Functions</a> &#124;
<a href="#related">Related Non-Members</a>  </div>
  <div class="headertitle">
<div class="title">QCPDataRange Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Describes a data range given by begin and end index.  
 <a href="classQCPDataRange.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Functions</h2></td></tr>
<tr class="memitem:a49e72fd9bace1da9d875136dcc04c986"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPDataRange.html#a49e72fd9bace1da9d875136dcc04c986">QCPDataRange</a> ()</td></tr>
<tr class="separator:a49e72fd9bace1da9d875136dcc04c986"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c7f4a3684210423270515403060e9cf"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPDataRange.html#a6c7f4a3684210423270515403060e9cf">QCPDataRange</a> (int begin, int end)</td></tr>
<tr class="separator:a6c7f4a3684210423270515403060e9cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8bfd79a282f6ebd766d60caa683242d3"><td class="memItemLeft" align="right" valign="top"><a id="a8bfd79a282f6ebd766d60caa683242d3"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="classQCPDataRange.html">QCPDataRange</a> &amp;other) const</td></tr>
<tr class="separator:a8bfd79a282f6ebd766d60caa683242d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bcc9597731a7455407853ed0585f6ab"><td class="memItemLeft" align="right" valign="top"><a id="a5bcc9597731a7455407853ed0585f6ab"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="classQCPDataRange.html">QCPDataRange</a> &amp;other) const</td></tr>
<tr class="separator:a5bcc9597731a7455407853ed0585f6ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae76d7eba9defdfafcd0fc41096793129"><td class="memItemLeft" align="right" valign="top"><a id="ae76d7eba9defdfafcd0fc41096793129"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>begin</b> () const</td></tr>
<tr class="separator:ae76d7eba9defdfafcd0fc41096793129"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee1b20fb045929c3753ee2ce14af7630"><td class="memItemLeft" align="right" valign="top"><a id="aee1b20fb045929c3753ee2ce14af7630"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>end</b> () const</td></tr>
<tr class="separator:aee1b20fb045929c3753ee2ce14af7630"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6af055e509d1b691c244954ff1c5887"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPDataRange.html#ac6af055e509d1b691c244954ff1c5887">size</a> () const</td></tr>
<tr class="separator:ac6af055e509d1b691c244954ff1c5887"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e7836058f755c6ab9f11996477b7150"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPDataRange.html#a1e7836058f755c6ab9f11996477b7150">length</a> () const</td></tr>
<tr class="separator:a1e7836058f755c6ab9f11996477b7150"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54ff59048e01e46ac4aefafc844626c6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPDataRange.html#a54ff59048e01e46ac4aefafc844626c6">setBegin</a> (int begin)</td></tr>
<tr class="separator:a54ff59048e01e46ac4aefafc844626c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a277f1a9eafe70b9184d9c00b641ae5de"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPDataRange.html#a277f1a9eafe70b9184d9c00b641ae5de">setEnd</a> (int end)</td></tr>
<tr class="separator:a277f1a9eafe70b9184d9c00b641ae5de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae53a37472212dca0a7939963e20dba0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPDataRange.html#aae53a37472212dca0a7939963e20dba0">isValid</a> () const</td></tr>
<tr class="separator:aae53a37472212dca0a7939963e20dba0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac32e53fc05d6cd2eac96b96a7265d3b8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPDataRange.html#ac32e53fc05d6cd2eac96b96a7265d3b8">isEmpty</a> () const</td></tr>
<tr class="separator:ac32e53fc05d6cd2eac96b96a7265d3b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93529421d12fdd3a8bdb2b8061936352"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPDataRange.html">QCPDataRange</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPDataRange.html#a93529421d12fdd3a8bdb2b8061936352">bounded</a> (const <a class="el" href="classQCPDataRange.html">QCPDataRange</a> &amp;other) const</td></tr>
<tr class="separator:a93529421d12fdd3a8bdb2b8061936352"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36c8ad8acf177ffeb0a72c8d73030844"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPDataRange.html">QCPDataRange</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPDataRange.html#a36c8ad8acf177ffeb0a72c8d73030844">expanded</a> (const <a class="el" href="classQCPDataRange.html">QCPDataRange</a> &amp;other) const</td></tr>
<tr class="separator:a36c8ad8acf177ffeb0a72c8d73030844"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84e1e03129dd52528efb4bac18d30183"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPDataRange.html">QCPDataRange</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPDataRange.html#a84e1e03129dd52528efb4bac18d30183">intersection</a> (const <a class="el" href="classQCPDataRange.html">QCPDataRange</a> &amp;other) const</td></tr>
<tr class="separator:a84e1e03129dd52528efb4bac18d30183"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a279ed36602b39607699dc5652bcaf813"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPDataRange.html">QCPDataRange</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPDataRange.html#a279ed36602b39607699dc5652bcaf813">adjusted</a> (int changeBegin, int changeEnd) const</td></tr>
<tr class="separator:a279ed36602b39607699dc5652bcaf813"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a1c437f9beffd55621f48f961d7f679"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPDataRange.html#a8a1c437f9beffd55621f48f961d7f679">intersects</a> (const <a class="el" href="classQCPDataRange.html">QCPDataRange</a> &amp;other) const</td></tr>
<tr class="separator:a8a1c437f9beffd55621f48f961d7f679"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13ca398776374a3160aa85433718b812"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPDataRange.html#a13ca398776374a3160aa85433718b812">contains</a> (const <a class="el" href="classQCPDataRange.html">QCPDataRange</a> &amp;other) const</td></tr>
<tr class="separator:a13ca398776374a3160aa85433718b812"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="related"></a>
Related Non-Members</h2></td></tr>
<tr><td class="ititle" colspan="2"><p>(Note that these are not member functions.) </p>
</td></tr>
<tr class="memitem:a486dd7af8a090ed069672e3510e6a082"><td class="memItemLeft" align="right" valign="top">QDebug&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPDataRange.html#a486dd7af8a090ed069672e3510e6a082">operator&lt;&lt;</a> (QDebug d, const <a class="el" href="classQCPDataRange.html">QCPDataRange</a> &amp;dataRange)</td></tr>
<tr class="separator:a486dd7af8a090ed069672e3510e6a082"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Describes a data range given by begin and end index. </p>
<p><a class="el" href="classQCPDataRange.html" title="Describes a data range given by begin and end index. ">QCPDataRange</a> holds two integers describing the begin (<a class="el" href="classQCPDataRange.html#a54ff59048e01e46ac4aefafc844626c6">setBegin</a>) and end (<a class="el" href="classQCPDataRange.html#a277f1a9eafe70b9184d9c00b641ae5de">setEnd</a>) index of a contiguous set of data points. The end index points to the data point just after the last data point that's part of the data range, similarly to the nomenclature used in standard iterators.</p>
<p>Data Ranges are not bound to a certain plottable, thus they can be freely exchanged, created and modified. If a non-contiguous data set shall be described, the class <a class="el" href="classQCPDataSelection.html">QCPDataSelection</a> is used, which holds and manages multiple instances of <a class="el" href="classQCPDataRange.html">QCPDataRange</a>. In most situations, <a class="el" href="classQCPDataSelection.html">QCPDataSelection</a> is thus used.</p>
<p>Both <a class="el" href="classQCPDataRange.html">QCPDataRange</a> and <a class="el" href="classQCPDataSelection.html">QCPDataSelection</a> offer convenience methods to work with them, e.g. <a class="el" href="classQCPDataRange.html#a93529421d12fdd3a8bdb2b8061936352">bounded</a>, <a class="el" href="classQCPDataRange.html#a36c8ad8acf177ffeb0a72c8d73030844">expanded</a>, <a class="el" href="classQCPDataRange.html#a8a1c437f9beffd55621f48f961d7f679">intersects</a>, <a class="el" href="classQCPDataRange.html#a84e1e03129dd52528efb4bac18d30183">intersection</a>, <a class="el" href="classQCPDataRange.html#a279ed36602b39607699dc5652bcaf813">adjusted</a>, <a class="el" href="classQCPDataRange.html#a13ca398776374a3160aa85433718b812">contains</a>. Further, addition and subtraction operators (defined in <a class="el" href="classQCPDataSelection.html">QCPDataSelection</a>) can be used to join/subtract data ranges and data selections (or mixtures), to retrieve a corresponding <a class="el" href="classQCPDataSelection.html">QCPDataSelection</a>.</p>
<p>QCustomPlot's <a class="el" href="dataselection.html">data selection mechanism</a> is based on <a class="el" href="classQCPDataSelection.html">QCPDataSelection</a> and <a class="el" href="classQCPDataRange.html" title="Describes a data range given by begin and end index. ">QCPDataRange</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Do not confuse <a class="el" href="classQCPDataRange.html">QCPDataRange</a> with <a class="el" href="classQCPRange.html">QCPRange</a>. A <a class="el" href="classQCPRange.html">QCPRange</a> describes an interval in floating point plot coordinates, e.g. the current axis range. </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a49e72fd9bace1da9d875136dcc04c986"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49e72fd9bace1da9d875136dcc04c986">&sect;&nbsp;</a></span>QCPDataRange() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QCPDataRange::QCPDataRange </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Creates an empty <a class="el" href="classQCPDataRange.html" title="Describes a data range given by begin and end index. ">QCPDataRange</a>, with begin and end set to 0. </p>

</div>
</div>
<a id="a6c7f4a3684210423270515403060e9cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c7f4a3684210423270515403060e9cf">&sect;&nbsp;</a></span>QCPDataRange() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QCPDataRange::QCPDataRange </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>end</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Creates a <a class="el" href="classQCPDataRange.html" title="Describes a data range given by begin and end index. ">QCPDataRange</a>, initialized with the specified <em>begin</em> and <em>end</em>.</p>
<p>No checks or corrections are made to ensure the resulting range is valid (<a class="el" href="classQCPDataRange.html#aae53a37472212dca0a7939963e20dba0">isValid</a>). </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ac6af055e509d1b691c244954ff1c5887"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac6af055e509d1b691c244954ff1c5887">&sect;&nbsp;</a></span>size()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int QCPDataRange::size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the number of data points described by this data range. This is equal to the end index minus the begin index.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classQCPDataRange.html#a1e7836058f755c6ab9f11996477b7150">length</a> </dd></dl>

</div>
</div>
<a id="a1e7836058f755c6ab9f11996477b7150"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e7836058f755c6ab9f11996477b7150">&sect;&nbsp;</a></span>length()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int QCPDataRange::length </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the number of data points described by this data range. Equivalent to <a class="el" href="classQCPDataRange.html#ac6af055e509d1b691c244954ff1c5887">size</a>. </p>

</div>
</div>
<a id="a54ff59048e01e46ac4aefafc844626c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a54ff59048e01e46ac4aefafc844626c6">&sect;&nbsp;</a></span>setBegin()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void QCPDataRange::setBegin </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>begin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets the begin of this data range. The <em>begin</em> index points to the first data point that is part of the data range.</p>
<p>No checks or corrections are made to ensure the resulting range is valid (<a class="el" href="classQCPDataRange.html#aae53a37472212dca0a7939963e20dba0">isValid</a>).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classQCPDataRange.html#a277f1a9eafe70b9184d9c00b641ae5de">setEnd</a> </dd></dl>

</div>
</div>
<a id="a277f1a9eafe70b9184d9c00b641ae5de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a277f1a9eafe70b9184d9c00b641ae5de">&sect;&nbsp;</a></span>setEnd()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void QCPDataRange::setEnd </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>end</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets the end of this data range. The <em>end</em> index points to the data point just after the last data point that is part of the data range.</p>
<p>No checks or corrections are made to ensure the resulting range is valid (<a class="el" href="classQCPDataRange.html#aae53a37472212dca0a7939963e20dba0">isValid</a>).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classQCPDataRange.html#a54ff59048e01e46ac4aefafc844626c6">setBegin</a> </dd></dl>

</div>
</div>
<a id="aae53a37472212dca0a7939963e20dba0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aae53a37472212dca0a7939963e20dba0">&sect;&nbsp;</a></span>isValid()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool QCPDataRange::isValid </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns whether this range is valid. A valid range has a begin index greater or equal to 0, and an end index greater or equal to the begin index.</p>
<dl class="section note"><dt>Note</dt><dd>Invalid ranges should be avoided and are never the result of any of <a class="el" href="classQCustomPlot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a>'s methods (unless they are themselves fed with invalid ranges). Do not pass invalid ranges to <a class="el" href="classQCustomPlot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a>'s methods. The invalid range is not inherently prevented in <a class="el" href="classQCPDataRange.html" title="Describes a data range given by begin and end index. ">QCPDataRange</a>, to allow temporary invalid begin/end values while manipulating the range. An invalid range is not necessarily empty (<a class="el" href="classQCPDataRange.html#ac32e53fc05d6cd2eac96b96a7265d3b8">isEmpty</a>), since its <a class="el" href="classQCPDataRange.html#a1e7836058f755c6ab9f11996477b7150">length</a> can be negative and thus non-zero. </dd></dl>

</div>
</div>
<a id="ac32e53fc05d6cd2eac96b96a7265d3b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac32e53fc05d6cd2eac96b96a7265d3b8">&sect;&nbsp;</a></span>isEmpty()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool QCPDataRange::isEmpty </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns whether this range is empty, i.e. whether its begin index equals its end index.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classQCPDataRange.html#ac6af055e509d1b691c244954ff1c5887">size</a>, <a class="el" href="classQCPDataRange.html#a1e7836058f755c6ab9f11996477b7150">length</a> </dd></dl>

</div>
</div>
<a id="a93529421d12fdd3a8bdb2b8061936352"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93529421d12fdd3a8bdb2b8061936352">&sect;&nbsp;</a></span>bounded()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classQCPDataRange.html">QCPDataRange</a> QCPDataRange::bounded </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classQCPDataRange.html">QCPDataRange</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns a data range that matches this data range, except that parts exceeding <em>other</em> are excluded.</p>
<p>This method is very similar to <a class="el" href="classQCPDataRange.html#a84e1e03129dd52528efb4bac18d30183">intersection</a>, with one distinction: If this range and the <em>other</em> range share no intersection, the returned data range will be empty with begin and end set to the respective boundary side of <em>other</em>, at which this range is residing. (<a class="el" href="classQCPDataRange.html#a84e1e03129dd52528efb4bac18d30183">intersection</a> would just return a range with begin and end set to 0.) </p>

</div>
</div>
<a id="a36c8ad8acf177ffeb0a72c8d73030844"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a36c8ad8acf177ffeb0a72c8d73030844">&sect;&nbsp;</a></span>expanded()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classQCPDataRange.html">QCPDataRange</a> QCPDataRange::expanded </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classQCPDataRange.html">QCPDataRange</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns a data range that contains both this data range as well as <em>other</em>. </p>

</div>
</div>
<a id="a84e1e03129dd52528efb4bac18d30183"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84e1e03129dd52528efb4bac18d30183">&sect;&nbsp;</a></span>intersection()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classQCPDataRange.html">QCPDataRange</a> QCPDataRange::intersection </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classQCPDataRange.html">QCPDataRange</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the data range which is contained in both this data range and <em>other</em>.</p>
<p>This method is very similar to <a class="el" href="classQCPDataRange.html#a93529421d12fdd3a8bdb2b8061936352">bounded</a>, with one distinction: If this range and the <em>other</em> range share no intersection, the returned data range will be empty with begin and end set to 0. (<a class="el" href="classQCPDataRange.html#a93529421d12fdd3a8bdb2b8061936352">bounded</a> would return a range with begin and end set to one of the boundaries of <em>other</em>, depending on which side this range is on.)</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classQCPDataSelection.html#af5267ced53687561367105ee77b874ab">QCPDataSelection::intersection</a> </dd></dl>

</div>
</div>
<a id="a279ed36602b39607699dc5652bcaf813"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a279ed36602b39607699dc5652bcaf813">&sect;&nbsp;</a></span>adjusted()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classQCPDataRange.html">QCPDataRange</a> QCPDataRange::adjusted </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>changeBegin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>changeEnd</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns a data range where <em>changeBegin</em> and <em>changeEnd</em> were added to the begin and end indices, respectively. </p>

</div>
</div>
<a id="a8a1c437f9beffd55621f48f961d7f679"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8a1c437f9beffd55621f48f961d7f679">&sect;&nbsp;</a></span>intersects()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool QCPDataRange::intersects </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classQCPDataRange.html">QCPDataRange</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns whether this data range and <em>other</em> share common data points.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classQCPDataRange.html#a84e1e03129dd52528efb4bac18d30183">intersection</a>, <a class="el" href="classQCPDataRange.html#a13ca398776374a3160aa85433718b812">contains</a> </dd></dl>

</div>
</div>
<a id="a13ca398776374a3160aa85433718b812"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a13ca398776374a3160aa85433718b812">&sect;&nbsp;</a></span>contains()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool QCPDataRange::contains </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classQCPDataRange.html">QCPDataRange</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns whether all data points of <em>other</em> are also contained inside this data range.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classQCPDataRange.html#a8a1c437f9beffd55621f48f961d7f679">intersects</a> </dd></dl>

</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a id="a486dd7af8a090ed069672e3510e6a082"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a486dd7af8a090ed069672e3510e6a082">&sect;&nbsp;</a></span>operator<<()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QDebug operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">QDebug&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classQCPDataRange.html">QCPDataRange</a> &amp;&#160;</td>
          <td class="paramname"><em>dataRange</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Prints <em>dataRange</em> in a human readable format to the qDebug output. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/selection.h</li>
<li>src/selection.cpp</li>
</ul>
</div><!-- contents -->
</body>
</html>