LazyVector_test.cc
Go to the documentation of this file.
1 /**
2  * @file LazyVector_test.cc
3  * @brief Implementation tests for a `util::LazyVector` object.
4  * @author Gianluca Petrillo (petrillo@fnal.gov)
5  * @date July 18, 2018
6  * @version 1.0
7  *
8  */
9 
10 
11 // LArSoft (larcore) libraries
13 
14 #define BOOST_TEST_MODULE ( LazyVector_test )
15 #include "boost/test/unit_test.hpp"
16 
17 // C/C++ standard libraries
18 #include <stdexcept> // std::out_of_range
19 
20 
21 //------------------------------------------------------------------------------
23 
25  Vector_t v;
26 
27  BOOST_TEST(v.empty());
28  BOOST_TEST(v.size() == 0U);
29  BOOST_TEST(v.data_empty());
30  BOOST_TEST(v.data_size() == 0U);
31 
32  BOOST_TEST(v.data_defvalue() == 0);
33 
34  BOOST_CHECK_THROW(v.at(v.size()), std::out_of_range);
35  BOOST_CHECK_THROW(v.const_at(v.size()), std::out_of_range);
36  BOOST_CHECK_THROW(v.at(v.size() + 1U), std::out_of_range);
37  BOOST_CHECK_THROW(v.const_at(v.size() + 1U), std::out_of_range);
38 
39  //
40  // need to resize before doing anything
41  //
42  v.resize(10);
43 
44  Vector_t::size_type iBegin = 0, iEnd = 0;
45 
46  //
47  // assign a single value (at position 6): { ... [6]: -6 }
48  //
49  v[6] = -6;
50  iBegin = 6U;
51  iEnd = 7U;
52 
53  BOOST_TEST(!v.empty());
54  BOOST_TEST(v.size() == 10U);
55  BOOST_TEST(!v.data_empty());
56  BOOST_TEST(v.data_size() == iEnd - iBegin);
57  BOOST_TEST(v.data_begin_index() == iBegin);
58  BOOST_TEST(v.data_end_index() == iEnd);
59 
60  BOOST_TEST(v.at (6) == -6);
61  BOOST_TEST(v.const_at (6) == -6);
62  BOOST_TEST(v.get (6) == -6);
63  BOOST_TEST(v.const_get(6) == -6);
64  BOOST_TEST(v [6] == -6);
65  BOOST_TEST(v.data_address(6) == &(v[6]));
66 
67  for (Vector_t::size_type i = 0; i < iBegin; ++i) {
68  BOOST_TEST(v.const_at(i) == v.data_defvalue());
69  BOOST_TEST(v.const_get(i) == v.data_defvalue());
70  BOOST_TEST(v.data_address(i) == nullptr);
71  }
72  for (Vector_t::size_type i = iEnd; i < v.size(); ++i) {
73  BOOST_TEST(v.const_at(i) == v.data_defvalue());
74  BOOST_TEST(v.const_get(i) == v.data_defvalue());
75  BOOST_TEST(v.data_address(i) == nullptr);
76  }
77  BOOST_CHECK_THROW(v.at(v.size()), std::out_of_range);
78  BOOST_CHECK_THROW(v.const_at(v.size()), std::out_of_range);
79  BOOST_CHECK_THROW(v.at(v.size() + 1U), std::out_of_range);
80  BOOST_CHECK_THROW(v.const_at(v.size() + 1U), std::out_of_range);
81 
82  // meta-test: have we changed storage size with the non-const test?
83  BOOST_TEST(v.data_size() == iEnd - iBegin);
84 
85  //
86  // assign another value (at position 8): { ... [6]: -6, [7]: <def>, [8]: -8 }
87  //
88  v[8] = -8;
89  iBegin = 6U;
90  iEnd = 9U;
91 
92  BOOST_TEST(!v.empty());
93  BOOST_TEST(v.size() == 10U);
94  BOOST_TEST(!v.data_empty());
95  BOOST_TEST(v.data_size() == iEnd - iBegin);
96  BOOST_TEST(v.data_begin_index() == iBegin);
97  BOOST_TEST(v.data_end_index() == iEnd);
98 
99  BOOST_TEST(v.at (6U) == -6);
100  BOOST_TEST(v.const_at (6U) == -6);
101  BOOST_TEST(v.get (6U) == -6);
102  BOOST_TEST(v.const_get(6U) == -6);
103  BOOST_TEST(v [6U] == -6);
104  BOOST_TEST(v.data_address(6U) == &(v[6U]));
105 
106  BOOST_TEST(v.at (7U) == v.data_defvalue());
107  BOOST_TEST(v.const_at (7U) == v.data_defvalue());
108  BOOST_TEST(v.get (7U) == v.data_defvalue());
109  BOOST_TEST(v.const_get(7U) == v.data_defvalue());
110  BOOST_TEST(v [7U] == v.data_defvalue());
111  BOOST_TEST(v.data_address(7U) == &(v[7U]));
112 
113  BOOST_TEST(v.at (8U) == -8);
114  BOOST_TEST(v.const_at (8U) == -8);
115  BOOST_TEST(v.get (8U) == -8);
116  BOOST_TEST(v.const_get(8U) == -8);
117  BOOST_TEST(v [8U] == -8);
118  BOOST_TEST(v.data_address(8U) == &(v[8U]));
119 
120  for (Vector_t::size_type i = 0; i < iBegin; ++i) {
121  BOOST_TEST(v.const_at(i) == v.data_defvalue());
122  BOOST_TEST(v.const_get(i) == v.data_defvalue());
123  BOOST_TEST(v.data_address(i) == nullptr);
124  }
125  for (Vector_t::size_type i = iEnd; i < v.size(); ++i) {
126  BOOST_TEST(v.const_at(i) == v.data_defvalue());
127  BOOST_TEST(v.const_get(i) == v.data_defvalue());
128  BOOST_TEST(v.data_address(i) == nullptr);
129  }
130  BOOST_CHECK_THROW(v.at(v.size()), std::out_of_range);
131  BOOST_CHECK_THROW(v.const_at(v.size()), std::out_of_range);
132  BOOST_CHECK_THROW(v.at(v.size() + 1U), std::out_of_range);
133  BOOST_CHECK_THROW(v.const_at(v.size() + 1U), std::out_of_range);
134 
135  // meta-test: have we changed storage size with the non-const test?
136  BOOST_TEST(v.data_size() == iEnd - iBegin);
137 
138 
139  //
140  // assign another value (at position 4):
141  // { ... [4]: -4, [5]: <def>, [6]: -6, [7]: <def>, [8]: -8 }
142  //
143  v[4] = -4;
144  iBegin = 4U;
145  iEnd = 9U;
146 
147  BOOST_TEST(!v.empty());
148  BOOST_TEST(v.size() == 10U);
149  BOOST_TEST(!v.data_empty());
150  BOOST_TEST(v.data_size() == iEnd - iBegin);
151  BOOST_TEST(v.data_begin_index() == iBegin);
152  BOOST_TEST(v.data_end_index() == iEnd);
153 
154  BOOST_TEST(v.at (4U) == -4);
155  BOOST_TEST(v.const_at (4U) == -4);
156  BOOST_TEST(v.get (4U) == -4);
157  BOOST_TEST(v.const_get(4U) == -4);
158  BOOST_TEST(v [4U] == -4);
159  BOOST_TEST(v.data_address(4U) == &(v[4U]));
160 
161  BOOST_TEST(v.at (5U) == v.data_defvalue());
162  BOOST_TEST(v.const_at (5U) == v.data_defvalue());
163  BOOST_TEST(v.get (5U) == v.data_defvalue());
164  BOOST_TEST(v.const_get(5U) == v.data_defvalue());
165  BOOST_TEST(v [5U] == v.data_defvalue());
166  BOOST_TEST(v.data_address(5U) == &(v[5U]));
167 
168  BOOST_TEST(v.at (6U) == -6);
169  BOOST_TEST(v.const_at (6U) == -6);
170  BOOST_TEST(v.get (6U) == -6);
171  BOOST_TEST(v.const_get(6U) == -6);
172  BOOST_TEST(v [6U] == -6);
173  BOOST_TEST(v.data_address(6U) == &(v[6U]));
174 
175  BOOST_TEST(v.at (7U) == v.data_defvalue());
176  BOOST_TEST(v.const_at (7U) == v.data_defvalue());
177  BOOST_TEST(v.get (7U) == v.data_defvalue());
178  BOOST_TEST(v.const_get(7U) == v.data_defvalue());
179  BOOST_TEST(v [7U] == v.data_defvalue());
180  BOOST_TEST(v.data_address(7U) == &(v[7U]));
181 
182  BOOST_TEST(v.at (8U) == -8);
183  BOOST_TEST(v.const_at (8U) == -8);
184  BOOST_TEST(v.get (8U) == -8);
185  BOOST_TEST(v.const_get(8U) == -8);
186  BOOST_TEST(v [8U] == -8);
187  BOOST_TEST(v.data_address(8U) == &(v[8U]));
188 
189  for (Vector_t::size_type i = 0; i < iBegin; ++i) {
190  BOOST_TEST(v.const_at(i) == v.data_defvalue());
191  BOOST_TEST(v.const_get(i) == v.data_defvalue());
192  BOOST_TEST(v.data_address(i) == nullptr);
193  }
194  for (Vector_t::size_type i = iEnd; i < v.size(); ++i) {
195  BOOST_TEST(v.const_at(i) == v.data_defvalue());
196  BOOST_TEST(v.const_get(i) == v.data_defvalue());
197  BOOST_TEST(v.data_address(i) == nullptr);
198  }
199  BOOST_CHECK_THROW(v.at(v.size()), std::out_of_range);
200  BOOST_CHECK_THROW(v.const_at(v.size()), std::out_of_range);
201  BOOST_CHECK_THROW(v.at(v.size() + 1U), std::out_of_range);
202  BOOST_CHECK_THROW(v.const_at(v.size() + 1U), std::out_of_range);
203 
204  // meta-test: have we changed storage size with the non-const test?
205  BOOST_TEST(v.data_size() == iEnd - iBegin);
206 
207 
208  //
209  // cut off one element actually stored
210  //
211  v.resize(iEnd - 1U);
212  iEnd -= 1U;
213 
214  BOOST_TEST(!v.empty());
215  BOOST_TEST(v.size() == iEnd);
216  BOOST_TEST(!v.data_empty());
217  BOOST_TEST(v.data_size() == iEnd - iBegin);
218  BOOST_TEST(v.data_begin_index() == iBegin);
219  BOOST_TEST(v.data_end_index() == iEnd);
220 
221  BOOST_TEST(v.at (4U) == -4);
222  BOOST_TEST(v.const_at (4U) == -4);
223  BOOST_TEST(v.get (4U) == -4);
224  BOOST_TEST(v.const_get(4U) == -4);
225  BOOST_TEST(v [4U] == -4);
226  BOOST_TEST(v.data_address(4U) == &(v[4U]));
227 
228  BOOST_TEST(v.at (5U) == v.data_defvalue());
229  BOOST_TEST(v.const_at (5U) == v.data_defvalue());
230  BOOST_TEST(v.get (5U) == v.data_defvalue());
231  BOOST_TEST(v.const_get(5U) == v.data_defvalue());
232  BOOST_TEST(v [5U] == v.data_defvalue());
233  BOOST_TEST(v.data_address(5U) == &(v[5U]));
234 
235  BOOST_TEST(v.at (6U) == -6);
236  BOOST_TEST(v.const_at (6U) == -6);
237  BOOST_TEST(v.get (6U) == -6);
238  BOOST_TEST(v.const_get(6U) == -6);
239  BOOST_TEST(v [6U] == -6);
240  BOOST_TEST(v.data_address(6U) == &(v[6U]));
241 
242  BOOST_TEST(v.at (7U) == v.data_defvalue());
243  BOOST_TEST(v.const_at (7U) == v.data_defvalue());
244  BOOST_TEST(v.get (7U) == v.data_defvalue());
245  BOOST_TEST(v.const_get(7U) == v.data_defvalue());
246  BOOST_TEST(v [7U] == v.data_defvalue());
247  BOOST_TEST(v.data_address(7U) == &(v[7U]));
248 
249  for (Vector_t::size_type i = 0; i < iBegin; ++i) {
250  BOOST_TEST(v.const_at(i) == v.data_defvalue());
251  BOOST_TEST(v.const_get(i) == v.data_defvalue());
252  BOOST_TEST(v.data_address(i) == nullptr);
253  }
254  for (Vector_t::size_type i = iEnd; i < v.size(); ++i) {
255  BOOST_TEST(v.const_at(i) == v.data_defvalue());
256  BOOST_TEST(v.const_get(i) == v.data_defvalue());
257  BOOST_TEST(v.data_address(i) == nullptr);
258  }
259  BOOST_CHECK_THROW(v.at(v.size()), std::out_of_range);
260  BOOST_CHECK_THROW(v.const_at(v.size()), std::out_of_range);
261  BOOST_CHECK_THROW(v.at(v.size() + 1U), std::out_of_range);
262  BOOST_CHECK_THROW(v.const_at(v.size() + 1U), std::out_of_range);
263 
264  // meta-test: have we changed storage size with the non-const test?
265  BOOST_TEST(v.data_size() == iEnd - iBegin);
266 
267 
268  //
269  // expand nominal size (content should be unchanged)
270  //
271  v.resize(v.size() + 10U);
272 
273  BOOST_TEST(!v.empty());
274  BOOST_TEST(v.size() == iEnd + 10U);
275  BOOST_TEST(!v.data_empty());
276  BOOST_TEST(v.data_size() == iEnd - iBegin);
277  BOOST_TEST(v.data_begin_index() == iBegin);
278  BOOST_TEST(v.data_end_index() == iEnd);
279 
280  BOOST_TEST(v.at (4U) == -4);
281  BOOST_TEST(v.const_at (4U) == -4);
282  BOOST_TEST(v.get (4U) == -4);
283  BOOST_TEST(v.const_get(4U) == -4);
284  BOOST_TEST(v [4U] == -4);
285  BOOST_TEST(v.data_address(4U) == &(v[4U]));
286 
287  BOOST_TEST(v.at (5U) == v.data_defvalue());
288  BOOST_TEST(v.const_at (5U) == v.data_defvalue());
289  BOOST_TEST(v.get (5U) == v.data_defvalue());
290  BOOST_TEST(v.const_get(5U) == v.data_defvalue());
291  BOOST_TEST(v [5U] == v.data_defvalue());
292  BOOST_TEST(v.data_address(5U) == &(v[5U]));
293 
294  BOOST_TEST(v.at (6U) == -6);
295  BOOST_TEST(v.const_at (6U) == -6);
296  BOOST_TEST(v.get (6U) == -6);
297  BOOST_TEST(v.const_get(6U) == -6);
298  BOOST_TEST(v [6U] == -6);
299  BOOST_TEST(v.data_address(6U) == &(v[6U]));
300 
301  BOOST_TEST(v.at (7U) == v.data_defvalue());
302  BOOST_TEST(v.const_at (7U) == v.data_defvalue());
303  BOOST_TEST(v.get (7U) == v.data_defvalue());
304  BOOST_TEST(v.const_get(7U) == v.data_defvalue());
305  BOOST_TEST(v [7U] == v.data_defvalue());
306  BOOST_TEST(v.data_address(7U) == &(v[7U]));
307 
308  for (Vector_t::size_type i = 0; i < iBegin; ++i) {
309  BOOST_TEST(v.const_at(i) == v.data_defvalue());
310  BOOST_TEST(v.const_get(i) == v.data_defvalue());
311  BOOST_TEST(v.data_address(i) == nullptr);
312  }
313  for (Vector_t::size_type i = iEnd; i < v.size(); ++i) {
314  BOOST_TEST(v.const_at(i) == v.data_defvalue());
315  BOOST_TEST(v.const_get(i) == v.data_defvalue());
316  BOOST_TEST(v.data_address(i) == nullptr);
317  }
318  BOOST_CHECK_THROW(v.at(v.size()), std::out_of_range);
319  BOOST_CHECK_THROW(v.const_at(v.size()), std::out_of_range);
320  BOOST_CHECK_THROW(v.at(v.size() + 1U), std::out_of_range);
321  BOOST_CHECK_THROW(v.const_at(v.size() + 1U), std::out_of_range);
322 
323  // meta-test: have we changed storage size with the non-const test?
324  BOOST_TEST(v.data_size() == iEnd - iBegin);
325 
326 
327  //
328  // cut all data
329  //
330  v.resize(iBegin);
331  iEnd = iBegin;
332 
333  BOOST_TEST(!v.empty());
334  BOOST_TEST(v.size() == iEnd);
335  BOOST_TEST(v.data_empty());
336  BOOST_TEST(v.data_size() == iEnd - iBegin);
337 
338  for (Vector_t::size_type i = 0; i < iBegin; ++i) {
339  BOOST_TEST(v.const_at(i) == v.data_defvalue());
340  BOOST_TEST(v.const_get(i) == v.data_defvalue());
341  BOOST_TEST(v.data_address(i) == nullptr);
342  }
343  for (Vector_t::size_type i = iEnd; i < v.size(); ++i) {
344  BOOST_TEST(v.const_at(i) == v.data_defvalue());
345  BOOST_TEST(v.const_get(i) == v.data_defvalue());
346  BOOST_TEST(v.data_address(i) == nullptr);
347  }
348  BOOST_CHECK_THROW(v.at(v.size()), std::out_of_range);
349  BOOST_CHECK_THROW(v.const_at(v.size()), std::out_of_range);
350  BOOST_CHECK_THROW(v.at(v.size() + 1U), std::out_of_range);
351  BOOST_CHECK_THROW(v.const_at(v.size() + 1U), std::out_of_range);
352 
353  // meta-test: have we changed storage size with the non-const test?
354  BOOST_TEST(v.data_size() == iEnd - iBegin);
355 
356 
357  //
358  // erase everything
359  //
360  v.clear();
361 
362  BOOST_TEST(v.empty());
363  BOOST_TEST(v.size() == 0U);
364  BOOST_TEST(v.data_empty());
365  BOOST_TEST(v.data_size() == 0U);
366 
367  BOOST_CHECK_THROW(v.at(v.size()), std::out_of_range);
368  BOOST_CHECK_THROW(v.const_at(v.size()), std::out_of_range);
369  BOOST_CHECK_THROW(v.at(v.size() + 1U), std::out_of_range);
370  BOOST_CHECK_THROW(v.const_at(v.size() + 1U), std::out_of_range);
371 
372 
373 } // TestLazyVector_defaultConstructed()
374 
375 
376 //------------------------------------------------------------------------------
378 
379  //
380  // we verify that after construction the state of the object is the same as
381  // for a default-constructed vector (except for the default value) which is
382  // then resized to size 12:
383  // * containing no data, all elements are assigned the default value
384  //
386  Vector_t v(12, 5); // 12 elements, default value is 5
387 
388  BOOST_TEST(!v.empty());
389  BOOST_TEST(v.size() == 12U);
390  BOOST_TEST(v.data_empty());
391  BOOST_TEST(v.data_size() == 0U);
392 
393  BOOST_TEST(v.data_defvalue() == 5);
394 
395  for (Vector_t::size_type i = 0; i < v.size(); ++i) {
396  BOOST_TEST(v.const_at(i) == v.data_defvalue());
397  BOOST_TEST(v.const_get(i) == v.data_defvalue());
398  }
399 
400  BOOST_CHECK_THROW(v.at(v.size()), std::out_of_range);
401  BOOST_CHECK_THROW(v.const_at(v.size()), std::out_of_range);
402  BOOST_CHECK_THROW(v.at(v.size() + 1U), std::out_of_range);
403  BOOST_CHECK_THROW(v.const_at(v.size() + 1U), std::out_of_range);
404 
405 } // TestLazyVector_sizeConstructed()
406 
407 
408 //------------------------------------------------------------------------------
410 
411  /*
412  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
413  * // start with a lazy vector of nominal size 6 elements and no actual data:
414  * util::LazyVector<double> v(6U);
415  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
416  */
417 
419 
420  BOOST_TEST(v.size() == 6U);
421  BOOST_TEST(v.data_empty());
422 
423  /*
424  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
425  * // add a value `-4.0` at the previous-to-last element `4`:
426  * // the vector will look like: { ... [4] -4.0 ... }
427  * // (nominal size: 6, 1 stored datum)
428  * v[4] = -4.0;
429  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
430  */
431  v[4] = -4.0;
432 
433  BOOST_TEST(v.size() == 6U);
434  BOOST_TEST(v.data_size() == 1U);
435  BOOST_TEST(v.at(4U) == -4.0);
436 
437  /*
438  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
439  * // add a value `-2.0` at the third element:
440  * // the vector will look like: { ... [2] -2.0, [3] def, [4] -4.0 ... }
441  * // (nominal size still 6, 3 stored data, the default value "def" is 0.0)
442  * v[2] = -2.0;
443  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
444  */
445  v[2] = -2.0;
446 
447  BOOST_TEST(v.size() == 6U);
448  BOOST_TEST(v.data_size() == 3U);
449  BOOST_TEST(v.at(2U) == -2.0);
450  BOOST_TEST(v.at(3U) == v.data_defvalue());
451  BOOST_TEST(v.at(4U) == -4.0);
452 
453  /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
454  *
455  * // we want to set element #6 to -6.0: we need to expand the vector first.
456  * v.resize(7U); // barely enough for element #6
457  * // the vector will look like: { ... [2] -2.0, [3] def, [4] -4.0 [5] def [6] -6.0 }
458  * // (nominal size 7, 5 stored data, the default value "def" is 0.0)
459  * v[6] = -6.0;
460  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
461  */
462  v.resize(7U); // barely enough for element #6
463  v[6] = -6.0;
464 
465  BOOST_TEST(v.size() == 7U);
466  BOOST_TEST(v.data_size() == 5U);
467  BOOST_TEST(v.at(2U) == -2.0);
468  BOOST_TEST(v.at(3U) == v.data_defvalue());
469  BOOST_TEST(v.at(4U) == -4.0);
470  BOOST_TEST(v.at(5U) == v.data_defvalue());
471  BOOST_TEST(v.at(6U) == -6.0);
472 
473 
474 } // TestLazyVector_documentation_class()
475 
476 
477 //------------------------------------------------------------------------------
479  /*
480  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
481  * util::LazyVector<int> v(3, 5);
482  * v[0] = 0;
483  * v[2] = -2;
484  *
485  * std::cout << "Default element [1]: " << v.at(1) << std::endl;
486  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
487  */
488  util::LazyVector<int> v(3, 5);
489  v[0] = 0;
490  v[2] = -2;
491 
492  BOOST_TEST(v.const_get(1U) == 5);
493 
494 } // TestLazyVector_documentation_constructor_size()
495 
496 //------------------------------------------------------------------------------
497 //--- registration of tests
498 
499 BOOST_AUTO_TEST_CASE(LazyVectorTestCase) {
500 
501  //
502  // behaviour tests
503  //
506 
507  //
508  // documentation tests
509  //
512 
513 } // BOOST_AUTO_TEST_CASE(LazyVectorTestCase)
BOOST_AUTO_TEST_CASE(LazyVectorTestCase)
value_type const_get(size_type pos) const
Definition: LazyVector.h:278
size_type size() const noexcept
Returns the size of the vector.
Definition: LazyVector.h:156
void TestLazyVector_documentation_constructor_size()
bool data_empty() const noexcept
Returns whether no data is actually stored.
Definition: LazyVector.h:168
void TestLazyVector_defaultConstructed()
Contiguous data container with lazy resizing on access.
void TestLazyVector_documentation_class()
A contiguous data container expanded on write.
Definition: LazyVector.h:78
void TestLazyVector_sizeConstructed()
recob::tracking::Vector_t Vector_t