forked from stevemussmann/BayesAss3-SNPs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
indiv.cpp
89 lines (70 loc) · 1.13 KB
/
indiv.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#include "indiv.h"
Indiv::Indiv(int maxloci)
{
genotype.resize(maxloci);
for(int i=0; i<maxloci; i++){
genotype[i].resize(2);
}
}
Indiv::Indiv(const Indiv& orig)
{
}
Indiv::~Indiv()
{
}
void Indiv::setAllele(int l, int m, int allele)
{
genotype[l][m] = allele;
}
void Indiv::setSamplePopln(int currPoplnID)
{
samplePopln = currPoplnID;
}
void Indiv::setMigrantAge(unsigned int a)
{
migrantAge = a;
}
void Indiv::setMigrantPopln(unsigned int a)
{
migrantPopln = a;
}
void Indiv::setLogL(double l)
{
logL = l;
}
void Indiv::pushMissing(unsigned int j)
{
missingGenotypes.push_back(j);
}
int Indiv::getAllele(int l, int m)
{
return genotype[l][m];
}
int Indiv::getMissingGenotype(long unsigned int i)
{
return missingGenotypes.at(i);
}
unsigned int Indiv::getSamplePopln()
{
return samplePopln;
}
unsigned int Indiv::getMigrantPopln()
{
return migrantPopln;
}
unsigned int Indiv::getMigrantAge()
{
return migrantAge;
}
unsigned int Indiv::getMissingGenSize()
{
return missingGenotypes.size();
}
const std::vector<int>& Indiv::getMissingVector() const
{
return missingGenotypes;
}
double Indiv::getLogL()
{
return logL;
}