#include <genesis/population/filter/filter_stats.hpp>
Counts of how many entries with a particular Filter Tag occured in some data.
This wrapper around an array is a very simple solution to keep track of the number of entries (Variants or SampleCounts) that had each filter tag in some data. By simply creating a std::array
that has as many entries as we have filter tags, we have a slot for every tag. These can then be incremented while streaming through the data, and read and printed later.
This wrapper expects the template parameter to be an enum that has kPassed == 0
, and has kEnd
as its last value, to determine the end of the enum and indicate the full range of all values. See VariantFilterTag and SampleFilterTag for the two enums we use here.
Definition at line 61 of file filter_stats.hpp.
Public Member Functions | |
FilterStats () | |
FilterTagArray::iterator | begin () |
FilterTagArray::const_iterator | begin () const |
void | clear () |
FilterTagArray::iterator | end () |
FilterTagArray::const_iterator | end () const |
size_t & | operator[] (FilterTag tag) |
size_t | operator[] (FilterTag tag) const |
size_t & | operator[] (size_t index) |
size_t | operator[] (size_t index) const |
size_t | size () const |
size_t | sum () const |
size_t | sum_failing () const |
size_t | sum_non_passing () const |
Public Types | |
using | FilterTagArray = std::array< size_t, static_cast< size_t >(FilterTag::kEnd)> |
Public Attributes | |
FilterTagArray | data |
|
inline |
Definition at line 74 of file filter_stats.hpp.
|
inline |
Definition at line 116 of file filter_stats.hpp.
|
inline |
Definition at line 121 of file filter_stats.hpp.
|
inline |
Definition at line 175 of file filter_stats.hpp.
|
inline |
Definition at line 126 of file filter_stats.hpp.
|
inline |
Definition at line 131 of file filter_stats.hpp.
|
inline |
Definition at line 82 of file filter_stats.hpp.
|
inline |
Definition at line 91 of file filter_stats.hpp.
|
inline |
Definition at line 100 of file filter_stats.hpp.
|
inline |
Definition at line 108 of file filter_stats.hpp.
|
inline |
Definition at line 136 of file filter_stats.hpp.
|
inline |
Definition at line 145 of file filter_stats.hpp.
|
inline |
Definition at line 154 of file filter_stats.hpp.
|
inline |
Definition at line 170 of file filter_stats.hpp.
using FilterTagArray = std::array<size_t, static_cast<size_t>( FilterTag::kEnd )> |
Definition at line 67 of file filter_stats.hpp.
FilterTagArray data |
Definition at line 184 of file filter_stats.hpp.