Sample SNPs
Fast ordered sampling of rows from large text or binary files. Special cases for DNA variant files (.bed, VCF, HapMap, etc).
|
Go to the documentation of this file.
30 #ifndef populations_hpp
31 #define populations_hpp
51 vector< vector<size_t> > _popInd;
68 PopIndex(
const int *arr,
const size_t &N);
86 vector<size_t> &
operator[] (
const size_t &i) {
return _popInd[i]; };
94 const vector<size_t> &
operator[] (
const size_t &i)
const {
return _popInd[i]; };
101 size_t popSize(
const size_t &i) {
return _popInd[i].size(); };
107 size_t popSize(
const size_t &i)
const {
return _popInd[i].size(); };
118 size_t size()
const {
return _N; };
size_t popNumber() const
const number of populations
Definition: populations.hpp:129
size_t popSize(const size_t &i) const
const population size
Definition: populations.hpp:107
size_t popSize(const size_t &i)
Population size.
Definition: populations.hpp:101
size_t popNumber()
Number of populations.
Definition: populations.hpp:124
PopIndex()
Default constructor.
Definition: populations.hpp:60
size_t size()
Total sample size.
Definition: populations.hpp:113
size_t size() const
const total sample size
Definition: populations.hpp:118
vector< size_t > & operator[](const size_t &i)
Vector subscript operator.
Definition: populations.hpp:86
Population index.
Definition: populations.hpp:44