OpenMS  2.7.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>
39 
40 #include <algorithm>
41 #include <typeinfo>
42 #include <vector>
43 
44 namespace OpenMS
45 {
46 
69  template <typename ContainerT>
71  {
72 public:
73 
75  template <class ValueT>
77  {
78  friend class ConstRefVector;
79 
80 public:
81  typedef ValueT ValueType;
83  typedef typename std::vector<ValueType*>::difference_type difference_type;
84  typedef const value_type& reference;
85  typedef const value_type* pointer;
86  typedef std::random_access_iterator_tag iterator_category;
87 
89 
91 
93 
95 
96  ConstRefVectorConstIterator(const typename std::vector<ValueType*>* vec, unsigned int position)
97  {
98  vector_ = (typename std::vector<ValueType*>*)vec;
100  }
101 
102  ConstRefVectorConstIterator(typename std::vector<ValueType*>* vec, unsigned int position)
103  {
104  vector_ = vec;
106  }
107 
109  {
110  return position_ < it.position_;
111  }
112 
114  {
115  return position_ > it.position_;
116  }
117 
119  {
120  return position_ < it.position_ || position_ == it.position_;
121  }
122 
124  {
125  return position_ > it.position_ || position_ == it.position_;
126  }
127 
129  {
130  return position_ == it.position_ && vector_ == it.vector_;
131  }
132 
134  {
135  return position_ != it.position_ || vector_ != it.vector_;
136  }
137 
139  {
140  position_ += 1;
141  return *this;
142  }
143 
145  {
146  ConstRefVectorConstIterator tmp(*this);
147  ++(*this);
148  return tmp;
149  }
150 
152  {
153  position_ -= 1;
154  return *this;
155  }
156 
158  {
159  ConstRefVectorConstIterator tmp(*this);
160  --(*this);
161  return tmp;
162  }
163 
165  {
166  ConstRefVectorConstIterator tmp(*this);
167  tmp.position_ -= n;
168  return tmp;
169  }
170 
172  {
173  ConstRefVectorConstIterator tmp(*this);
174  tmp.position_ += n;
175  return tmp;
176  }
177 
179  {
180  position_ += n;
181  return *this;
182  }
183 
185  {
186  position_ -= n;
187  return *this;
188  }
189 
191  {
192  return i1.position_ - i2.position_;
193  }
194 
196  {
198  tmp.position_ += n;
199  return tmp;
200  }
201 
203  {
204  return *((*vector_)[position_]);
205  }
206 
208  {
209  return (*vector_)[position_];
210  }
211 
212 protected:
213 
214  typename std::vector<ValueType*>* vector_;
215  unsigned int position_;
216  };
217 
218 
220  template <class ValueT>
222  public ConstRefVectorConstIterator<ValueT>
223  {
224  friend class ConstRefVector;
225 
226 public:
227 
228  typedef ValueT ValueType;
231 
234 
236 
238 
239  ConstRefVectorIterator(typename std::vector<ValueType*>* vec, unsigned int position) :
241  {
242  }
243 
245 
247 
249  {
250  return *((*vector_)[position_]);
251  }
252 
254  {
255  return (*vector_)[position_];
256  }
257 
259  {
261  return *this;
262  }
263 
265  {
266  ConstRefVectorIterator tmp(*this);
267  ++(*this);
268  return tmp;
269  }
270 
272  {
274  return *this;
275  }
276 
278  {
279  ConstRefVectorIterator tmp(*this);
280  --(*this);
281  return tmp;
282  }
283 
285  {
286  ConstRefVectorIterator tmp(*this);
287  tmp.position_ -= n;
288  return tmp;
289  }
290 
292  {
293  ConstRefVectorIterator tmp(*this);
294  tmp.position_ += n;
295  return tmp;
296  }
297 
299  {
300  ConstRefVectorIterator tmp(i);
301  tmp.position_ += n;
302  return tmp;
303  }
304 
306  {
308  return *this;
309  }
310 
312  {
314  return *this;
315  }
316 
318  {
319  unsigned int tmp = i1.position_;
320  i1.position_ = i2.position_;
321  i2.position_ = tmp;
322  }
323 
324  };
325 
326 
328 
329  typedef ContainerT ContainerType;
332  typedef typename ContainerType::value_type ValueType;
335  typedef std::reverse_iterator<Iterator> ReverseIterator;
336  typedef std::reverse_iterator<ConstIterator> ConstReverseIterator;
338 
340 
342  typedef typename ContainerType::size_type size_type;
343  typedef typename ContainerType::difference_type difference_type;
344  typedef typename ContainerType::reference reference;
345  typedef typename ContainerType::const_reference const_reference;
346  typedef typename ContainerType::pointer pointer;
352 
353 
355  void push_back(const ValueType& x)
356  {
357  const ValueType* element = &x;
358  vector_.push_back(element);
359  }
360 
362  void pop_back()
363  {
364  vector_.pop_back();
365  }
366 
368  size_type size() const
369  {
370  return vector_.size();
371  }
372 
375  {
376  return std::max(vector_.size(), capacity_);
377  }
378 
381  {
382  size_type cap = capacity();
383 
384  if (n > cap)
385  {
386  vector_.reserve(n);
387  capacity_ = n;
388  }
389  }
390 
393  {
394  return vector_.max_size();
395  }
396 
399  {
400  return Iterator((std::vector<const ValueType*>*) & vector_, (unsigned int)0);
401  }
402 
405  {
406  return Iterator((std::vector<const ValueType*>*) & vector_, (unsigned int)(vector_.size()));
407  }
408 
411  {
412  return ConstIterator((const std::vector<const ValueType*>*) & vector_, (unsigned int)0);
413  }
414 
417  {
418  return ConstIterator((const std::vector<const ValueType*>*) & vector_, (unsigned int)(vector_.size()));
419  }
420 
423  {
424  return ReverseIterator(end());
425  }
426 
429  {
430  return ReverseIterator(begin());
431  }
432 
435  {
436  return ConstReverseIterator(end());
437  }
438 
441  {
442  return ConstReverseIterator(begin());
443  }
444 
446  void resize(size_type new_size)
447  {
448  vector_.resize(new_size);
449  capacity_ = vector_.capacity();
450  }
451 
453  void resize(size_type new_size, const ValueType& t)
454  {
455  vector_.resize(new_size, &t);
456  capacity_ = vector_.capacity();
457  }
458 
461  {
462  return *(begin());
463  }
464 
467  {
468  return *(end() - 1);
469  }
470 
472  void clear()
473  {
474  vector_.clear();
475  }
476 
478  bool empty() const
479  {
480  return vector_.empty();
481  }
482 
485  {
486  return *(vector_[n]);
487  }
488 
490  bool operator==(const ConstRefVector& array) const
491  {
493  {
494  return false;
495  }
496  if (size() != array.size())
497  {
498  return false;
499  }
500  for (Size i = 0; i < size(); i++)
501  {
502  if (typeid(*(vector_[i])) != typeid(*(array.vector_[i])))
503  {
504  return false;
505  }
506  if (vector_[i]->operator!=(* array.vector_[i]))
507  {
508  return false;
509  }
510  }
511  return true;
512  }
513 
515  bool operator!=(const ConstRefVector& array) const
516  {
517  return !(operator==(array));
518  }
519 
521  bool operator<(const ConstRefVector& array) const
522  {
523  return size() < array.size();
524  }
525 
527  bool operator>(const ConstRefVector& array) const
528  {
529  return size() > array.size();
530  }
531 
533  bool operator<=(const ConstRefVector& array) const
534  {
535  return operator<(array) || operator==(array);
536  }
537 
539  bool operator>=(const ConstRefVector& array) const
540  {
541  return operator>(array) || operator==(array);
542  }
543 
545  void swap(ConstRefVector& array)
546  {
547  vector_.swap(array.vector_);
548  }
549 
551  friend void swap(ConstRefVector& a1, ConstRefVector& a2)
552  {
553  a1.vector_.swap(a2.vector_);
554  }
555 
557  Iterator insert(Iterator pos, const ValueType& element)
558  {
559  const ValueType* pointer = &element;
560  vector_.insert(vector_.begin() + pos.position_, pointer);
561  return pos;
562  }
563 
565  void insert(Iterator pos, size_type n, const ValueType& element)
566  {
567  const ValueType* pointer;
568  std::vector<const ValueType*> tmp;
569  for (size_type i = 0; i < n; i++)
570  {
571  pointer = &element;
572  tmp.push_back(pointer);
573  }
574  vector_.insert(vector_.begin() + pos.position_, tmp.begin(), tmp.end());
575  }
576 
578  template <class InputIterator>
579  void insert(Iterator pos, InputIterator f, InputIterator l)
580  {
581  const ValueType* pointer;
582  std::vector<const ValueType*> tmp;
583  for (InputIterator it = f; it != l; ++it)
584  {
585  pointer = &(*it);
586  tmp.push_back(pointer);
587  }
588  vector_.insert(vector_.begin() + pos.position_, tmp.begin(), tmp.end());
589  }
590 
593  {
594  vector_.erase(vector_.begin() + pos.position_);
595  return pos;
596  }
597 
600  {
601  vector_.erase(vector_.begin() + first.position_, vector_.begin() + last.position_);
602  return first;
603  }
604 
606 
607  ConstRefVector() :
609  capacity_(0),
610  base_container_ptr_(nullptr)
611  {
612  }
613 
616  capacity_(0),
618  {
619  vector_ = std::vector<const ValueType*>(n);
620  }
621 
623  ConstRefVector(size_type n, const ValueType& element) :
624  capacity_(0),
626  {
627  vector_ = std::vector<const ValueType*>(n, &element);
628  }
629 
632  capacity_(0),
634  {
635  const ValueType* element;
636  for (ConstIterator it = p.begin(); it != p.end(); ++it)
637  {
638  element = &(*it);
639  vector_.push_back(element);
640  }
641  }
642 
644  template <class InputIterator>
645  ConstRefVector(InputIterator f, InputIterator l) :
646  capacity_(0),
647  base_container_ptr_(nullptr)
648  {
649  const ValueType* pointer;
650  for (InputIterator it = f; it != l; ++it)
651  {
652  pointer = &(*it);
653  vector_.push_back(pointer);
654  }
655  }
656 
659  capacity_(0),
661  {
662  const ValueType* element;
663  for (typename ContainerType::iterator it = p.begin(); it != p.end(); ++it)
664  {
665  element = &(*it);
666  vector_.push_back(element);
667  }
668  }
669 
672  {
673  }
674 
676 
679  {
680  if (this == &rhs) return *this;
681 
683  clear();
684  reserve(rhs.size());
685  const ValueType* element;
686  for (ConstIterator it = rhs.begin(); it != rhs.end(); ++it)
687  {
688  element = &(*it);
689  vector_.push_back(element);
690  }
691 
692  return *this;
693  }
694 
696  template <class InputIterator>
697  void assign(InputIterator f, InputIterator l)
698  {
699  clear();
700  insert(end(), f, l);
701  }
702 
704  void assign(size_type n, const ValueType& x)
705  {
706  clear();
707  insert(end(), n, x);
708  }
709 
718 
720  void sortByIntensity(bool reverse = false)
721  {
722  if (reverse)
723  {
724  std::sort(vector_.begin(), vector_.end(), reverseComparator(pointerComparator(typename ValueType::IntensityLess())));
725  }
726  else
727  {
728  std::sort(vector_.begin(), vector_.end(), pointerComparator(typename ValueType::IntensityLess()));
729  }
730  }
731 
734  {
735  std::sort(vector_.begin(), vector_.end(), pointerComparator(typename ValueType::PositionLess()));
736  }
737 
739 
753  template <typename ComparatorType>
754  void sortByComparator(ComparatorType const& comparator = ComparatorType())
755  {
756  std::sort(vector_.begin(), vector_.end(), pointerComparator(comparator));
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:77
ValueT ValueType
Definition: ConstRefVector.h:81
ConstRefVectorConstIterator & operator++()
Definition: ConstRefVector.h:138
ConstRefVectorConstIterator operator--(int)
Definition: ConstRefVector.h:157
ConstRefVectorConstIterator & operator+=(difference_type n)
Definition: ConstRefVector.h:178
ConstRefVectorConstIterator operator++(int)
Definition: ConstRefVector.h:144
bool operator<=(const ConstRefVectorConstIterator &it) const
Definition: ConstRefVector.h:118
std::random_access_iterator_tag iterator_category
Definition: ConstRefVector.h:86
ConstRefVectorConstIterator operator+(difference_type n) const
Definition: ConstRefVector.h:171
bool operator>(const ConstRefVectorConstIterator &it) const
Definition: ConstRefVector.h:113
ValueType value_type
Definition: ConstRefVector.h:82
std::vector< ValueType * > * vector_
Definition: ConstRefVector.h:214
unsigned int position_
Definition: ConstRefVector.h:215
ConstRefVectorConstIterator & operator-=(difference_type n)
Definition: ConstRefVector.h:184
ConstRefVectorConstIterator(typename std::vector< ValueType * > *vec, unsigned int position)
Definition: ConstRefVector.h:102
ConstRefVectorConstIterator & operator=(const ConstRefVectorConstIterator &)=default
const value_type & reference
Definition: ConstRefVector.h:84
reference operator*() const
Definition: ConstRefVector.h:202
ConstRefVectorConstIterator(const typename std::vector< ValueType * > *vec, unsigned int position)
Definition: ConstRefVector.h:96
bool operator<(const ConstRefVectorConstIterator &it) const
Definition: ConstRefVector.h:108
ConstRefVectorConstIterator & operator--()
Definition: ConstRefVector.h:151
friend ConstRefVectorConstIterator operator+(difference_type n, const ConstRefVectorConstIterator &i)
Definition: ConstRefVector.h:195
const value_type * pointer
Definition: ConstRefVector.h:85
ConstRefVectorConstIterator operator-(difference_type n) const
Definition: ConstRefVector.h:164
bool operator>=(const ConstRefVectorConstIterator &it) const
Definition: ConstRefVector.h:123
ConstRefVectorConstIterator(const ConstRefVectorConstIterator &)=default
std::vector< ValueType * >::difference_type difference_type
Definition: ConstRefVector.h:83
bool operator!=(const ConstRefVectorConstIterator &it) const
Definition: ConstRefVector.h:133
pointer operator->() const
Definition: ConstRefVector.h:207
bool operator==(const ConstRefVectorConstIterator &it) const
Definition: ConstRefVector.h:128
friend difference_type operator-(const ConstRefVectorConstIterator &i1, const ConstRefVectorConstIterator &i2)
Definition: ConstRefVector.h:190
Mutable iterator for the ConstRefVector.
Definition: ConstRefVector.h:223
ConstRefVectorIterator(typename std::vector< ValueType * > *vec, unsigned int position)
Definition: ConstRefVector.h:239
ConstRefVectorIterator operator--(int)
Definition: ConstRefVector.h:277
ValueT ValueType
Definition: ConstRefVector.h:228
ConstRefVectorIterator operator++(int)
Definition: ConstRefVector.h:264
ConstRefVectorIterator(const ConstRefVectorIterator &)=default
ConstRefVectorIterator & operator++()
Definition: ConstRefVector.h:258
ConstRefVectorIterator & operator+=(typename ConstRefVectorIterator::difference_type n)
Definition: ConstRefVector.h:305
friend void swap(ConstRefVectorIterator &i1, ConstRefVectorIterator &i2)
Definition: ConstRefVector.h:317
ConstRefVectorIterator operator+(typename ConstRefVectorIterator::difference_type n) const
Definition: ConstRefVector.h:291
ConstRefVectorIterator & operator--()
Definition: ConstRefVector.h:271
ConstRefVectorIterator & operator-=(typename ConstRefVectorIterator::difference_type n)
Definition: ConstRefVector.h:311
ConstRefVectorIterator & operator=(const ConstRefVectorIterator &rhs)=default
ConstRefVectorIterator operator-(typename ConstRefVectorIterator::difference_type n) const
Definition: ConstRefVector.h:284
reference operator*() const
Definition: ConstRefVector.h:248
ConstRefVectorConstIterator< ValueType >::value_type * pointer
Definition: ConstRefVector.h:230
friend ConstRefVectorIterator operator+(typename ConstRefVectorIterator::difference_type n, const ConstRefVectorIterator &i)
Definition: ConstRefVector.h:298
pointer operator->() const
Definition: ConstRefVector.h:253
ConstRefVectorConstIterator< ValueType >::value_type & reference
Definition: ConstRefVector.h:229
This vector holds pointer to the elements of another container.
Definition: ConstRefVector.h:71
friend void swap(ConstRefVector &a1, ConstRefVector &a2)
See std::vector documentation.
Definition: ConstRefVector.h:551
ConstRefVector(InputIterator f, InputIterator l)
See std::vector documentation.
Definition: ConstRefVector.h:645
void pop_back()
See std::vector documentation.
Definition: ConstRefVector.h:362
ConstReverseIterator const_reverse_iterator
Definition: ConstRefVector.h:350
void insert(Iterator pos, InputIterator f, InputIterator l)
See std::vector documentation.
Definition: ConstRefVector.h:579
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:460
ConstRefVector(ContainerType &p)
See std::vector documentation.
Definition: ConstRefVector.h:658
ConstRefVector(const ConstRefVector &p)
See std::vector documentation.
Definition: ConstRefVector.h:631
ConstRefVector()
See std::vector documentation.
Definition: ConstRefVector.h:608
Iterator begin()
See std::vector documentation.
Definition: ConstRefVector.h:398
Iterator iterator
Definition: ConstRefVector.h:347
ConstRefVector(size_type n, const ValueType &element)
See std::vector documentation.
Definition: ConstRefVector.h:623
ContainerType::reference reference
Definition: ConstRefVector.h:344
ContainerType::pointer pointer
Definition: ConstRefVector.h:346
std::reverse_iterator< Iterator > ReverseIterator
Definition: ConstRefVector.h:335
bool operator!=(const ConstRefVector &array) const
See std::vector documentation.
Definition: ConstRefVector.h:515
Iterator erase(Iterator pos)
See std::vector documentation.
Definition: ConstRefVector.h:592
ConstRefVector & operator=(const ConstRefVector &rhs)
See std::vector documentation.
Definition: ConstRefVector.h:678
ConstReverseIterator rend() const
See std::vector documentation.
Definition: ConstRefVector.h:440
void resize(size_type new_size)
See std::vector documentation.
Definition: ConstRefVector.h:446
void reserve(size_type n)
See std::vector documentation.
Definition: ConstRefVector.h:380
ConstIterator const_iterator
Definition: ConstRefVector.h:348
void assign(InputIterator f, InputIterator l)
See std::vector documentation.
Definition: ConstRefVector.h:697
size_type size() const
See std::vector documentation.
Definition: ConstRefVector.h:368
const_reference back() const
See std::vector documentation.
Definition: ConstRefVector.h:466
bool empty() const
See std::vector documentation.
Definition: ConstRefVector.h:478
Iterator erase(Iterator first, Iterator last)
See std::vector documentation.
Definition: ConstRefVector.h:599
ConstRefVector(size_type n)
See std::vector documentation.
Definition: ConstRefVector.h:615
bool operator<(const ConstRefVector &array) const
Comparison of container sizes.
Definition: ConstRefVector.h:521
Iterator insert(Iterator pos, const ValueType &element)
See std::vector documentation.
Definition: ConstRefVector.h:557
ConstIterator end() const
See std::vector documentation.
Definition: ConstRefVector.h:416
bool operator>(const ConstRefVector &array) const
Comparison of container sizes.
Definition: ConstRefVector.h:527
size_type capacity_
the current capacity
Definition: ConstRefVector.h:768
ConstRefVectorIterator< const ValueType > Iterator
Definition: ConstRefVector.h:333
ContainerType::value_type ValueType
Definition: ConstRefVector.h:332
ValueType value_type
STL-compliance type definitions.
Definition: ConstRefVector.h:341
void sortByPosition()
Lexicographically sorts the elements by their position.
Definition: ConstRefVector.h:733
ConstReverseIterator rbegin() const
See std::vector documentation.
Definition: ConstRefVector.h:434
void sortByComparator(ComparatorType const &comparator=ComparatorType())
Definition: ConstRefVector.h:754
ContainerType::const_reference const_reference
Definition: ConstRefVector.h:345
void sortByIntensity(bool reverse=false)
Sorting.
Definition: ConstRefVector.h:720
ReverseIterator reverse_iterator
Definition: ConstRefVector.h:349
size_type max_size() const
See std::vector documentation.
Definition: ConstRefVector.h:392
const ContainerType * base_container_ptr_
Pointer to the base container.
Definition: ConstRefVector.h:770
ReverseIterator rend()
See std::vector documentation.
Definition: ConstRefVector.h:428
bool operator>=(const ConstRefVector &array) const
Comparison of container sizes.
Definition: ConstRefVector.h:539
Iterator end()
See std::vector documentation.
Definition: ConstRefVector.h:404
void assign(size_type n, const ValueType &x)
See std::vector documentation.
Definition: ConstRefVector.h:704
ContainerType::difference_type difference_type
Definition: ConstRefVector.h:343
const_reference operator[](size_type n) const
See std::vector documentation.
Definition: ConstRefVector.h:484
void clear()
See std::vector documentation.
Definition: ConstRefVector.h:472
size_type capacity() const
See std::vector documentation.
Definition: ConstRefVector.h:374
ConstIterator begin() const
See std::vector documentation.
Definition: ConstRefVector.h:410
~ConstRefVector()
See std::vector documentation.
Definition: ConstRefVector.h:671
ContainerType::size_type size_type
Definition: ConstRefVector.h:342
bool operator<=(const ConstRefVector &array) const
Comparison of container sizes.
Definition: ConstRefVector.h:533
void push_back(const ValueType &x)
See std::vector documentation.
Definition: ConstRefVector.h:355
ReverseIterator rbegin()
See std::vector documentation.
Definition: ConstRefVector.h:422
void insert(Iterator pos, size_type n, const ValueType &element)
See std::vector documentation.
Definition: ConstRefVector.h:565
ContainerT ContainerType
Type definitions.
Definition: ConstRefVector.h:330
std::reverse_iterator< ConstIterator > ConstReverseIterator
Definition: ConstRefVector.h:336
void swap(ConstRefVector &array)
See std::vector documentation.
Definition: ConstRefVector.h:545
ConstRefVectorConstIterator< const ValueType > ConstIterator
Definition: ConstRefVector.h:334
void resize(size_type new_size, const ValueType &t)
See std::vector documentation.
Definition: ConstRefVector.h:453
bool operator==(const ConstRefVector &array) const
See std::vector documentation.
Definition: ConstRefVector.h:490
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
ReverseComparator< Cmp > reverseComparator(Cmp const &cmp)
Make-function to create a ReverseComparator from another comparator without the need to specify the t...
Definition: ComparatorUtils.h:256
PointerComparator< Cmp > pointerComparator(Cmp const &cmp)
Make-function to create a PointerComparator from another comparator without the need to specify the t...
Definition: ComparatorUtils.h:207
Size< TNeedle >::Type position(const PatternAuxData< TNeedle > &dh)
Definition: AhoCorasickAmbiguous.h:563