bpp-seq3  3.0.0
BLOSUM50.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #ifndef BPP_SEQ_ALPHABETINDEX_BLOSUM50_H
6 #define BPP_SEQ_ALPHABETINDEX_BLOSUM50_H
7 
8 
9 // from the STL:
10 #include <string>
11 
12 #include "AlphabetIndex2.h"
13 #include "../Alphabet/AlphabetExceptions.h"
14 #include <Bpp/Exceptions.h>
16 
17 namespace bpp
18 {
29 class BLOSUM50 :
31 {
32 private:
34 
35 public:
36  BLOSUM50();
37 
38  BLOSUM50(const BLOSUM50& blosum) :
39  ProteicAlphabetIndex2(blosum),
41  {}
42 
43  BLOSUM50& operator=(const BLOSUM50& blosum)
44  {
47  return *this;
48  }
49 
50  BLOSUM50* clone() const override { return new BLOSUM50(); }
51 
52  virtual ~BLOSUM50() {}
53 
54 public:
60  double getIndex(int state1, int state2) const override;
61  double getIndex(const std::string& state1, const std::string& state2) const override;
62  const Matrix<double>& getIndexMatrix() const override;
63  bool isSymmetric() const override { return true; }
65 };
66 } // end of namespace bpp.
67 #endif // BPP_SEQ_ALPHABETINDEX_BLOSUM50_H
BLOSUM 50 Substitution Matrix.
Definition: BLOSUM50.h:31
virtual ~BLOSUM50()
Definition: BLOSUM50.h:52
double getIndex(int state1, int state2) const override
Get the index associated to a pair of states.
Definition: BLOSUM50.cpp:21
BLOSUM50 * clone() const override
Definition: BLOSUM50.h:50
const Matrix< double > & getIndexMatrix() const override
Definition: BLOSUM50.cpp:31
BLOSUM50(const BLOSUM50 &blosum)
Definition: BLOSUM50.h:38
BLOSUM50 & operator=(const BLOSUM50 &blosum)
Definition: BLOSUM50.h:43
LinearMatrix< double > distanceMatrix_
Definition: BLOSUM50.h:33
bool isSymmetric() const override
Definition: BLOSUM50.h:63
Virtual AlphabetIndex2 for proteic alphabet.
ProteicAlphabetIndex2 & operator=(const ProteicAlphabetIndex2 &pt)
This alphabet is used to deal NumericAlphabet.