Victor
 All Data Structures Functions Variables Friends Pages
EDistance.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 __EDistance_H__
19 #define __EDistance_H__
20 
21 #include <Profile.h>
22 #include <ScoringFunction.h>
23 
24 namespace Victor { namespace Align2{
25 
32  class EDistance : public ScoringFunction {
33  public:
34 
35  // CONSTRUCTORS:
36 
38  EDistance(Profile *pro1, Profile *pro2);
39 
41  EDistance(Profile *pro1, Profile *pro2, double offset);
42 
44  EDistance(const EDistance &orig);
45 
47  virtual ~EDistance();
48 
49 
50  // OPERATORS:
51 
53  EDistance& operator =(const EDistance &orig);
54 
55 
56  // PREDICATES:
57 
59  virtual double scoringSeq(int i, int j);
60 
62  virtual double getOffset();
63 
64 
65  // MODIFIERS:
66 
68  virtual void copy(const EDistance &orig);
69 
71  virtual EDistance* newCopy();
72 
74  virtual void setOffset(double off);
75 
76 
77  protected:
78 
79 
80  private:
81 
82  // ATTRIBUTES:
83 
84  Profile *pro1;
85  Profile *pro2;
86  double offset;
87 
88  };
89 
90  // -----------------------------------------------------------------------------
91  // EDistance
92  // -----------------------------------------------------------------------------
93 
94  // PREDICATES:
95 
96  inline double
98  return offset;
99  }
100 
101 
102  // MODIFIERS:
103 
104  inline void
105  EDistance::setOffset(double off) {
106  offset = off;
107  }
108 
109 }} // namespace
110 
111 #endif
Calculate a frequency profile or PSSM.
Definition: Profile.h:35
EDistance(Profile *pro1, Profile *pro2)
Default constructor.
Definition: EDistance.cc:34
virtual void copy(const EDistance &orig)
Copy orig object to this object ("deep copy").
Definition: EDistance.cc:105
virtual ~EDistance()
Destructor.
Definition: EDistance.cc:54
virtual void setOffset(double off)
Set offset.
Definition: EDistance.h:105
EDistance & operator=(const EDistance &orig)
Assignment operator.
Definition: EDistance.cc:65
Calculate scores for profile to profile alignment using euclidean distance.
Definition: EDistance.h:32
virtual double scoringSeq(int i, int j)
Calculate scores to create matrix values.
Definition: EDistance.cc:81
Base class for scoring functions.
Definition: ScoringFunction.h:31
virtual EDistance * newCopy()
Construct a new "deep copy" of this object.
Definition: EDistance.cc:116
virtual double getOffset()
Return offset.
Definition: EDistance.h:97