LocARNA-1.9.2
|
00001 #ifndef LOCARNA_STRAL_SCORE_HH 00002 #define LOCARNA_STRAL_SCORE_HH 00003 00004 #ifdef HAVE_CONFIG_H 00005 #include <config.h> 00006 #endif 00007 00008 #include <math.h> 00009 00010 #include "aux.hh" 00011 #include "sequence.hh" 00012 00013 namespace LocARNA { 00014 00015 template <class T> 00016 class Matrix; 00017 template <class T> 00018 class Alphabet; 00019 class RnaData; 00020 00022 class StralScore { 00023 typedef std::vector<double> p_vec_t; 00024 00025 Sequence seqA; 00026 Sequence seqB; 00027 00028 p_vec_t p_upA; 00029 p_vec_t p_downA; 00030 p_vec_t p_unA; 00031 00032 p_vec_t p_upB; 00033 p_vec_t p_downB; 00034 p_vec_t p_unB; 00035 00036 const Matrix<double> &sim_mat; 00037 const Alphabet<char> &alphabet; 00038 double pf_struct_weight; 00039 double gap_opening; 00040 double gap_extension; 00041 00042 private: 00043 void 00044 init_prob_vecs(const RnaData &rna, 00045 p_vec_t &p_up, 00046 p_vec_t &p_down, 00047 p_vec_t &p_un); 00048 00049 public: 00061 StralScore(const RnaData &rnaA, 00062 const RnaData &rnaB, 00063 const Matrix<double> &sim_mat_, 00064 const Alphabet<char> &alphabet_, 00065 double pf_struct_weight_, 00066 double gap_opening_, 00067 double gap_extension_); 00068 00085 double 00086 sigma(size_type i, size_type j) const; 00087 00093 double 00094 alpha() const { 00095 return gap_opening; 00096 } 00097 00103 double 00104 beta() const { 00105 return gap_extension; 00106 } 00107 00111 void 00112 reverse(); 00113 }; 00114 } 00115 00116 #endif // LOCARNA_STRAL_SCORE_HH