00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00028 #ifndef SEQPP_PMM_NODE_H
00029 #define SEQPP_PMM_NODE_H
00030
00031 #include <map>
00032 #include <set>
00033 #include <seqpp/node_base.h>
00034
00035
00043 class pmm_node : public node_base {
00044 public:
00046 pmm_node(short alphabet_size,node_base * father,int motif) ;
00048 virtual ~pmm_node(){
00049
00050 };
00051
00057 void setSon(const vector<short> & part_motif, node_base * son) ;
00058
00060 void setSon( node_base * son) ;
00061
00067 inline void setSon(short index, node_base * son) {
00068 _sons[index] = son ;
00069 } ;
00070
00071
00073 inline node_base * tellSon(short index) {
00074 return (_sons[index]) ;
00075 } ;
00076
00078 vector<node_base *> & tellNonvisitedSons( );
00080 vector<node_base *> * getNonvisitedSons( );
00081
00083 vector<node_base *> & tellSons() {
00084 return (_sons) ;
00085 }
00087 short tell_sons_partition_nbelement() const{
00088 return _sons_partition_nbelement;
00089 }
00090 void set_sons_partition_nbelement( short x ){
00091 _sons_partition_nbelement = x;
00092 }
00093
00095 bool isLeaf() { return false ; } ;
00096
00097 #ifdef HAVE_LIBXML2
00098 virtual void save_r( const Translator & trans,
00099 const vector< vector<short> > & synonymous,
00100 const vector< vector<short> > & list,
00101 xmlNodePtr ,
00102 map< node_base*, status_node > & catalog,
00103 int & current_id, int level );
00104 #endif
00105
00106 virtual void pmm_to_matrix_r( double* mat,
00107 const vector< vector<short> > & synonymous,
00108 const vector< vector<short> > & list,
00109 short extended_size,
00110 vector< long > & vect_code,
00111 long bound );
00112
00113
00114 private:
00115 vector<node_base *> _sons ;
00116 vector<node_base *> _nonvisited_sons ;
00117 short _sons_partition_nbelement;
00118 };
00119 #endif