|
bpp-phyl
2.1.0
|
00001 // 00002 // File: LLG08_EHO.h 00003 // Created by: Laurent Gueguen 00004 // Created on: jeudi 7 octobre 2010, à 21h 47 00005 // 00006 00007 /* 00008 Copyright or © or Copr. CNRS, (November 16, 2004) 00009 00010 This software is a computer program whose purpose is to provide classes 00011 for phylogenetic data analysis. 00012 00013 This software is governed by the CeCILL license under French law and 00014 abiding by the rules of distribution of free software. You can use, 00015 modify and/ or redistribute the software under the terms of the CeCILL 00016 license as circulated by CEA, CNRS and INRIA at the following URL 00017 "http://www.cecill.info". 00018 00019 As a counterpart to the access to the source code and rights to copy, 00020 modify and redistribute granted by the license, users are provided only 00021 with a limited warranty and the software's author, the holder of the 00022 economic rights, and the successive licensors have only limited 00023 liability. 00024 00025 In this respect, the user's attention is drawn to the risks associated 00026 with loading, using, modifying and/or developing or reproducing the 00027 software by the user in light of its specific status of free software, 00028 that may mean that it is complicated to manipulate, and that also 00029 therefore means that it is reserved for developers and experienced 00030 professionals having in-depth computer knowledge. Users are therefore 00031 encouraged to load and test the software's suitability as regards their 00032 requirements in conditions enabling the security of their systems and/or 00033 data to be ensured and, more generally, to use and operate it in the 00034 same conditions as regards security. 00035 00036 The fact that you are presently reading this means that you have had 00037 knowledge of the CeCILL license and that you accept its terms. 00038 */ 00039 00040 #ifndef _LLG08_EHO_H_ 00041 #define _LLG08_EHO_H_ 00042 00043 #include "../MixtureOfSubstitutionModels.h" 00044 #include "ProteinSubstitutionModel.h" 00045 #include "../AbstractSubstitutionModel.h" 00046 #include "../AbstractBiblioMixedSubstitutionModel.h" 00047 00048 using namespace std; 00049 00050 namespace bpp 00051 { 00078 class LLG08_EHO : 00079 public AbstractBiblioMixedSubstitutionModel 00080 { 00081 public: 00082 class EmbeddedModel : 00083 public virtual ProteinSubstitutionModel, 00084 public AbstractReversibleSubstitutionModel 00085 { 00086 private: 00087 double proportion_; 00088 string name_; 00089 00090 public: 00091 EmbeddedModel(const ProteicAlphabet* alpha, string name); 00092 ~EmbeddedModel(){} 00093 EmbeddedModel* clone() const { return new EmbeddedModel(*this); } 00094 string getName() const { return name_;} 00095 double getProportion() const { return proportion_;} 00096 }; 00097 00098 private: 00099 auto_ptr<MixtureOfSubstitutionModels> pmixmodel_; 00100 00101 public: 00109 LLG08_EHO(const ProteicAlphabet* alpha); 00110 00111 ~LLG08_EHO(); 00112 00113 LLG08_EHO* clone() const { return new LLG08_EHO(*this); } 00114 00115 LLG08_EHO(const LLG08_EHO&); 00116 00117 LLG08_EHO& operator=(const LLG08_EHO&); 00118 00119 const SubstitutionModel& getModel() const { return *pmixmodel_.get(); } 00120 00121 const MixedSubstitutionModel& getMixedModel() const { return *pmixmodel_.get(); } 00122 00123 std::string getName() const { return "LLG08_EHO"; } 00124 00125 private: 00126 SubstitutionModel& getModel() { return *pmixmodel_.get(); } 00127 00128 MixedSubstitutionModel& getMixedModel() { return *pmixmodel_.get(); } 00129 00130 }; 00131 } // end of namespace bpp. 00132 00133 #endif // _LLG08_EHO_H_ 00134