00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00027 #ifndef SEQPP_PMM_LEAF_H
00028 #define SEQPP_PMM_LEAF_H
00029
00030 #include <seqpp/node_base.h>
00031 #include <map>
00032 #include <config.h>
00033 #ifdef HAVE_LIBXML2
00034 #include <libxml/tree.h>
00035 #endif
00036
00037
00044 class pmm_leaf : public node_base {
00045 public:
00047 pmm_leaf(short alphabet_size, node_base * father,
00048 int motif) ;
00049
00051 virtual ~pmm_leaf(){
00052 };
00053
00057 void setLaw(vector<long> & counts, double prior = 0) ;
00058
00061 void setLaw() ;
00062
00067 inline void setLaw(const vector<double> & proba){ _law = proba ; } ;
00073 inline void setLaw(const short next,const double proba) { _law[next]=proba ;};
00077 inline double tellLaw(const short next) { return _law[next] ; } ;
00081 bool isLeaf() { return true ; } ;
00082
00083 #ifdef HAVE_LIBXML2
00084 virtual void save_r( const Translator & trans,
00085 const vector< vector<short> > & synonymous,
00086 const vector< vector<short> > & list,
00087 xmlNodePtr ,
00088 map< node_base*, status_node > & catalog,
00089 int & current_id, int level );
00090 #endif
00091
00092 virtual void pmm_to_matrix_r( double* mat,
00093 const vector< vector<short> > & synonymous,
00094 const vector< vector<short> > & list,
00095 short extended_phase,
00096 vector< long > & vect_code,
00097 long bound );
00098
00099
00100 protected:
00101 vector<double> _law ;
00102
00103 } ;
00104
00105
00106
00107
00108 #endif