Victor
 All Data Structures Functions Variables Friends Pages
ScoringScheme.h
1 /* This file is part of Victor.
2 
3  Victor is free software: you can redistribute it and/or modify
4  it under the terms of the GNU General Public License as published by
5  the Free Software Foundation, either version 3 of the License, or
6  (at your option) any later version.
7 
8  Victor is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with Victor. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 
18 #ifndef __ScoringScheme_H__
19 #define __ScoringScheme_H__
20 
21 #include <AlignmentData.h>
22 #include <Structure.h>
23 #include <SubMatrix.h>
24 #include <math.h>
25 #include <string>
26 
27 namespace Victor { namespace Align2{
28 
34  class ScoringScheme {
35  public:
36 
37  // CONSTRUCTORS:
38 
41 
43  ScoringScheme(const ScoringScheme &orig);
44 
46  virtual ~ScoringScheme();
47 
48 
49  // OPERATORS:
50 
53 
54 
55  // PREDICATES:
56 
58  virtual double scoring(int i, int j) = 0;
59 
61  virtual bool checkSequence(const string &s) const;
62 
63 
64  // MODIFIERS:
65 
67  virtual void copy(const ScoringScheme &orig);
68 
70  virtual ScoringScheme* newCopy() = 0;
71 
73  virtual void reverse();
74 
75 
76  // ATTRIBUTES:
77 
81 
82 
83  protected:
84 
85 
86  private:
87 
88  };
89 
90 }} // namespace
91 
92 #endif
ScoringScheme & operator=(const ScoringScheme &orig)
Assignment operator.
Definition: ScoringScheme.cc:61
Implement a standard substitution matrix.
Definition: SubMatrix.h:30
Structure * str
Pointer to Structure.
Definition: ScoringScheme.h:80
virtual ~ScoringScheme()
Destructor.
Definition: ScoringScheme.cc:50
Base class for printing alignments.
Definition: AlignmentData.h:35
virtual void reverse()
Reverse template components (sequence and/or profile).
Definition: ScoringScheme.cc:112
virtual ScoringScheme * newCopy()=0
Construct a new "deep copy" of this object.
SubMatrix * sub
Substitution matrix.
Definition: ScoringScheme.h:78
Base class for structural scores.
Definition: Structure.h:32
virtual double scoring(int i, int j)=0
Calculate scores to create matrix values.
AlignmentData * ad
Pointer to AlignmentData.
Definition: ScoringScheme.h:79
virtual bool checkSequence(const string &s) const
Check if s consists only of characters defined in sub.getResidues.
Definition: ScoringScheme.cc:76
ScoringScheme(SubMatrix *sub, AlignmentData *ad, Structure *str)
Default constructor.
Definition: ScoringScheme.cc:34
Base class for scoring schemes.
Definition: ScoringScheme.h:34
virtual void copy(const ScoringScheme &orig)
Copy orig object to this object ("deep copy").
Definition: ScoringScheme.cc:105