Victor
 All Data Structures Functions Variables Friends Pages
ScoringFunction.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 __ScoringFunction_H__
19 #define __ScoringFunction_H__
20 
21 #include <math.h>
22 #include <string>
23 
24 namespace Victor { namespace Align2{
25 
32  public:
33 
34  // CONSTRUCTORS:
35 
37 
39  }
40 
42 
44  copy(orig);
45  }
46 
48 
49  virtual ~ScoringFunction() {
50  }
51 
52 
53  // OPERATORS:
54 
57 
58 
59  // PREDICATES:
60 
62  virtual double scoringSeq(int i, int j) = 0;
63 
64 
65  // MODIFIERS:
66 
68  virtual void copy(const ScoringFunction &orig);
69 
71  virtual ScoringFunction* newCopy() = 0;
72 
73 
74  protected:
75 
76 
77  private:
78 
79  };
80 
81  // -----------------------------------------------------------------------------
82  // ScoringFunction
83  // -----------------------------------------------------------------------------
84 
85  // OPERATORS:
86 
87  inline ScoringFunction&
89  if (&orig != this)
90  copy(orig);
91  POSTCOND((orig == *this), exception);
92  return *this;
93  }
94 
95 
96  // MODIFIERS:
97 
98  inline void
100  }
101 
102 }} // namespace
103 
104 #endif
virtual void copy(const ScoringFunction &orig)
Copy orig object to this object ("deep copy").
Definition: ScoringFunction.h:99
ScoringFunction & operator=(const ScoringFunction &orig)
Assignment operator.
Definition: ScoringFunction.h:88
virtual double scoringSeq(int i, int j)=0
Calculate scores to create matrix values.
virtual ~ScoringFunction()
Destructor.
Definition: ScoringFunction.h:49
virtual ScoringFunction * newCopy()=0
Construct a new "deep copy" of this object.
ScoringFunction()
Default constructor.
Definition: ScoringFunction.h:38
Base class for scoring functions.
Definition: ScoringFunction.h:31
ScoringFunction(const ScoringFunction &orig)
Copy constructor.
Definition: ScoringFunction.h:43