A library for working with phylogenetic and population genetic data.
v0.27.0
filter_iterator.hpp File Reference
#include "genesis/utils/containers/range.hpp"
#include <cstddef>
#include <iterator>
#include <type_traits>

Go to the source code of this file.

Classes

class  FilterIterator< PredicateFunctor, BaseIterator >
 Iterator class that allows to filter an underlying iterator by skipping elements that do not satisfy a given predicate. More...
 

Namespaces

 genesis
 Container namespace for all symbols of genesis in order to keep them separate when used as a library.
 
 genesis::utils
 

Functions

template<typename PredicateFunctor , typename BaseIterator >
FilterIterator< PredicateFunctor, BaseIterator > make_filter_iterator (PredicateFunctor unary_func, BaseIterator begin, BaseIterator end=BaseIterator{})
 Construct a filtering iterator, given the filter predicate function as well as the underlying base iterator begin and end. More...
 
template<typename PredicateFunctor , typename BaseIterator >
Range< FilterIterator< PredicateFunctor, BaseIterator > > make_filter_range (PredicateFunctor unary_func, BaseIterator begin, BaseIterator end)
 Construct a filtering range, given the filter predicate function as well as the underlying base iterator begin and end. More...
 
template<typename PredicateFunctor , typename Container >
Range< FilterIterator< PredicateFunctor, typename Container::iterator > > make_filter_range (PredicateFunctor unary_func, Container &container)
 Construct a filtering range, given the filter predicate function as well as a container, whose begin() and end() iterators are used, respectively. More...
 
template<typename PredicateFunctor , typename Container >
Range< FilterIterator< PredicateFunctor, typename Container::const_iterator > > make_filter_range (PredicateFunctor unary_func, Container const &container)
 Construct a filtering range, given the filter predicate function as well as a const container, whose begin() and end() iterators are used, respectively. More...