tools/calculateDiversity.cpp
//Simple function just for debugging allele frequencies:
Simple function just for debugging allele frequencies.
Simple function just for debugging allele frequencies .
string join_freqs(array<double, NUM_BASES> &allele_freqs) {
   string output = "";
   if (allele_freqs.size() == NUM_BASES) {
      if (NUM_BASES > 0) {
         output += to_string(allele_freqs[0]);
         for (unsigned long i = 1; i < NUM_BASES; i++) {
            output += "," + to_string(allele_freqs[i]);
         }
      }
   }
   return output;
}
string join_freqs ( array < double , NUM_BASES > & allele_freqs ) { string output = " " ; if ( allele_freqs . size ( ) == NUM_BASES ) { if ( NUM_BASES > 0 ) { output += to_string ( allele_freqs [ 0 ] ) ; for ( unsigned long i = 1 ; i < NUM_BASES ; i ++ ) { output += " " + to_string ( allele_freqs [ i ] ) ; } } } return output ; }
Simple function just for debugging allele frequencies:
Simple function just for debugging allele frequencies :