bpp-phyl  2.2.0
L95.h
Go to the documentation of this file.
1 //
2 // File: L95.h
3 // Created by: Laurent Guéguen
4 // Created on: lundi 18 octobre 2010, à 22h 21
5 //
6 
7 /*
8 Copyright or © or Copr. Bio++ Development Team, (November 16, 2004)
9 
10 This software is a computer program whose purpose is to provide classes
11 for phylogenetic data analysis.
12 
13 This software is governed by the CeCILL license under French law and
14 abiding by the rules of distribution of free software. You can use,
15 modify and/ or redistribute the software under the terms of the CeCILL
16 license as circulated by CEA, CNRS and INRIA at the following URL
17 "http://www.cecill.info".
18 
19 As a counterpart to the access to the source code and rights to copy,
20 modify and redistribute granted by the license, users are provided only
21 with a limited warranty and the software's author, the holder of the
22 economic rights, and the successive licensors have only limited
23 liability.
24 
25 In this respect, the user's attention is drawn to the risks associated
26 with loading, using, modifying and/or developing or reproducing the
27 software by the user in light of its specific status of free software,
28 that may mean that it is complicated to manipulate, and that also
29 therefore means that it is reserved for developers and experienced
30 professionals having in-depth computer knowledge. Users are therefore
31 encouraged to load and test the software's suitability as regards their
32 requirements in conditions enabling the security of their systems and/or
33 data to be ensured and, more generally, to use and operate it in the
34 same conditions as regards security.
35 
36 The fact that you are presently reading this means that you have had
37 knowledge of the CeCILL license and that you accept its terms.
38 */
39 
40 #ifndef _L95_H_
41 #define _L95_H_
42 
44 #include "../AbstractSubstitutionModel.h"
45 
46 #include <Bpp/Numeric/Constraints.h>
47 
48 // From bpp-seq:
49 #include <Bpp/Seq/Alphabet/NucleicAlphabet.h>
50 
51 namespace bpp
52 {
53 
93 class L95:
94  public virtual NucleotideSubstitutionModel,
96 {
97 private:
99 
100 public:
101  L95(
102  const NucleicAlphabet* alphabet,
103  double alpha = 0.5,
104  double beta = 0.5,
105  double gamma = 0.5,
106  double kappa = 1.,
107  double theta = 0.5);
108 
109  virtual ~L95() {}
110 
111 #ifndef NO_VIRTUAL_COV
112  L95*
113 #else
114  Clonable*
115 #endif
116  clone() const { return new L95(*this); }
117 
118 public:
119  std::string getName() const { return "L95"; }
120 
121  void updateMatrices();
122 
126  void setFreq(std::map<int, double>&);
127 };
128 
129 } //end of namespace bpp.
130 
131 #endif //_L95_H_
132 
void setFreq(std::map< int, double > &)
This method is redefined to actualize the corresponding parameters theta too.
Definition: L95.cpp:111
double beta_
Definition: L95.h:98
The no-strand bias substitution model for nucleotides, from Lobry 1995. The point of this model is th...
Definition: L95.h:93
L95(const NucleicAlphabet *alphabet, double alpha=0.5, double beta=0.5, double gamma=0.5, double kappa=1., double theta=0.5)
Definition: L95.cpp:56
void updateMatrices()
Diagonalize the matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVe...
Definition: L95.cpp:74
L95 * clone() const
Definition: L95.h:116
std::string getName() const
Get the name of the model.
Definition: L95.h:119
Partial implementation of the SubstitutionModel interface.
double kappa_
Definition: L95.h:98
double alpha_
Definition: L95.h:98
Specialisation interface for nucleotide substitution model.
virtual ~L95()
Definition: L95.h:109
double gamma_
Definition: L95.h:98
double theta_
Definition: L95.h:98