Skip to content

Commit

Permalink
just some const correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
cjustin authored and cjustin committed Sep 21, 2022
1 parent 6946e0b commit a5b2f1e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/FingerPrint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 89,7 @@ class FingerPrint {
/*
* Prints header for summary info
*/
void printHeader(){
void printHeader() const{
string outStr = "";
outStr = "#@TK\t";
outStr = std::to_string(m_totalKmers);
Expand All @@ -99,26 99,26 @@ class FingerPrint {
cout << outStr;
}

void printCountsMax(){
void printCountsMax() const{
printHeader();
string outStr = "";
for (size_t i = 0; i < m_alleleIDs.size() ; i) {
outStr.clear();
const vector<uint64_t> &allele1 = *m_alleleIDToKmerRef[i];
const vector<uint64_t> &allele2 = *m_alleleIDToKmerVar[i];
const vector<uint64_t> &allele1 = *m_alleleIDToKmerRef.at(i);
const vector<uint64_t> &allele2 = *m_alleleIDToKmerVar.at(i);
unsigned maxCountREF = 0;
unsigned maxCountVAR = 0;
unsigned countSumAT = 0;
unsigned countSumCG = 0;
for(size_t j = 0; j < allele1.size() ; j) {
unsigned freqAlle = m_counts[allele1.at(j)];
unsigned freqAlle = m_counts.at(allele1.at(j));
if(maxCountREF < freqAlle){
maxCountREF = freqAlle;
}
countSumAT = freqAlle;
}
for(size_t j = 0; j < allele2.size() ; j) {
unsigned freqAlle = m_counts[allele2.at(j)];
unsigned freqAlle = m_counts.at(allele2.at(j));
if(maxCountVAR < freqAlle){
maxCountVAR = freqAlle;
}
Expand All @@ -140,7 140,6 @@ class FingerPrint {
outStr = "\n";
cout << outStr;
}

}

string printInfoSummary(){
Expand Down

0 comments on commit a5b2f1e

Please sign in to comment.