Victor
 All Data Structures Functions Variables Friends Pages
VGPFunction2.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 __VGPFunction2_H__
19 #define __VGPFunction2_H__
20 
21 #include <Alignment.h>
22 #include <GapFunction.h>
23 #include <math.h>
24 #include <string>
25 #include <vector>
26 
27 namespace Victor { namespace Align2{
28 
42  class VGPFunction2 : public GapFunction {
43  public:
44 
45  // CONSTRUCTORS:
46 
48  VGPFunction2(string secFileName);
49 
51  VGPFunction2(string secFileName, double o, double e, unsigned int extType,
52  double wH, double wS);
53 
55  VGPFunction2(const VGPFunction2 &orig);
56 
58  virtual ~VGPFunction2();
59 
60 
61  // OPERATORS:
62 
64  VGPFunction2& operator =(const VGPFunction2 &orig);
65 
66 
67  // PREDICATES:
68 
70  virtual double getOpenPenalty(int p);
71 
73  virtual double getExtensionPenalty(int p);
74 
75 
76  // MODIFIERS:
77 
79  virtual void copy(const VGPFunction2 &orig);
80 
82  virtual VGPFunction2* newCopy();
83 
85  virtual void setOpenPenalty(double pen);
86 
88  virtual void setExtensionPenalty(double pen);
89 
90 
91  // HELPERS:
92 
94  void pExtractSecInfo(string secFileName);
95 
96 
97  protected:
98 
99 
100  private:
101 
102  // ATTRIBUTES:
103 
104  double o;
105  double e;
106  unsigned int extType;
107  unsigned int extCounter;
108  vector<double> hContent;
109  vector<double> sContent;
110  double wH;
111  double wS;
112 
113  };
114 
115  // -----------------------------------------------------------------------------
116  // VGPFunction
117  // -----------------------------------------------------------------------------
118 
119  // MODIFIERS:
120 
121  inline void
123  o = pen;
124  }
125 
126  inline void
128  e = pen;
129  }
130 
131 }} // namespace
132 
133 #endif
virtual ~VGPFunction2()
Destructor.
Definition: VGPFunction2.cc:62
virtual void copy(const VGPFunction2 &orig)
Copy orig object to this object ("deep copy").
Definition: VGPFunction2.cc:122
Base class for gap functions.
Definition: GapFunction.h:31
virtual VGPFunction2 * newCopy()
Construct a new "deep copy" of this object.
Definition: VGPFunction2.cc:144
virtual double getExtensionPenalty(int p)
Return extension gap penalty for template position p.
Definition: VGPFunction2.cc:101
virtual double getOpenPenalty(int p)
Return open gap penalty for template position p.
Definition: VGPFunction2.cc:88
Implement VGP (Variable Gap Penalty) function.
Definition: VGPFunction2.h:42
void pExtractSecInfo(string secFileName)
Extract structural infos from template secondary structure.
Definition: VGPFunction2.cc:156
VGPFunction2 & operator=(const VGPFunction2 &orig)
Assignment operator.
Definition: VGPFunction2.cc:73
virtual void setExtensionPenalty(double pen)
Set extension gap penalty.
Definition: VGPFunction2.h:127
virtual void setOpenPenalty(double pen)
Set open gap penalty.
Definition: VGPFunction2.h:122
VGPFunction2(string secFileName)
Default constructor.
Definition: VGPFunction2.cc:39