#include <genesis/population/window/region_window_iterator.hpp>
Iterator for Windows representing regions of a genome.
This class allows to iterate a set of regions, each in a window.
The template parameters are:
ForwardIterator
: The underlying data iterator.InputType
: The input data type that the basis iterator provided (that is, the input iterator from which the region window takes its data),DataType
: The data type of the Window::Data that is stored in Window::Entry. The functor entry_input_function
needs to be provided to convert from InputType
to this DataType
.The three functors
have to be set prior to the iteration. All other settings are option and/or defaulted to reasonable values.
The class streams through both the input data and the region list in a single pass. This makes it algorithmically complex, but is a good compromise between the memory footprint needed for storing data of multiple windows at the same time and processing speed for only having to read the input once.
Definition at line 84 of file region_window_iterator.hpp.
Public Member Functions | |
RegionWindowIterator (ForwardIterator begin, ForwardIterator end) | |
RegionWindowIterator (RegionWindowIterator &&)=default | |
RegionWindowIterator (RegionWindowIterator const &)=default | |
~RegionWindowIterator ()=default | |
RegionWindowIterator & | operator= (RegionWindowIterator &&)=default |
RegionWindowIterator & | operator= (RegionWindowIterator const &)=default |
Public Types | |
using | const_reference = value_type const & |
using | Entry = typename Window::Entry |
using | iterator_category = std::input_iterator_tag |
using | reference = value_type & |
using | self_type = RegionWindowIterator< ForwardIterator, InputType, DataType > |
using | settings_type = RegionWindowIteratorSettings< InputType, DataType > |
using | value_type = Window |
using | Window = ::genesis::population::Window< DataType > |
Public Attributes | |
std::function< std::string(InputType const &)> | chromosome_function |
Functor that yields the current chromosome, given the input iterator data. More... | |
std::function< DataType(InputType const &)> | entry_input_function |
Functor to convert from the underlying input iterator that provides the data for the region window to the data that is stored per window. More... | |
std::function< size_t(InputType const &)> | position_function |
Functor that yields the current position on the chromosome, given the input iterator data. More... | |
Classes | |
class | Iterator |
Internal iterator over the data. More... | |
|
inline |
Definition at line 409 of file region_window_iterator.hpp.
|
default |
|
default |
|
default |
|
default |
|
default |
using const_reference = value_type const& |
Definition at line 102 of file region_window_iterator.hpp.
using Entry = typename Window::Entry |
Definition at line 96 of file region_window_iterator.hpp.
using iterator_category = std::input_iterator_tag |
Definition at line 106 of file region_window_iterator.hpp.
using reference = value_type& |
Definition at line 101 of file region_window_iterator.hpp.
using self_type = RegionWindowIterator<ForwardIterator, InputType, DataType> |
Definition at line 99 of file region_window_iterator.hpp.
using settings_type = RegionWindowIteratorSettings<InputType, DataType> |
Definition at line 98 of file region_window_iterator.hpp.
using value_type = Window |
Definition at line 100 of file region_window_iterator.hpp.
using Window = ::genesis::population::Window<DataType> |
Definition at line 95 of file region_window_iterator.hpp.
std::function<std::string( InputType const& )> chromosome_function |
Functor that yields the current chromosome, given the input iterator data.
Definition at line 439 of file region_window_iterator.hpp.
std::function<DataType( InputType const& )> entry_input_function |
Functor to convert from the underlying input iterator that provides the data for the region window to the data that is stored per window.
Definition at line 434 of file region_window_iterator.hpp.
std::function<size_t( InputType const& )> position_function |
Functor that yields the current position on the chromosome, given the input iterator data.
Definition at line 445 of file region_window_iterator.hpp.