OpenMS  2.8.0
ConstRefVector.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2021.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Timo Sachsenberg $
32 // $Authors: $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
37 #include <OpenMS/CONCEPT/Types.h>
38 
39 #include <algorithm>
40 #include <typeinfo>
41 #include <vector>
42 
43 namespace OpenMS
44 {
45 
68  template <typename ContainerT>
70  {
71 public:
72 
74  template <class ValueT>
76  {
77  friend class ConstRefVector;
78 
79 public:
80  typedef ValueT ValueType;
82  typedef typename std::vector<ValueType*>::difference_type difference_type;
83  typedef const value_type& reference;
84  typedef const value_type* pointer;
85  typedef std::random_access_iterator_tag iterator_category;
86 
88 
90 
92 
94 
95  ConstRefVectorConstIterator(const typename std::vector<ValueType*>* vec, unsigned int position)
96  {
97  vector_ = (typename std::vector<ValueType*>*)vec;
98  position_ = position;
99  }
100 
101  ConstRefVectorConstIterator(typename std::vector<ValueType*>* vec, unsigned int position)
102  {
103  vector_ = vec;
104  position_ = position;
105  }
106 
108  {
109  return position_ < it.position_;
110  }
111 
113  {
114  return position_ > it.position_;
115  }
116 
118  {
119  return position_ < it.position_ || position_ == it.position_;
120  }
121 
123  {
124  return position_ > it.position_ || position_ == it.position_;
125  }
126 
128  {
129  return position_ == it.position_ && vector_ == it.vector_;
130  }
131 
133  {
134  return position_ != it.position_ || vector_ != it.vector_;
135  }
136 
138  {
139  position_ += 1;
140  return *this;
141  }
142 
144  {
145  ConstRefVectorConstIterator tmp(*this);
146  ++(*this);
147  return tmp;
148  }
149 
151  {
152  position_ -= 1;
153  return *this;
154  }
155 
157  {
158  ConstRefVectorConstIterator tmp(*this);
159  --(*this);
160  return tmp;
161  }
162 
164  {
165  ConstRefVectorConstIterator tmp(*this);
166  tmp.position_ -= n;
167  return tmp;
168  }
169 
171  {
172  ConstRefVectorConstIterator tmp(*this);
173  tmp.position_ += n;
174  return tmp;
175  }
176 
178  {
179  position_ += n;
180  return *this;
181  }
182 
184  {
185  position_ -= n;
186  return *this;
187  }
188 
190  {
191  return i1.position_ - i2.position_;
192  }
193 
195  {
197  tmp.position_ += n;
198  return tmp;
199  }
200 
202  {
203  return *((*vector_)[position_]);
204  }
205 
207  {
208  return (*vector_)[position_];
209  }
210 
211 protected:
212 
213  typename std::vector<ValueType*>* vector_;
214  unsigned int position_;
215  };
216 
217 
219  template <class ValueT>
221  public ConstRefVectorConstIterator<ValueT>
222  {
223  friend class ConstRefVector;
224 
225 public:
226 
227  typedef ValueT ValueType;
230 
233 
235 
237 
238  ConstRefVectorIterator(typename std::vector<ValueType*>* vec, unsigned int position) :
239  ConstRefVectorConstIterator<ValueType>(vec, position)
240  {
241  }
242 
244 
246 
248  {
249  return *((*vector_)[position_]);
250  }
251 
253  {
254  return (*vector_)[position_];
255  }
256 
258  {
260  return *this;
261  }
262 
264  {
265  ConstRefVectorIterator tmp(*this);
266  ++(*this);
267  return tmp;
268  }
269 
271  {
273  return *this;
274  }
275 
277  {
278  ConstRefVectorIterator tmp(*this);
279  --(*this);
280  return tmp;
281  }
282 
284  {
285  ConstRefVectorIterator tmp(*this);
286  tmp.position_ -= n;
287  return tmp;
288  }
289 
291  {
292  ConstRefVectorIterator tmp(*this);
293  tmp.position_ += n;
294  return tmp;
295  }
296 
298  {
299  ConstRefVectorIterator tmp(i);
300  tmp.position_ += n;
301  return tmp;
302  }
303 
305  {
307  return *this;
308  }
309 
311  {
313  return *this;
314  }
315 
317  {
318  unsigned int tmp = i1.position_;
319  i1.position_ = i2.position_;
320  i2.position_ = tmp;
321  }
322 
323  };
324 
325 
327 
328  typedef ContainerT ContainerType;
331  typedef typename ContainerType::value_type ValueType;
334  typedef std::reverse_iterator<Iterator> ReverseIterator;
335  typedef std::reverse_iterator<ConstIterator> ConstReverseIterator;
337 
339 
341  typedef typename ContainerType::size_type size_type;
342  typedef typename ContainerType::difference_type difference_type;
343  typedef typename ContainerType::reference reference;
344  typedef typename ContainerType::const_reference const_reference;
345  typedef typename ContainerType::pointer pointer;
351 
352 
354  void push_back(const ValueType& x)
355  {
356  const ValueType* element = &x;
357  vector_.push_back(element);
358  }
359 
361  void pop_back()
362  {
363  vector_.pop_back();
364  }
365 
367  size_type size() const
368  {
369  return vector_.size();
370  }
371 
374  {
375  return std::max(vector_.size(), capacity_);
376  }
377 
380  {
381  size_type cap = capacity();
382 
383  if (n > cap)
384  {
385  vector_.reserve(n);
386  capacity_ = n;
387  }
388  }
389 
392  {
393  return vector_.max_size();
394  }
395 
398  {
399  return Iterator((std::vector<const ValueType*>*) & vector_, (unsigned int)0);
400  }
401 
404  {
405  return Iterator((std::vector<const ValueType*>*) & vector_, (unsigned int)(vector_.size()));
406  }
407 
410  {
411  return ConstIterator((const std::vector<const ValueType*>*) & vector_, (unsigned int)0);
412  }
413 
416  {
417  return ConstIterator((const std::vector<const ValueType*>*) & vector_, (unsigned int)(vector_.size()));
418  }
419 
422  {
423  return ReverseIterator(end());
424  }
425 
428  {
429  return ReverseIterator(begin());
430  }
431 
434  {
435  return ConstReverseIterator(end());
436  }
437 
440  {
441  return ConstReverseIterator(begin());
442  }
443 
445  void resize(size_type new_size)
446  {
447  vector_.resize(new_size);
448  capacity_ = vector_.capacity();
449  }
450 
452  void resize(size_type new_size, const ValueType& t)
453  {
454  vector_.resize(new_size, &t);
455  capacity_ = vector_.capacity();
456  }
457 
460  {
461  return *(begin());
462  }
463 
466  {
467  return *(end() - 1);
468  }
469 
471  void clear()
472  {
473  vector_.clear();
474  }
475 
477  bool empty() const
478  {
479  return vector_.empty();
480  }
481 
484  {
485  return *(vector_[n]);
486  }
487 
489  bool operator==(const ConstRefVector& array) const
490  {
492  {
493  return false;
494  }
495  if (size() != array.size())
496  {
497  return false;
498  }
499  for (Size i = 0; i < size(); i++)
500  {
501  if (typeid(*(vector_[i])) != typeid(*(array.vector_[i])))
502  {
503  return false;
504  }
505  if (vector_[i]->operator!=(* array.vector_[i]))
506  {
507  return false;
508  }
509  }
510  return true;
511  }
512 
514  bool operator!=(const ConstRefVector& array) const
515  {
516  return !(operator==(array));
517  }
518 
520  bool operator<(const ConstRefVector& array) const
521  {
522  return size() < array.size();
523  }
524 
526  bool operator>(const ConstRefVector& array) const
527  {
528  return size() > array.size();
529  }
530 
532  bool operator<=(const ConstRefVector& array) const
533  {
534  return operator<(array) || operator==(array);
535  }
536 
538  bool operator>=(const ConstRefVector& array) const
539  {
540  return operator>(array) || operator==(array);
541  }
542 
544  void swap(ConstRefVector& array)
545  {
546  vector_.swap(array.vector_);
547  }
548 
550  friend void swap(ConstRefVector& a1, ConstRefVector& a2)
551  {
552  a1.vector_.swap(a2.vector_);
553  }
554 
556  Iterator insert(Iterator pos, const ValueType& element)
557  {
558  const ValueType* pointer = &element;
559  vector_.insert(vector_.begin() + pos.position_, pointer);
560  return pos;
561  }
562 
564  void insert(Iterator pos, size_type n, const ValueType& element)
565  {
566  const ValueType* pointer;
567  std::vector<const ValueType*> tmp;
568  for (size_type i = 0; i < n; i++)
569  {
570  pointer = &element;
571  tmp.push_back(pointer);
572  }
573  vector_.insert(vector_.begin() + pos.position_, tmp.begin(), tmp.end());
574  }
575 
577  template <class InputIterator>
578  void insert(Iterator pos, InputIterator f, InputIterator l)
579  {
580  const ValueType* pointer;
581  std::vector<const ValueType*> tmp;
582  for (InputIterator it = f; it != l; ++it)
583  {
584  pointer = &(*it);
585  tmp.push_back(pointer);
586  }
587  vector_.insert(vector_.begin() + pos.position_, tmp.begin(), tmp.end());
588  }
589 
592  {
593  vector_.erase(vector_.begin() + pos.position_);
594  return pos;
595  }
596 
599  {
600  vector_.erase(vector_.begin() + first.position_, vector_.begin() + last.position_);
601  return first;
602  }
603 
605 
606  ConstRefVector() :
608  capacity_(0),
609  base_container_ptr_(nullptr)
610  {
611  }
612 
615  capacity_(0),
617  {
618  vector_ = std::vector<const ValueType*>(n);
619  }
620 
622  ConstRefVector(size_type n, const ValueType& element) :
623  capacity_(0),
625  {
626  vector_ = std::vector<const ValueType*>(n, &element);
627  }
628 
631  capacity_(0),
633  {
634  const ValueType* element;
635  for (ConstIterator it = p.begin(); it != p.end(); ++it)
636  {
637  element = &(*it);
638  vector_.push_back(element);
639  }
640  }
641 
643  template <class InputIterator>
644  ConstRefVector(InputIterator f, InputIterator l) :
645  capacity_(0),
646  base_container_ptr_(nullptr)
647  {
648  const ValueType* pointer;
649  for (InputIterator it = f; it != l; ++it)
650  {
651  pointer = &(*it);
652  vector_.push_back(pointer);
653  }
654  }
655 
658  capacity_(0),
660  {
661  const ValueType* element;
662  for (typename ContainerType::iterator it = p.begin(); it != p.end(); ++it)
663  {
664  element = &(*it);
665  vector_.push_back(element);
666  }
667  }
668 
671  {
672  }
673 
675 
678  {
679  if (this == &rhs) return *this;
680 
682  clear();
683  reserve(rhs.size());
684  const ValueType* element;
685  for (ConstIterator it = rhs.begin(); it != rhs.end(); ++it)
686  {
687  element = &(*it);
688  vector_.push_back(element);
689  }
690 
691  return *this;
692  }
693 
695  template <class InputIterator>
696  void assign(InputIterator f, InputIterator l)
697  {
698  clear();
699  insert(end(), f, l);
700  }
701 
703  void assign(size_type n, const ValueType& x)
704  {
705  clear();
706  insert(end(), n, x);
707  }
708 
717 
719  void sortByIntensity(bool reverse = false)
720  {
721  if (reverse)
722  {
723  auto pointerCmp = [](auto& left, auto& right){typename ValueType::IntensityLess cmp; return cmp(*left, *right);};
724  std::sort(vector_.begin(), vector_.end(), [&](auto &left, auto &right) {return pointerCmp(right, left);});
725  }
726  else
727  {
728  std::sort(vector_.begin(), vector_.end(), [](auto& left, auto& right){typename ValueType::IntensityLess cmp; return cmp(*left, *right);});
729  }
730  }
731 
734  {
735  std::sort(vector_.begin(), vector_.end(), [](auto& left, auto& right){typename ValueType::PositionLess cmp; return cmp(*left, *right);});
736  }
737 
739 
753  template <typename ComparatorType>
754  void sortByComparator(ComparatorType const& comparator = ComparatorType())
755  {
756  std::sort(vector_.begin(), vector_.end(), [&](auto& left, auto& right){return comparator(*left, *right);});
757  }
758 
760 
761  //----------------------------------------------------------------------
762 
763 protected:
764 
766  std::vector<const ValueType*> vector_;
771  };
772 
773 } // namespace OpenMS
774 
ConstIterator for the ConstRefVector.
Definition: ConstRefVector.h:76
ValueT ValueType
Definition: ConstRefVector.h:80
ConstRefVectorConstIterator & operator++()
Definition: ConstRefVector.h:137
ConstRefVectorConstIterator operator--(int)
Definition: ConstRefVector.h:156
ConstRefVectorConstIterator & operator+=(difference_type n)
Definition: ConstRefVector.h:177
ConstRefVectorConstIterator operator++(int)
Definition: ConstRefVector.h:143
bool operator<=(const ConstRefVectorConstIterator &it) const
Definition: ConstRefVector.h:117
std::random_access_iterator_tag iterator_category
Definition: ConstRefVector.h:85
ConstRefVectorConstIterator operator+(difference_type n) const
Definition: ConstRefVector.h:170
bool operator>(const ConstRefVectorConstIterator &it) const
Definition: ConstRefVector.h:112
ValueType value_type
Definition: ConstRefVector.h:81
std::vector< ValueType * > * vector_
Definition: ConstRefVector.h:213
unsigned int position_
Definition: ConstRefVector.h:214
ConstRefVectorConstIterator & operator-=(difference_type n)
Definition: ConstRefVector.h:183
ConstRefVectorConstIterator(typename std::vector< ValueType * > *vec, unsigned int position)
Definition: ConstRefVector.h:101
ConstRefVectorConstIterator & operator=(const ConstRefVectorConstIterator &)=default
const value_type & reference
Definition: ConstRefVector.h:83
reference operator*() const
Definition: ConstRefVector.h:201
ConstRefVectorConstIterator(const typename std::vector< ValueType * > *vec, unsigned int position)
Definition: ConstRefVector.h:95
bool operator<(const ConstRefVectorConstIterator &it) const
Definition: ConstRefVector.h:107
ConstRefVectorConstIterator & operator--()
Definition: ConstRefVector.h:150
friend ConstRefVectorConstIterator operator+(difference_type n, const ConstRefVectorConstIterator &i)
Definition: ConstRefVector.h:194
const value_type * pointer
Definition: ConstRefVector.h:84
ConstRefVectorConstIterator operator-(difference_type n) const
Definition: ConstRefVector.h:163
bool operator>=(const ConstRefVectorConstIterator &it) const
Definition: ConstRefVector.h:122
ConstRefVectorConstIterator(const ConstRefVectorConstIterator &)=default
std::vector< ValueType * >::difference_type difference_type
Definition: ConstRefVector.h:82
bool operator!=(const ConstRefVectorConstIterator &it) const
Definition: ConstRefVector.h:132
pointer operator->() const
Definition: ConstRefVector.h:206
bool operator==(const ConstRefVectorConstIterator &it) const
Definition: ConstRefVector.h:127
friend difference_type operator-(const ConstRefVectorConstIterator &i1, const ConstRefVectorConstIterator &i2)
Definition: ConstRefVector.h:189
Mutable iterator for the ConstRefVector.
Definition: ConstRefVector.h:222
ConstRefVectorIterator(typename std::vector< ValueType * > *vec, unsigned int position)
Definition: ConstRefVector.h:238
ConstRefVectorIterator operator--(int)
Definition: ConstRefVector.h:276
ValueT ValueType
Definition: ConstRefVector.h:227
ConstRefVectorIterator operator++(int)
Definition: ConstRefVector.h:263
ConstRefVectorIterator(const ConstRefVectorIterator &)=default
ConstRefVectorIterator & operator++()
Definition: ConstRefVector.h:257
ConstRefVectorIterator & operator+=(typename ConstRefVectorIterator::difference_type n)
Definition: ConstRefVector.h:304
friend void swap(ConstRefVectorIterator &i1, ConstRefVectorIterator &i2)
Definition: ConstRefVector.h:316
ConstRefVectorIterator operator+(typename ConstRefVectorIterator::difference_type n) const
Definition: ConstRefVector.h:290
ConstRefVectorIterator & operator--()
Definition: ConstRefVector.h:270
ConstRefVectorIterator & operator-=(typename ConstRefVectorIterator::difference_type n)
Definition: ConstRefVector.h:310
ConstRefVectorIterator & operator=(const ConstRefVectorIterator &rhs)=default
ConstRefVectorIterator operator-(typename ConstRefVectorIterator::difference_type n) const
Definition: ConstRefVector.h:283
reference operator*() const
Definition: ConstRefVector.h:247
ConstRefVectorConstIterator< ValueType >::value_type * pointer
Definition: ConstRefVector.h:229
friend ConstRefVectorIterator operator+(typename ConstRefVectorIterator::difference_type n, const ConstRefVectorIterator &i)
Definition: ConstRefVector.h:297
pointer operator->() const
Definition: ConstRefVector.h:252
ConstRefVectorConstIterator< ValueType >::value_type & reference
Definition: ConstRefVector.h:228
This vector holds pointer to the elements of another container.
Definition: ConstRefVector.h:70
friend void swap(ConstRefVector &a1, ConstRefVector &a2)
See std::vector documentation.
Definition: ConstRefVector.h:550
ConstRefVector(InputIterator f, InputIterator l)
See std::vector documentation.
Definition: ConstRefVector.h:644
void pop_back()
See std::vector documentation.
Definition: ConstRefVector.h:361
ConstReverseIterator const_reverse_iterator
Definition: ConstRefVector.h:349
void insert(Iterator pos, InputIterator f, InputIterator l)
See std::vector documentation.
Definition: ConstRefVector.h:578
std::vector< const ValueType * > vector_
the internal vector of ValueType pointers
Definition: ConstRefVector.h:766
const_reference front() const
See std::vector documentation.
Definition: ConstRefVector.h:459
ConstRefVector(ContainerType &p)
See std::vector documentation.
Definition: ConstRefVector.h:657
ConstRefVector(const ConstRefVector &p)
See std::vector documentation.
Definition: ConstRefVector.h:630
ConstRefVector()
See std::vector documentation.
Definition: ConstRefVector.h:607
Iterator begin()
See std::vector documentation.
Definition: ConstRefVector.h:397
Iterator iterator
Definition: ConstRefVector.h:346
ConstRefVector(size_type n, const ValueType &element)
See std::vector documentation.
Definition: ConstRefVector.h:622
ContainerType::reference reference
Definition: ConstRefVector.h:343
ContainerType::pointer pointer
Definition: ConstRefVector.h:345
std::reverse_iterator< Iterator > ReverseIterator
Definition: ConstRefVector.h:334
bool operator!=(const ConstRefVector &array) const
See std::vector documentation.
Definition: ConstRefVector.h:514
Iterator erase(Iterator pos)
See std::vector documentation.
Definition: ConstRefVector.h:591
ConstRefVector & operator=(const ConstRefVector &rhs)
See std::vector documentation.
Definition: ConstRefVector.h:677
ConstReverseIterator rend() const
See std::vector documentation.
Definition: ConstRefVector.h:439
void resize(size_type new_size)
See std::vector documentation.
Definition: ConstRefVector.h:445
void reserve(size_type n)
See std::vector documentation.
Definition: ConstRefVector.h:379
ConstIterator const_iterator
Definition: ConstRefVector.h:347
void assign(InputIterator f, InputIterator l)
See std::vector documentation.
Definition: ConstRefVector.h:696
size_type size() const
See std::vector documentation.
Definition: ConstRefVector.h:367
const_reference back() const
See std::vector documentation.
Definition: ConstRefVector.h:465
bool empty() const
See std::vector documentation.
Definition: ConstRefVector.h:477
Iterator erase(Iterator first, Iterator last)
See std::vector documentation.
Definition: ConstRefVector.h:598
ConstRefVector(size_type n)
See std::vector documentation.
Definition: ConstRefVector.h:614
bool operator<(const ConstRefVector &array) const
Comparison of container sizes.
Definition: ConstRefVector.h:520
Iterator insert(Iterator pos, const ValueType &element)
See std::vector documentation.
Definition: ConstRefVector.h:556
ConstIterator end() const
See std::vector documentation.
Definition: ConstRefVector.h:415
bool operator>(const ConstRefVector &array) const
Comparison of container sizes.
Definition: ConstRefVector.h:526
size_type capacity_
the current capacity
Definition: ConstRefVector.h:768
ConstRefVectorIterator< const ValueType > Iterator
Definition: ConstRefVector.h:332
ContainerType::value_type ValueType
Definition: ConstRefVector.h:331
ValueType value_type
STL-compliance type definitions.
Definition: ConstRefVector.h:340
void sortByPosition()
Lexicographically sorts the elements by their position.
Definition: ConstRefVector.h:733
ConstReverseIterator rbegin() const
See std::vector documentation.
Definition: ConstRefVector.h:433
void sortByComparator(ComparatorType const &comparator=ComparatorType())
Definition: ConstRefVector.h:754
ContainerType::const_reference const_reference
Definition: ConstRefVector.h:344
void sortByIntensity(bool reverse=false)
Sorting.
Definition: ConstRefVector.h:719
ReverseIterator reverse_iterator
Definition: ConstRefVector.h:348
size_type max_size() const
See std::vector documentation.
Definition: ConstRefVector.h:391
const ContainerType * base_container_ptr_
Pointer to the base container.
Definition: ConstRefVector.h:770
ReverseIterator rend()
See std::vector documentation.
Definition: ConstRefVector.h:427
bool operator>=(const ConstRefVector &array) const
Comparison of container sizes.
Definition: ConstRefVector.h:538
Iterator end()
See std::vector documentation.
Definition: ConstRefVector.h:403
void assign(size_type n, const ValueType &x)
See std::vector documentation.
Definition: ConstRefVector.h:703
ContainerType::difference_type difference_type
Definition: ConstRefVector.h:342
const_reference operator[](size_type n) const
See std::vector documentation.
Definition: ConstRefVector.h:483
void clear()
See std::vector documentation.
Definition: ConstRefVector.h:471
size_type capacity() const
See std::vector documentation.
Definition: ConstRefVector.h:373
ConstIterator begin() const
See std::vector documentation.
Definition: ConstRefVector.h:409
~ConstRefVector()
See std::vector documentation.
Definition: ConstRefVector.h:670
ContainerType::size_type size_type
Definition: ConstRefVector.h:341
bool operator<=(const ConstRefVector &array) const
Comparison of container sizes.
Definition: ConstRefVector.h:532
void push_back(const ValueType &x)
See std::vector documentation.
Definition: ConstRefVector.h:354
ReverseIterator rbegin()
See std::vector documentation.
Definition: ConstRefVector.h:421
void insert(Iterator pos, size_type n, const ValueType &element)
See std::vector documentation.
Definition: ConstRefVector.h:564
ContainerT ContainerType
Type definitions.
Definition: ConstRefVector.h:329
std::reverse_iterator< ConstIterator > ConstReverseIterator
Definition: ConstRefVector.h:335
void swap(ConstRefVector &array)
See std::vector documentation.
Definition: ConstRefVector.h:544
ConstRefVectorConstIterator< const ValueType > ConstIterator
Definition: ConstRefVector.h:333
void resize(size_type new_size, const ValueType &t)
See std::vector documentation.
Definition: ConstRefVector.h:452
bool operator==(const ConstRefVector &array) const
See std::vector documentation.
Definition: ConstRefVector.h:489
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
static String & reverse(String &this_s)
Definition: StringUtilsSimple.h:350
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47