A library for working with phylogenetic and population genetic data.
v0.27.0
transform_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  TransformIterator< TransformFunctor, BaseIterator >
 Iterator class that allows to transform an underlying iterator by applying a function to each element before dereferencing. 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 TransformFunctor , typename BaseIterator >
TransformIterator< TransformFunctor, BaseIterator > make_transform_iterator (TransformFunctor unary_func, BaseIterator iterator)
 Construct a transforming iterator, given the underlying base iterator and the transformation function. More...
 
template<typename TransformFunctor , typename BaseIterator >
Range< TransformIterator< TransformFunctor, BaseIterator > > make_transform_range (TransformFunctor unary_func, BaseIterator begin, BaseIterator end)
 Construct a transforming range, given the transformation function as well as the underlying base iterator begin and end. More...
 
template<typename TransformFunctor , typename Container >
Range< TransformIterator< TransformFunctor, typename Container::iterator > > make_transform_range (TransformFunctor unary_func, Container &container)
 Construct a transforming range, given the transformation function as well as a container, whose begin() and end() iterators are used, respectively. More...
 
template<typename TransformFunctor , typename Container >
Range< TransformIterator< TransformFunctor, typename Container::const_iterator > > make_transform_range (TransformFunctor unary_func, Container const &container)
 Construct a transforming range, given the transformation function as well as a const container, whose begin() and end() iterators are used, respectively. More...