diff --git a/modules/seq/base/src/hmm.cc b/modules/seq/base/src/hmm.cc index ef0ab66ca200ca733f39894e88252c028f7d69b6..b009f61a05d9e417703b2f848a80cb5462f8db0e 100644 --- a/modules/seq/base/src/hmm.cc +++ b/modules/seq/base/src/hmm.cc @@ -8,7 +8,7 @@ namespace ost { namespace seq{ -int HMMColumn::GetIndex(char olc) const { +int HMMColumn::GetIndex(char olc){ if (olc == 'A') return 0; if (olc >= 'C' && olc <= 'I') return (olc-'A') - 1; if (olc >= 'K' && olc <= 'N') return (olc-'A') - 2; @@ -61,7 +61,7 @@ Real HMMColumn::GetEntropy() const { } Real HMMColumn::GetFreq(char ch) const{ - int idx = this->GetIndex(ch); + int idx = HMMColumn::GetIndex(ch); if(idx == -1){ throw std::runtime_error("Invalid One Letter Code observed when getting frequency in HMMColumn!"); } @@ -69,7 +69,7 @@ Real HMMColumn::GetFreq(char ch) const{ } void HMMColumn::SetFreq(char ch, Real freq){ - int idx = this->GetIndex(ch); + int idx = HMMColumn::GetIndex(ch); if(idx == -1){ throw std::runtime_error("Invalid One Letter Code observed when setting frequency in HMMColumn!"); } diff --git a/modules/seq/base/src/hmm.hh b/modules/seq/base/src/hmm.hh index 5fc755797df853378f4a5aa1bbf790e5c9d77d31..408dc5bc6734e02a58d45576c0ffb32cdb0e3d98 100644 --- a/modules/seq/base/src/hmm.hh +++ b/modules/seq/base/src/hmm.hh @@ -78,6 +78,7 @@ class HMMColumn { char GetOneLetterCode() const { return olc_; } void SetOneLetterCode(char olc) { olc_ = olc; } Real GetEntropy() const; + static int GetIndex(char ch); static HMMColumn BLOSUMNullModel(); @@ -167,7 +168,6 @@ class HMMColumn { } private: - int GetIndex(char ch) const; char olc_; Real freq_[20]; Real trans_[3][3];