A library for working with phylogenetic data.
v0.25.0
Window< D, A >::Entry Struct Reference

#include <genesis/population/window/window.hpp>

Detailed Description

template<class D, class A = EmptyAccumulator>
struct genesis::population::Window< D, A >::Entry

Data that is stored per entry that was enqueued in a window.

This is the data that the per-window computation is based on. We store the actual user-provided D/Data type, as well as its position in the genome (as for example given by the POS column in a VCF file), and the index within the current chromosome - that is, the how many'th Entry this data point is in the list of enqueued data (starting from zero for each chromosome).

Definition at line 127 of file window.hpp.

Public Member Functions

 Entry (size_t index, size_t position, Data &&data)
 Contructor that takes data by r-value reference; preferred if possible to use. More...
 
 Entry (size_t index, size_t position, Data const &data)
 Contructor that takes data by reference. More...
 
 operator Data & ()
 Implicit conversion to Data& type. More...
 
 operator Data const & () const
 Implicit conversion to Data const& type. More...
 

Public Attributes

Data data
 Data stored in the Window for this entry. More...
 
size_t index
 Index of the entry, that is, how many other entries have there been in total. More...
 
size_t position
 Genomic position of the entry along a chromosome. More...
 

Constructor & Destructor Documentation

◆ Entry() [1/2]

Entry ( size_t  index,
size_t  position,
Data const &  data 
)
inline

Contructor that takes data by reference.

Definition at line 132 of file window.hpp.

◆ Entry() [2/2]

Entry ( size_t  index,
size_t  position,
Data &&  data 
)
inline

Contructor that takes data by r-value reference; preferred if possible to use.

Definition at line 141 of file window.hpp.

Member Function Documentation

◆ operator Data &()

operator Data & ( )
inline

Implicit conversion to Data& type.

Useful to plug in a Window into some function expecting a range of Data objects.

Definition at line 152 of file window.hpp.

◆ operator Data const &()

operator Data const & ( ) const
inline

Implicit conversion to Data const& type.

Useful to plug in a Window into some function expecting a range of Data objects.

Definition at line 163 of file window.hpp.

Member Data Documentation

◆ data

Data data

Data stored in the Window for this entry.

Definition at line 184 of file window.hpp.

◆ index

size_t index

Index of the entry, that is, how many other entries have there been in total.

Definition at line 171 of file window.hpp.

◆ position

size_t position

Genomic position of the entry along a chromosome.

For the actual chromosome, we need to call Window::chromosome(), because for storage and speed reasons, we do not store the chromosome name with every entry.

Definition at line 179 of file window.hpp.


The documentation for this struct was generated from the following file: