Population index.
More...
#include <populations.hpp>
Population index.
For each population, contains indexes of the lines that belong to it.
◆ PopIndex() [1/2]
PopIndex::PopIndex |
( |
const int * |
arr, |
|
|
const size_t & |
N |
|
) |
| |
Array constructor.
The input array has an element for each line, and the value of that element is the population ID in the form of an int that is base-1 (i.e., if line N is in the first population, then arr[N] == 1
).
- Parameters
-
[in] | arr | array of population IDs |
[in] | N | array length |
◆ PopIndex() [2/2]
PopIndex::PopIndex |
( |
const string & |
inFileName | ) |
|
File read constructor.
The input file has an entry for each line (separated by white space), and the value of that entry is the population ID in the form of an int that is base-1 (i.e., if line N is in the first population, then arr[N] == 1
).
- Parameters
-
[in] | inFileName | input file name |
◆ operator[]() [1/2]
vector<size_t>& sampFiles::PopIndex::operator[] |
( |
const size_t & |
i | ) |
|
|
inline |
Vector subscript operator.
Returns the index of population i.
- Parameters
-
- Returns
- index of line IDs
◆ operator[]() [2/2]
const vector<size_t>& sampFiles::PopIndex::operator[] |
( |
const size_t & |
i | ) |
const |
|
inline |
const
vector subscript operator
Returns the index of population i.
- Parameters
-
- Returns
- index of line IDs
◆ popNumber() [1/2]
size_t sampFiles::PopIndex::popNumber |
( |
| ) |
|
|
inline |
Number of populations.
- Returns
- number of populations
◆ popNumber() [2/2]
size_t sampFiles::PopIndex::popNumber |
( |
| ) |
const |
|
inline |
const
number of populations
- Returns
- number of populations
◆ popSize() [1/2]
size_t sampFiles::PopIndex::popSize |
( |
const size_t & |
i | ) |
|
|
inline |
Population size.
- Parameters
-
- Returns
- size of the _i_th population
◆ popSize() [2/2]
size_t sampFiles::PopIndex::popSize |
( |
const size_t & |
i | ) |
const |
|
inline |
const
population size
- Parameters
-
- Returns
- size of the _i_th population
◆ size() [1/2]
size_t sampFiles::PopIndex::size |
( |
| ) |
|
|
inline |
Total sample size.
- Returns
- total sample size
◆ size() [2/2]
size_t sampFiles::PopIndex::size |
( |
| ) |
const |
|
inline |
const
total sample size
- Returns
- total sample size
The documentation for this class was generated from the following files: