From 5153f051ab9c3ea51185c3c13757c1b8a4928c44 Mon Sep 17 00:00:00 2001
From: Gabriel Studer <gabriel.studer@unibas.ch>
Date: Mon, 30 Nov 2015 09:22:06 +0100
Subject: [PATCH] make the GetIndex function of the HMMColumn publicly
 available

---
 modules/seq/base/src/hmm.cc | 6 +++---
 modules/seq/base/src/hmm.hh | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/seq/base/src/hmm.cc b/modules/seq/base/src/hmm.cc
index ef0ab66ca..b009f61a0 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 5fc755797..408dc5bc6 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];
-- 
GitLab