ATLAS Offline Software
Functions
DVL_algorithms.h File Reference

Specializations of STL algorithms to work with DataVector/List. More...

#include "AthContainers/tools/DVLIterator.h"
#include <iterator>
#include <algorithm>
#include "AthContainers/tools/DVL_algorithms.icc"
Include dependency graph for DVL_algorithms.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<class DVL , class T >
DataModel_detail::iterator< DVL > std::remove (typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end, const T &value)
 Specialization of remove for DataVector/List. More...
 
template<class DVL , class Predicate >
DataModel_detail::iterator< DVL > std::remove_if (typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end, Predicate pred)
 Specialization of remove_if for DataVector/List. More...
 
template<class DVL , class T >
std::reverse_iterator< DataModel_detail::iterator< DVL > > std::remove (typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const T &value)
 Specialization of remove for DataVector/List. More...
 
template<class DVL , class Predicate >
std::reverse_iterator< DataModel_detail::iterator< DVL > > std::remove_if (typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Predicate pred)
 Specialization of remove_if for DataVector/List. More...
 
template<class DVL >
DataModel_detail::iterator< DVL > std::unique (typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
 Specialization of unique for DataVector/List. More...
 
template<class DVL , class BinaryPredicate >
DataModel_detail::iterator< DVL > std::unique (typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end, BinaryPredicate pred)
 Specialization of unique for DataVector/List. More...
 
template<class DVL >
std::reverse_iterator< DataModel_detail::iterator< DVL > > std::unique (typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end)
 Specialization of unique for DataVector/List. More...
 
template<class DVL , class BinaryPredicate >
std::reverse_iterator< DataModel_detail::iterator< DVL > > std::unique (typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, BinaryPredicate pred)
 Specialization of unique for DataVector/List. More...
 
template<class DVL >
void std::rotate (typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > mid, typename DataModel_detail::iterator< DVL > end)
 Specialization of rotate for DataVector/List. More...
 
template<class DVL >
void std::rotate (typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > mid, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end)
 Specialization of rotate for DataVector/List. More...
 
template<class DVL >
void std::reverse (typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
 Specialization of reverse for DataVector/List. More...
 
template<class DVL >
void std::reverse (typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end)
 Specialization of reverse for DataVector/List. More...
 
template<class DVL , class Predicate >
DataModel_detail::iterator< DVL > std::partition (typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end, Predicate pred)
 Specialization of partition for DataVector/List. More...
 
template<class DVL , class Predicate >
std::reverse_iterator< DataModel_detail::iterator< DVL > > std::partition (typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Predicate pred)
 Specialization of partition for DataVector/List. More...
 
template<class DVL , class Predicate >
DataModel_detail::iterator< DVL > std::stable_partition (typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end, Predicate pred)
 Specialization of stable_partition for DataVector/List. More...
 
template<class DVL , class Predicate >
std::reverse_iterator< DataModel_detail::iterator< DVL > > std::stable_partition (typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Predicate pred)
 Specialization of stable_partition for DataVector/List. More...
 
template<class DVL >
void std::inplace_merge (typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > mid, typename DataModel_detail::iterator< DVL > end)
 Specialization of inplace_merge for DataVector/List. More...
 
template<class DVL , class Compare >
void std::inplace_merge (typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > mid, typename DataModel_detail::iterator< DVL > end, Compare comp)
 Specialization of inplace_merge for DataVector/List. More...
 
template<class DVL >
void std::inplace_merge (typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > mid, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end)
 Specialization of inplace_merge for DataVector/List. More...
 
template<class DVL , class Compare >
void std::inplace_merge (typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > mid, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
 Specialization of inplace_merge for DataVector/List. More...
 
template<class DVL >
void std::sort (typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
 Specialization of sort for DataVector/List. More...
 
template<class DVL , class Compare >
void std::sort (typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end, Compare comp)
 Specialization of sort for DataVector/List. More...
 
template<class DVL >
void std::sort (typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end)
 Specialization of sort for DataVector/List. More...
 
template<class DVL , class Compare >
void std::sort (typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
 Specialization of sort for DataVector/List. More...
 
template<class DVL >
void std::stable_sort (DataModel_detail::iterator< DVL > beg, DataModel_detail::iterator< DVL > end)
 Specialization of stable_sort for DataVector/List. More...
 
template<class DVL , class Compare >
void std::stable_sort (DataModel_detail::iterator< DVL > beg, DataModel_detail::iterator< DVL > end, Compare comp)
 Specialization of stable_sort for DataVector/List. More...
 
template<class DVL >
void std::stable_sort (std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > end)
 Specialization of stable_sort for DataVector/List. More...
 
template<class DVL , class Compare >
void std::stable_sort (std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
 Specialization of stable_sort for DataVector/List. More...
 
template<class DVL >
void std::partial_sort (DataModel_detail::iterator< DVL > beg, DataModel_detail::iterator< DVL > mid, DataModel_detail::iterator< DVL > end)
 Specialization of partial_sort for DataVector/List. More...
 
template<class DVL , class Compare >
void std::partial_sort (DataModel_detail::iterator< DVL > beg, DataModel_detail::iterator< DVL > mid, DataModel_detail::iterator< DVL > end, Compare comp)
 Specialization of partial_sort for DataVector/List. More...
 
template<class DVL >
void std::partial_sort (std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > mid, std::reverse_iterator< DataModel_detail::iterator< DVL > > end)
 Specialization of partial_sort for DataVector/List. More...
 
template<class DVL , class Compare >
void std::partial_sort (std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > mid, std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
 Specialization of partial_sort for DataVector/List. More...
 
template<class DVL , class UniformRandom >
void std::shuffle (typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end, UniformRandom &g)
 Specialization of shuffle for DataVector/List. More...
 
template<class DVL , class UniformRandom >
void std::shuffle (typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, UniformRandom &g)
 Specialization of shuffle for DataVector/List. More...
 

Detailed Description

Specializations of STL algorithms to work with DataVector/List.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
Sep, 2010

Definition in file DVL_algorithms.h.

Function Documentation

◆ inplace_merge() [1/4]

template<class DVL >
void std::inplace_merge ( typename DataModel_detail::iterator< DVL >  beg,
typename DataModel_detail::iterator< DVL >  mid,
typename DataModel_detail::iterator< DVL >  end 
)

Specialization of inplace_merge for DataVector/List.

Parameters
begThe start iterator for the merge operation.
midDivider between the two sequences to be merged.
endThe end iterator for the merge operation.

beg, mid, and end should both be iterators from the same DataVector/List. This performs the operation in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 442 of file DVL_algorithms.h.

445 {
446  std::inplace_merge (beg.base(), mid.base(), end.base());
447  DataModel_detail::resortAux (beg, end);
448 }

◆ inplace_merge() [2/4]

template<class DVL , class Compare >
void std::inplace_merge ( typename DataModel_detail::iterator< DVL >  beg,
typename DataModel_detail::iterator< DVL >  mid,
typename DataModel_detail::iterator< DVL >  end,
Compare  comp 
)

Specialization of inplace_merge for DataVector/List.

Parameters
begThe start iterator for the merge operation.
midDivider between the two sequences to be merged.
endThe end iterator for the merge operation.
compThe comparison object.

beg, mid, and end should both be iterators from the same DataVector/List. This performs the operation in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 466 of file DVL_algorithms.h.

470 {
471  std::inplace_merge (beg.base(), mid.base(), end.base(),
472  typename DataModel_detail::Compwrapper<DVL, Compare>(comp));
473  DataModel_detail::resortAux (beg, end);
474 }

◆ inplace_merge() [3/4]

template<class DVL >
void std::inplace_merge ( typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  beg,
typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  mid,
typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  end 
)

Specialization of inplace_merge for DataVector/List.

Parameters
begThe start iterator for the merge operation.
midDivider between the two sequences to be merged.
endThe end iterator for the merge operation.

beg, mid, and end should both be iterators from the same DataVector/List. This performs the operation in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 491 of file DVL_algorithms.h.

494 {
495  typedef typename DVL::BaseContainer::reverse_iterator ri;
496  std::inplace_merge (ri (beg.base().base()),
497  ri (mid.base().base()),
498  ri (end.base().base()));
499  DataModel_detail::resortAux (beg, end);
500 }

◆ inplace_merge() [4/4]

template<class DVL , class Compare >
void std::inplace_merge ( typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  beg,
typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  mid,
typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  end,
Compare  comp 
)

Specialization of inplace_merge for DataVector/List.

Parameters
begThe start iterator for the merge operation.
midDivider between the two sequences to be merged.
endThe end iterator for the merge operation.
compThe comparison object.

beg, mid, and end should both be iterators from the same DataVector/List. This performs the operation in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 518 of file DVL_algorithms.h.

522 {
523  typedef typename DVL::BaseContainer::reverse_iterator ri;
524  std::inplace_merge (ri (beg.base().base()),
525  ri (mid.base().base()),
526  ri (end.base().base()),
527  typename DataModel_detail::Compwrapper<DVL, Compare>(comp));
528  DataModel_detail::resortAux (beg, end);
529 }

◆ partial_sort() [1/4]

template<class DVL >
void std::partial_sort ( DataModel_detail::iterator< DVL >  beg,
DataModel_detail::iterator< DVL >  mid,
DataModel_detail::iterator< DVL >  end 
)

Specialization of partial_sort for DataVector/List.

Parameters
begThe start iterator for the sort.
midThe middle iterator for the sort.
endThe end iterator for the sort.

beg, mid, and end should both be iterators from the same DataVector/List. This performs the sort in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 734 of file DVL_algorithms.h.

737 {
738  // Wrap the default comparison object,
739  // in case someone's overridden operator< for pointers.
740  typedef std::less<typename DVL::BaseContainer::value_type> less;
741  std::partial_sort (beg.base(), mid.base(), end.base(),
742  DataModel_detail::Compwrapper<DVL, less> (less()));
743  DataModel_detail::resortAux (beg, end);
744 }

◆ partial_sort() [2/4]

template<class DVL , class Compare >
void std::partial_sort ( DataModel_detail::iterator< DVL >  beg,
DataModel_detail::iterator< DVL >  mid,
DataModel_detail::iterator< DVL >  end,
Compare  comp 
)

Specialization of partial_sort for DataVector/List.

Parameters
begThe start iterator for the sort.
midThe middle iterator for the sort.
endThe end iterator for the sort.

beg, mid, and end should both be iterators from the same DataVector/List. This performs the sort in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 759 of file DVL_algorithms.h.

763 {
764  std::partial_sort (beg.base(), mid.base(), end.base(),
765  DataModel_detail::Compwrapper<DVL, Compare> (comp));
766  DataModel_detail::resortAux (beg, end);
767 }

◆ partial_sort() [3/4]

template<class DVL >
void std::partial_sort ( std::reverse_iterator< DataModel_detail::iterator< DVL > >  beg,
std::reverse_iterator< DataModel_detail::iterator< DVL > >  mid,
std::reverse_iterator< DataModel_detail::iterator< DVL > >  end 
)

Specialization of partial_sort for DataVector/List.

Parameters
begThe start reverse_iterator for the sort.
midThe middle reverse_iterator for the sort.
endThe end reverse_iterator for the sort.

beg, mid, and end should both be reverse_iterators from the same DataVector/List. This performs the sort in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 782 of file DVL_algorithms.h.

785 {
786  typedef typename DVL::BaseContainer::reverse_iterator ri;
787  // Wrap the default comparison object,
788  // in case someone's overridden operator< for pointers.
789  typedef std::less<typename DVL::BaseContainer::value_type> less;
790  std::partial_sort (ri (beg.base().base()),
791  ri (mid.base().base()),
792  ri (end.base().base()),
793  typename DataModel_detail::Compwrapper<DVL, less>
794  (less()));
795  DataModel_detail::resortAux (beg, end);
796 }

◆ partial_sort() [4/4]

template<class DVL , class Compare >
void std::partial_sort ( std::reverse_iterator< DataModel_detail::iterator< DVL > >  beg,
std::reverse_iterator< DataModel_detail::iterator< DVL > >  mid,
std::reverse_iterator< DataModel_detail::iterator< DVL > >  end,
Compare  comp 
)

Specialization of partial_sort for DataVector/List.

Parameters
begThe start reverse_iterator for the sort.
midThe middle reverse_iterator for the sort.
endThe end reverse_iterator for the sort.

beg, mid, and end should both be reverse_iterators from the same DataVector/List. This performs the sort in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 811 of file DVL_algorithms.h.

815 {
816  typedef typename DVL::BaseContainer::reverse_iterator ri;
817  std::partial_sort (ri (beg.base().base()),
818  ri (mid.base().base()),
819  ri (end.base().base()),
820  typename DataModel_detail::Compwrapper<DVL, Compare>
821  (comp));
822  DataModel_detail::resortAux (beg, end);
823 }

◆ partition() [1/2]

template<class DVL , class Predicate >
DataModel_detail::iterator<DVL> std::partition ( typename DataModel_detail::iterator< DVL >  beg,
typename DataModel_detail::iterator< DVL >  end,
Predicate  pred 
)

Specialization of partition for DataVector/List.

Parameters
begThe start iterator for the partition operation.
endThe end iterator for the partition operation.
predThe predicate for the partition.

beg and end should both be iterators from the same DataVector/List. This performs the operation in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 324 of file DVL_algorithms.h.

327 {
329  (std::partition (beg.base(), end.base(),
330  DataModel_detail::Predwrapper<DVL, Predicate> (pred)),
331  beg.container());
332  DataModel_detail::resortAux (beg, end);
333  return ret;
334 }

◆ partition() [2/2]

template<class DVL , class Predicate >
std::reverse_iterator<DataModel_detail::iterator<DVL> > std::partition ( typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  beg,
typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  end,
Predicate  pred 
)

Specialization of partition for DataVector/List.

Parameters
begThe start reverse_iterator for the partition operation.
endThe end reverse_iterator for the partition operation.
predThe predicate for the partition.

beg and end should both be reverse_iterators from the same DataVector/List. This performs the operation in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 351 of file DVL_algorithms.h.

354 {
355  typedef typename DataModel_detail::iterator<DVL> Iterator;
356  typedef typename DVL::BaseContainer::reverse_iterator ri;
357  typedef typename DataModel_detail::Predwrapper<DVL, Predicate> pwrap_t;
358  std::reverse_iterator<Iterator> ret
359  (Iterator (std::partition (ri(beg.base().base()),
360  ri(end.base().base()),
361  pwrap_t (pred)).base(),
362  beg.base().container()));
363  DataModel_detail::resortAux (beg, end);
364  return ret;
365 }

◆ remove() [1/2]

template<class DVL , class T >
DataModel_detail::iterator<DVL> std::remove ( typename DataModel_detail::iterator< DVL >  beg,
typename DataModel_detail::iterator< DVL >  end,
const T &  value 
)

Specialization of remove for DataVector/List.

Parameters
begThe start iterator for the remove.
endThe end iterator for the remove.
valueThe value to remove.

beg and end should both be iterators from the same DataVector/List. This performs the remove in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 49 of file DVL_algorithms.h.

52 {
53  // Implemented with iter_swap, no extra index manipulation needed.
54  return DataModel_detail::dvl_remove (beg, end, value);
55 }

◆ remove() [2/2]

template<class DVL , class T >
std::reverse_iterator<DataModel_detail::iterator<DVL> > std::remove ( typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  beg,
typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  end,
const T &  value 
)

Specialization of remove for DataVector/List.

Parameters
begThe start reverse_iterator for the remove.
endThe end reverse_iterator for the remove.
valueThe value to remove.

beg and end should both be reverseIterators from the same DataVector/List. This performs the remove in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 92 of file DVL_algorithms.h.

95 {
96  // Implemented with iter_swap, no extra index manipulation needed.
97  return DataModel_detail::dvl_remove (beg, end, value);
98 }

◆ remove_if() [1/2]

template<class DVL , class Predicate >
DataModel_detail::iterator<DVL> std::remove_if ( typename DataModel_detail::iterator< DVL >  beg,
typename DataModel_detail::iterator< DVL >  end,
Predicate  pred 
)

Specialization of remove_if for DataVector/List.

Parameters
begThe start iterator for the remove.
endThe end iterator for the remove.
predThe predicate for the removal.

beg and end should both be iterators from the same DataVector/List. This performs the remove in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 70 of file DVL_algorithms.h.

73 {
74  // Implemented with iter_swap, no extra index manipulation needed.
75  return DataModel_detail::dvl_remove_if (beg, end, pred);
76 }

◆ remove_if() [2/2]

template<class DVL , class Predicate >
std::reverse_iterator<DataModel_detail::iterator<DVL> > std::remove_if ( typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  beg,
typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  end,
Predicate  pred 
)

Specialization of remove_if for DataVector/List.

Parameters
begThe start reverse_iterator for the remove.
endThe end reverse_iterator for the remove.
predThe predicate for the removal.

beg and end should both be reverse_iterators from the same DataVector/List. This performs the remove in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 114 of file DVL_algorithms.h.

117 {
118  // Implemented with iter_swap, no extra index manipulation needed.
119  return DataModel_detail::dvl_remove_if (beg, end, pred);
120 }

◆ reverse() [1/2]

template<class DVL >
void std::reverse ( typename DataModel_detail::iterator< DVL >  beg,
typename DataModel_detail::iterator< DVL >  end 
)

Specialization of reverse for DataVector/List.

Parameters
begThe start iterator for the reverse operation.
endThe end iterator for the reverse operation.

beg and end should both be iterators from the same DataVector/List. This performs the operation in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 280 of file DVL_algorithms.h.

282 {
283  std::reverse (beg.base(), end.base());
284  DataModel_detail::resortAux (beg, end);
285 }

◆ reverse() [2/2]

template<class DVL >
void std::reverse ( typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  beg,
typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  end 
)

Specialization of reverse for DataVector/List.

Parameters
begThe start reverse_iterator for the reverse operation.
endThe end reverse_iterator for the reverse operation.

beg and end should both be reverse_iterators from the same DataVector/List. This performs the operation in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 301 of file DVL_algorithms.h.

303 {
304  typedef typename DVL::BaseContainer::reverse_iterator ri;
305  std::reverse (ri(beg.base().base()), ri(end.base().base()));
306  DataModel_detail::resortAux (beg, end);
307 }

◆ rotate() [1/2]

template<class DVL >
void std::rotate ( typename DataModel_detail::iterator< DVL >  beg,
typename DataModel_detail::iterator< DVL >  mid,
typename DataModel_detail::iterator< DVL >  end 
)

Specialization of rotate for DataVector/List.

Parameters
begThe start iterator for the rotate operation.
midThe middle iterator for the rotate operation.
endThe end iterator for the rotate operation.

beg and end should both be iterators from the same DataVector/List. This performs the operation in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 221 of file DVL_algorithms.h.

224 {
225  std::rotate (beg.base(), mid.base(), end.base());
226  DataModel_detail::resortAux (beg, end);
227 }

◆ rotate() [2/2]

template<class DVL >
void std::rotate ( typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  beg,
typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  mid,
typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  end 
)

Specialization of rotate for DataVector/List.

Parameters
begThe start reverse_iterator for the rotate operation.
midThe middle reverse_iterator for the rotate operation.
endThe end reverse_iterator for the rotate operation.

beg and end should both be reverse_iterators from the same DataVector/List. This performs the operation in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 244 of file DVL_algorithms.h.

247 {
248  typedef typename DVL::BaseContainer::reverse_iterator ri;
249  std::rotate (ri(beg.base().base()),
250  ri(mid.base().base()),
251  ri(end.base().base()));
252  DataModel_detail::resortAux (beg, end);
253 }

◆ shuffle() [1/2]

template<class DVL , class UniformRandom >
void std::shuffle ( typename DataModel_detail::iterator< DVL >  beg,
typename DataModel_detail::iterator< DVL >  end,
UniformRandom &  g 
)

Specialization of shuffle for DataVector/List.

Parameters
begThe start iterator for the shuffle operation.
endThe end iterator for the shuffle operation.
gThe uniform random number generator.

beg and end should both be iterators from the same DataVector/List. This performs the operation in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 839 of file DVL_algorithms.h.

842 {
843  std::shuffle (beg.base(), end.base(), g);
844  DataModel_detail::resortAux (beg, end);
845 }

◆ shuffle() [2/2]

template<class DVL , class UniformRandom >
void std::shuffle ( typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  beg,
typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  end,
UniformRandom &  g 
)

Specialization of shuffle for DataVector/List.

Parameters
begThe start reverse_iterator for the shuffle operation.
endThe end reverse_iterator for the shuffle operation.
gThe uniform random number generator.

beg and end should both be reverse_iterators from the same DataVector/List. This performs the operation in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 862 of file DVL_algorithms.h.

866 {
867  typedef typename DVL::BaseContainer::reverse_iterator ri;
868  std::shuffle (ri(beg.base().base()),
869  ri(end.base().base()),
870  g);
871  DataModel_detail::resortAux (beg, end);
872 }

◆ sort() [1/4]

template<class DVL >
void std::sort ( typename DataModel_detail::iterator< DVL >  beg,
typename DataModel_detail::iterator< DVL >  end 
)

Specialization of sort for DataVector/List.

Parameters
begThe start iterator for the sort.
endThe end iterator for the sort.

beg and end should both be iterators from the same DataVector/List. This performs the sort in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 554 of file DVL_algorithms.h.

556 {
557  // Wrap the default comparison object,
558  // in case someone's overridden operator< for pointers.
559  typedef std::less<typename DVL::BaseContainer::value_type> less;
560  std::sort (beg.base(), end.base(),
561  typename DataModel_detail::Compwrapper<DVL, less> (less()));
562  DataModel_detail::resortAux (beg, end);
563 }

◆ sort() [2/4]

template<class DVL , class Compare >
void std::sort ( typename DataModel_detail::iterator< DVL >  beg,
typename DataModel_detail::iterator< DVL >  end,
Compare  comp 
)

Specialization of sort for DataVector/List.

Parameters
begThe start iterator for the sort.
endThe end iterator for the sort.
compThe comparison functional object.

beg and end should both be iterators from the same DataVector/List. This performs the sort in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 577 of file DVL_algorithms.h.

580 {
581  std::sort (beg.base(), end.base(),
582  typename DataModel_detail::Compwrapper<DVL, Compare> (comp));
583  DataModel_detail::resortAux (beg, end);
584 }

◆ sort() [3/4]

template<class DVL >
void std::sort ( typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  beg,
typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  end 
)

Specialization of sort for DataVector/List.

Parameters
begThe start reverse_iterator for the sort.
endThe end reverse_iterator for the sort.

beg and end should both be reverse iterators from the same DataVector/List. This performs the sort in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 598 of file DVL_algorithms.h.

600 {
601  typedef typename DVL::BaseContainer::reverse_iterator ri;
602  // Wrap the default comparison object,
603  // in case someone's overridden operator< for pointers.
604  typedef std::less<typename DVL::BaseContainer::value_type> less;
605  std::sort (ri (beg.base().base()), ri (end.base().base()),
606  typename DataModel_detail::Compwrapper<DVL, less> (less()));
607  DataModel_detail::resortAux (beg, end);
608 }

◆ sort() [4/4]

template<class DVL , class Compare >
void std::sort ( typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  beg,
typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  end,
const Compare &  comp 
)

Specialization of sort for DataVector/List.

Parameters
begThe start reverse_iterator for the sort.
endThe end reverse_iterator for the sort.
compThe comparison functional object.

beg and end should both be reverse iterators from the same DataVector/List. This performs the sort in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 623 of file DVL_algorithms.h.

626 {
627  typedef typename DVL::BaseContainer::reverse_iterator ri;
628  std::sort (ri (beg.base().base()), ri (end.base().base()),
629  typename DataModel_detail::Compwrapper<DVL, Compare> (comp));
630  DataModel_detail::resortAux (beg, end);
631 }

◆ stable_partition() [1/2]

template<class DVL , class Predicate >
DataModel_detail::iterator<DVL> std::stable_partition ( typename DataModel_detail::iterator< DVL >  beg,
typename DataModel_detail::iterator< DVL >  end,
Predicate  pred 
)

Specialization of stable_partition for DataVector/List.

Parameters
begThe start iterator for the partition operation.
endThe end iterator for the partition operation.
predThe predicate for the partition.

beg and end should both be iterators from the same DataVector/List. This performs the operation in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 382 of file DVL_algorithms.h.

385 {
387  (std::stable_partition (beg.base(), end.base(),
388  DataModel_detail::Predwrapper<DVL, Predicate>
389  (pred)),
390  beg.container());
391  DataModel_detail::resortAux (beg, end);
392  return ret;
393 }

◆ stable_partition() [2/2]

template<class DVL , class Predicate >
std::reverse_iterator<DataModel_detail::iterator<DVL> > std::stable_partition ( typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  beg,
typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  end,
Predicate  pred 
)

Specialization of stable_partition for DataVector/List.

Parameters
begThe start reverse_iterator for the partition operation.
endThe end reverse_iterator for the partition operation.
predThe predicate for the partition.

beg and end should both be reverse_iterators from the same DataVector/List. This performs the operation in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 410 of file DVL_algorithms.h.

414 {
415  typedef typename DataModel_detail::iterator<DVL> Iterator;
416  typedef typename DVL::BaseContainer::reverse_iterator ri;
417  typedef typename DataModel_detail::Predwrapper<DVL, Predicate> pwrap_t;
418  std::reverse_iterator<Iterator> ret
419  (Iterator (std::stable_partition (ri(beg.base().base()),
420  ri(end.base().base()),
421  pwrap_t (pred)).base(),
422  beg.base().container()));
423  DataModel_detail::resortAux (beg, end);
424  return ret;
425 }

◆ stable_sort() [1/4]

template<class DVL >
void std::stable_sort ( DataModel_detail::iterator< DVL >  beg,
DataModel_detail::iterator< DVL >  end 
)

Specialization of stable_sort for DataVector/List.

Parameters
begThe start iterator for the sort.
endThe end iterator for the sort.

beg and end should both be iterators from the same DataVector/List. This performs the sort in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 644 of file DVL_algorithms.h.

646 {
647  // Wrap the default comparison object,
648  // in case someone's overridden operator< for pointers.
649  typedef std::less<typename DVL::BaseContainer::value_type> less;
650  std::stable_sort (beg.base(), end.base(),
651  DataModel_detail::Compwrapper<DVL, less> (less()));
652  DataModel_detail::resortAux (beg, end);
653 }

◆ stable_sort() [2/4]

template<class DVL , class Compare >
void std::stable_sort ( DataModel_detail::iterator< DVL >  beg,
DataModel_detail::iterator< DVL >  end,
Compare  comp 
)

Specialization of stable_sort for DataVector/List.

Parameters
begThe start iterator for the sort.
endThe end iterator for the sort.

beg and end should both be iterators from the same DataVector/List. This performs the sort in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 666 of file DVL_algorithms.h.

669 {
670  std::stable_sort (beg.base(), end.base(),
671  DataModel_detail::Compwrapper<DVL, Compare> (comp));
672  DataModel_detail::resortAux (beg, end);
673 }

◆ stable_sort() [3/4]

template<class DVL >
void std::stable_sort ( std::reverse_iterator< DataModel_detail::iterator< DVL > >  beg,
std::reverse_iterator< DataModel_detail::iterator< DVL > >  end 
)

Specialization of stable_sort for DataVector/List.

Parameters
begThe start reverse_iterator for the sort.
endThe end reverse_iterator for the sort.

beg and end should both be reverse_iterators from the same DataVector/List. This performs the sort in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 687 of file DVL_algorithms.h.

689 {
690  typedef typename DVL::BaseContainer::reverse_iterator ri;
691  // Wrap the default comparison object,
692  // in case someone's overridden operator< for pointers.
693  typedef std::less<typename DVL::BaseContainer::value_type> less;
694  std::stable_sort (ri (beg.base().base()), ri (end.base().base()),
695  typename DataModel_detail::Compwrapper<DVL, less> (less()));
696  DataModel_detail::resortAux (beg, end);
697 }

◆ stable_sort() [4/4]

template<class DVL , class Compare >
void std::stable_sort ( std::reverse_iterator< DataModel_detail::iterator< DVL > >  beg,
std::reverse_iterator< DataModel_detail::iterator< DVL > >  end,
Compare  comp 
)

Specialization of stable_sort for DataVector/List.

Parameters
begThe start reverse_iterator for the sort.
endThe end reverse_iterator for the sort.

beg and end should both be reverse_iterators from the same DataVector/List. This performs the sort in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 711 of file DVL_algorithms.h.

714 {
715  typedef typename DVL::BaseContainer::reverse_iterator ri;
716  std::stable_sort (ri (beg.base().base()), ri (end.base().base()),
717  typename DataModel_detail::Compwrapper<DVL, Compare>(comp));
718  DataModel_detail::resortAux (beg, end);
719 }

◆ unique() [1/4]

template<class DVL >
DataModel_detail::iterator<DVL> std::unique ( typename DataModel_detail::iterator< DVL >  beg,
typename DataModel_detail::iterator< DVL >  end 
)

Specialization of unique for DataVector/List.

Parameters
begThe start iterator for the unique operation.
endThe end iterator for the unique operation.
valueThe value to remove.

beg and end should both be iterators from the same DataVector/List. This performs the operation in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 135 of file DVL_algorithms.h.

137 {
138  // Implemented with iter_swap, no extra index manipulation needed.
139  return DataModel_detail::dvl_unique (beg, end);
140 }

◆ unique() [2/4]

template<class DVL , class BinaryPredicate >
DataModel_detail::iterator<DVL> std::unique ( typename DataModel_detail::iterator< DVL >  beg,
typename DataModel_detail::iterator< DVL >  end,
BinaryPredicate  pred 
)

Specialization of unique for DataVector/List.

Parameters
begThe start iterator for the unique operation.
endThe end iterator for the unique operation.
predThe predicate for the operation.

beg and end should both be iterators from the same DataVector/List. This performs the operation in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 155 of file DVL_algorithms.h.

158 {
159  // Implemented with iter_swap, no extra index manipulation needed.
160  return DataModel_detail::dvl_unique (beg, end, pred);
161 }

◆ unique() [3/4]

template<class DVL >
std::reverse_iterator<DataModel_detail::iterator<DVL> > std::unique ( typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  beg,
typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  end 
)

Specialization of unique for DataVector/List.

Parameters
begThe start reverse_iterator for the unique operation.
endThe end reverse_iterator for the unique operation.
valueThe value to remove.

beg and end should both be reverse_iterators from the same DataVector/List. This performs the operation in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 177 of file DVL_algorithms.h.

179 {
180  // Implemented with iter_swap, no extra index manipulation needed.
181  return DataModel_detail::dvl_unique (beg, end);
182 }

◆ unique() [4/4]

template<class DVL , class BinaryPredicate >
std::reverse_iterator<DataModel_detail::iterator<DVL> > std::unique ( typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  beg,
typename std::reverse_iterator< DataModel_detail::iterator< DVL > >  end,
BinaryPredicate  pred 
)

Specialization of unique for DataVector/List.

Parameters
begThe start reverse_iterator for the unique operation.
endThe end reverse_iterator for the unique operation.
predThe predicate for the operation.

beg and end should both be reverse_iterators from the same DataVector/List. This performs the operation in a way that doesn't run afoul of DataVector/List's object ownership rules.

Definition at line 199 of file DVL_algorithms.h.

202 {
203  // Implemented with iter_swap, no extra index manipulation needed.
204  return DataModel_detail::dvl_unique (beg, end, pred);
205 }
plotting.yearwise_luminosity_vs_mu.comp
comp
Definition: yearwise_luminosity_vs_mu.py:23
base
std::string base
Definition: hcg.cxx:78
std::shuffle
void shuffle(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, UniformRandom &g)
Specialization of shuffle for DataVector/List.
Definition: DVL_algorithms.h:863
rotate
void rotate(double angler, GeoTrf::Vector2D &vector)
Definition: TRTDetectorFactory_Full.cxx:63
athena.value
value
Definition: athena.py:124
std::stable_sort
void stable_sort(std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
Specialization of stable_sort for DataVector/List.
Definition: DVL_algorithms.h:711
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
std::reverse
void reverse(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end)
Specialization of reverse for DataVector/List.
Definition: DVL_algorithms.h:301
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
WriteBchToCool.beg
beg
Definition: WriteBchToCool.py:69
CxxUtils::fpcompare::less
bool less(double a, double b)
Compare two FP numbers, working around x87 precision issues.
Definition: fpcompare.h:166
std::partial_sort
void partial_sort(std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > mid, std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
Specialization of partial_sort for DataVector/List.
Definition: DVL_algorithms.h:811
std::inplace_merge
void inplace_merge(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > mid, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
Specialization of inplace_merge for DataVector/List.
Definition: DVL_algorithms.h:518
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623