LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
SortByPointers.h File Reference

Silly utility to sort vectors indirectly. More...

#include <vector>
#include <algorithm>
#include <memory>
#include <iterator>
#include <utility>
#include <type_traits>

Go to the source code of this file.

Classes

struct  util::details::MoveFromPointersImpl< Coll, PtrColl >
 
struct  util::details::MoveFromPointersImpl< Coll, PtrColl >
 
struct  util::details::MoveFromPointersImpl< std::vector< Data >, PtrColl >
 

Namespaces

 util
 Namespace for general, non-LArSoft-specific utilities.
 
 util::details
 

Functions

template<typename Coll >
auto util::makePointerVector (Coll &coll)
 Creates a STL vector with pointers to data from another collection. More...
 
template<typename Coll , typename PtrColl >
void util::MoveFromPointers (Coll &dest, PtrColl &src)
 Moves the content from a collection of pointers to one of data. More...
 
template<typename Coll , typename Sorter >
void util::SortByPointers (Coll &coll, Sorter sorter)
 Applies sorting indirectly, minimizing data copy. More...
 
template<typename Coll , typename PtrColl >
void util::details::moveFromPointersImplBase (Coll &dest, PtrColl &src)
 

Detailed Description

Silly utility to sort vectors indirectly.

Author
Gianluca Petrillo (petri.nosp@m.llo@.nosp@m.fnal..nosp@m.gov)
Date
September 28, 2017

This library is header-only.

Definition in file SortByPointers.h.