Victor
 All Data Structures Functions Variables Friends Pages
JensenShannon.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 __JensenShannon_H__
19 #define __JensenShannon_H__
20 
21 #include <Profile.h>
22 #include <ScoringFunction.h>
23 
24 namespace Victor { namespace Align2{
25 
37  class JensenShannon : public ScoringFunction {
38  public:
39 
40  // CONSTRUCTORS:
41 
43  JensenShannon(Profile *pro1, Profile *pro2);
44 
46  JensenShannon(const JensenShannon &orig);
47 
49  virtual ~JensenShannon();
50 
51 
52  // OPERATORS:
53 
56 
57 
58  // PREDICATES:
59 
61  virtual double scoringSeq(int i, int j);
62 
63 
64  // MODIFIERS:
65 
67  virtual void copy(const JensenShannon &orig);
68 
70  virtual JensenShannon* newCopy();
71 
72 
73  protected:
74 
75 
76  private:
77 
78  // ATTRIBUTES:
79 
80  Profile *pro1;
81  Profile *pro2;
82  double p1[20];
83  double p2[20];
84 
85  };
86 
87 }} // namespace
88 
89 #endif
Calculate a frequency profile or PSSM.
Definition: Profile.h:35
Calculate scores for profile to profile alignment using Jensen-Shannon method.
Definition: JensenShannon.h:37
virtual ~JensenShannon()
Destructor.
Definition: JensenShannon.cc:60
JensenShannon & operator=(const JensenShannon &orig)
Assignment operator.
Definition: JensenShannon.cc:71
virtual double scoringSeq(int i, int j)
Calculate scores to create matrix values.
Definition: JensenShannon.cc:87
virtual void copy(const JensenShannon &orig)
Copy orig object to this object ("deep copy").
Definition: JensenShannon.cc:125
virtual JensenShannon * newCopy()
Construct a new "deep copy" of this object.
Definition: JensenShannon.cc:147
Base class for scoring functions.
Definition: ScoringFunction.h:31
JensenShannon(Profile *pro1, Profile *pro2)
Default constructor.
Definition: JensenShannon.cc:39