Random permutation, persistent filter iterator. More...
#include <ppfilter_iterator.hpp>
Public Types | |
typedef base_t::element_iterator | element_iterator |
Public Member Functions | |
ppfilter_iterator (Predicate f, ElementIterator first, ElementIterator last) | |
Constructor. | |
template<class OtherElementIterator > | |
ppfilter_iterator (ppfilter_iterator< Predicate, OtherElementIterator > const &r, typename boost::enable_if_convertible< OtherElementIterator, ElementIterator >::type *=0) | |
Allows conversion from a ppfilter_iterator to a const ppfilter_iterator, won't allow conversion from a const ppfilter_iterator to a ppfilter_iterator. More... | |
ppfilter_iterator< Predicate, ElementIterator > | begin () const |
Returns a ppfilter_iterator pointing to the begining of the range. | |
ppfilter_iterator< Predicate, ElementIterator > | end () const |
Returns a ppfilter_iterator pointing to the end of the range. | |
upstream_iterator::index_t | index () const |
Returns the index of the element that the iterator is currently pointing to. | |
Predicate | predicate () const |
Returns the persistent_filter_iterator predicate. | |
Friends | |
class | boost::iterator_core_access |
Random permutation, persistent filter iterator.
This class pipes a random_permutation_iterator() (upstream) with a persistent_filter_iterator (downstream). It is intended to be used with is_picked_systematic. Systematic sampling of a random permutation achieves probability sampling.
ElementIterator
should model Random Access Iterator.
Definition at line 21 of file ppfilter_iterator.hpp.
|
inline |
Allows conversion from a ppfilter_iterator to a const ppfilter_iterator, won't allow conversion from a const ppfilter_iterator to a ppfilter_iterator.
By “const ppfilter_iterator”, we mean that the ElementIterator
is const, e.g. std::vector<Particle>::const_iterator
.
Definition at line 99 of file ppfilter_iterator.hpp.