11 double Dij(
const polymorphicSite & p,
const std::vector< unsigned > & config,
const unsigned & i,
const unsigned & j)
15 unsigned start1 = accumulate(config.begin(),config.begin()+i,0u),
16 start2 = accumulate(config.begin(),config.begin()+j,0u);
17 for(
unsigned x = start1 ; x < start1 + config[i] ; ++x )
19 for(
unsigned y = start2 ; y < start2 + config[j] ; ++y)
21 char ch1 = char(std::toupper(p.second[x])),ch2=char(std::toupper(p.second[y]));
22 if(ch1 !=
'N' && ch2 !=
'N')
24 rv += (ch1 != ch2) ? 1u : 0u;
32 return double(rv)/(double(config[i]+config[j]-N));
35 double Gmin(
const polySiteVector & ,
const std::vector< unsigned > & )
37 throw std::runtime_error(
"not implemented yet");
38 unsigned mdxy = numeric_limits<unsigned>::max();
The namespace in which this library resides.
std::vector< polymorphicSite > polySiteVector
Site-major variation tables in ASCII format.
Declaration of Sequence::SimData, a class representing polymorphism data from coalescent simulations ...
std::pair< double, std::string > polymorphicSite