9 #ifndef ThePEG_algorithm_H 10 #define ThePEG_algorithm_H 19 #include "ThePEG/Config/ThePEG.h" 28 template <
typename Iterator>
47 template <
typename Container>
50 return std::make_pair(c.begin(), c.end());
55 template <
typename Container>
58 return std::make_pair(c.begin(), c.end());
63 template <
typename Container>
66 return std::make_pair(c.rbegin(), c.rend());
71 template <
typename Container>
74 return std::make_pair(c.rbegin(), c.rend());
78 template <
typename Iterator,
typename FNC>
84 template <
typename Iterator,
typename T>
90 template <
typename Iterator,
typename Pred>
96 template <
typename Iterator,
typename T>
102 template <
typename Cont,
typename FNC>
108 template <
typename Cont,
typename FNC>
114 template <
typename Cont,
typename Type>
115 inline typename Cont::iterator
find(Cont & c,
const Type & t) {
120 template <
typename Cont,
typename Type>
121 inline typename Cont::const_iterator
find(
const Cont & c,
const Type & t) {
126 template <
typename Cont,
typename Pred>
127 inline typename Cont::iterator
find_if(Cont & c,
const Pred & p) {
132 template <
typename Cont,
typename Pred>
133 inline typename Cont::const_iterator
find_if(
const Cont & c,
const Pred & p) {
138 template <
typename Cont,
typename T>
139 inline void replace(Cont & c,
const T & oval,
const T & nval) {
146 #ifndef ThePEG_TEMPLATES_IN_CC_FILE IteratorRange< typename Container::reverse_iterator > rrange(Container &c)
Return an IteratorRange of reverse iterators corresponding to the whole container.
void replace(IteratorRange< Iterator > r, const T &oval, const T &nval)
The std::replace function taking an IteratorRange as argument.
FNC for_each(IteratorRange< Iterator > r, FNC f)
The std::for_each function taking an IteratorRange as argument.
This is the main namespace within which all identifiers in ThePEG are declared.
Iterator find_if(IteratorRange< Iterator > r, Pred p)
The std::find_if function taking an IteratorRange as argument.
std::pair< Iterator, Iterator > BaseType
The underlying representation.
IteratorRange(const IteratorRange &ir)
Copy constructor.
Iterator find(IteratorRange< Iterator > r, const T &t)
The std::find function taking an IteratorRange as argument.
IteratorRange< typename Container::iterator > range(Container &c)
Return an IteratorRange corresponding to the whole container.
Cont::const_iterator find(const Cont &c, const Type &t)
The std::find function taking a whole const container as argument.
Cont::const_iterator find_if(const Cont &c, const Pred &p)
The std::find_if function taking a whole const container as argument.
IteratorRange(const BaseType &ir)
Constructor taking the underlying pair representation as argument.
IteratorRange()
Default constructor.
FNC for_each(const Cont &c, FNC f)
The std::for_each function taking a whole const container as argument.
void replace(Cont &c, const T &oval, const T &nval)
The std::replace function taking a whole container as argument.
A pair of iterators to be used in specialized algorithms instead of the standard first, last construction.