~ubuntu-branches/ubuntu/saucy/libbpp-phyl/saucy

« back to all changes in this revision

Viewing changes to src/Bpp/Phyl/Model/HKY85.cpp

  • Committer: Package Import Robot
  • Author(s): Julien Dutheil
  • Date: 2013-02-09 16:00:00 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130209160000-5v65ba68z8032nzj
Tags: 2.0.3-1
* Reorganized model hierarchy
* New pairwise models
* Several bugs fixed

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
//
6
6
 
7
7
/*
8
 
Copyright or © or Copr. CNRS, (November 16, 2004)
 
8
Copyright or © or Copr. Bio++ Development Team, (November 16, 2004)
9
9
 
10
10
This software is a computer program whose purpose is to provide classes
11
11
for phylogenetic data analysis.
38
38
*/
39
39
 
40
40
#include "HKY85.h"
 
41
#include "FrequenciesSet.h"
41
42
 
42
43
#include <Bpp/Numeric/Matrix/MatrixTools.h>
43
44
 
60
61
        double piC,
61
62
        double piG,
62
63
        double piT):
63
 
        AbstractReversibleSubstitutionModel(alpha, "HKY85."),
 
64
  AbstractParameterAliasable("HKY85."),
 
65
  AbstractSubstitutionModel(alpha, "HKY85."),
 
66
  AbstractReversibleSubstitutionModel(alpha, "HKY85."),
64
67
  kappa_(kappa), k1_(), k2_(), r_(),
65
68
  piA_(piA), piC_(piC), piG_(piG), piT_(piT), piY_(), piR_(),
66
69
  theta_(piG + piC), theta1_(piA / (1. - theta_)), theta2_(piG / theta_),
68
71
{
69
72
        Parameter kappaP("HKY85.kappa", kappa, &Parameter::R_PLUS_STAR);
70
73
        addParameter_(kappaP);
71
 
        Parameter thetaP("HKY85.theta" , theta_, new IncludingInterval(0.001, 0.999), true);
 
74
        Parameter thetaP("HKY85.theta" , theta_, &FrequenciesSet::FREQUENCE_CONSTRAINT);
72
75
        addParameter_(thetaP);
73
 
        Parameter theta1P("HKY85.theta1", theta1_, new IncludingInterval(0.001, 0.999), true);
 
76
        Parameter theta1P("HKY85.theta1", theta1_, &FrequenciesSet::FREQUENCE_CONSTRAINT);
74
77
        addParameter_(theta1P);
75
 
        Parameter theta2P("HKY85.theta2", theta2_, new IncludingInterval(0.001, 0.999), true);
 
78
        Parameter theta2P("HKY85.theta2", theta2_, &FrequenciesSet::FREQUENCE_CONSTRAINT);
76
79
        addParameter_(theta2P);
77
80
        updateMatrices();
78
81
}