00001 /* 00002 00003 Copyright (C) 2003-2009 Kevin Thornton, krthornt[]@[]uci.edu 00004 00005 Remove the brackets to email me. 00006 00007 This file is part of libsequence. 00008 00009 libsequence is free software: you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation, either version 3 of the License, or 00012 (at your option) any later version. 00013 00014 libsequence is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 long with libsequence. If not, see <http://www.gnu.org/licenses/>. 00021 00022 */ 00023 00024 #ifndef __GRANTHAMWEIGHTS_H__ 00025 #define __GRANTHAMWEIGHTS_H__ 00026 00043 #include <Sequence/SeqEnums.hpp> 00044 #include <Sequence/WeightingSchemes.hpp> 00045 00046 namespace Sequence 00047 { 00048 class Grantham; 00049 class GranthamWeights2 : public WeightingScheme2 00050 { 00051 private: 00052 Sequence::GeneticCodes code; 00053 mutable double __weights[2];//logical const 00054 public: 00055 explicit GranthamWeights2(Sequence::GeneticCodes genetic_code = Sequence::UNIVERSAL); 00056 ~GranthamWeights2(void); 00057 void Calculate(const std::string &codon1, const std::string &codon2) const; 00058 double *weights(void) const; 00059 }; 00060 00061 class GranthamWeights3 : public WeightingScheme3 00062 { 00063 private: 00064 GeneticCodes code; 00065 mutable double __weights[6];//logical const 00066 public: 00067 explicit GranthamWeights3(Sequence::GeneticCodes genetic_code = Sequence::UNIVERSAL); 00068 ~GranthamWeights3(void); 00069 void Calculate(const std::string &codon1, const std::string &codon2) const; 00070 double *weights(void) const; 00071 }; 00072 } 00073 #endif
1.6.3