Version 4.1.5
Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

pmm_node.h

00001 /* seqpp/pmm_node.h
00002  *
00003  * Copyright (C) 2003 Laboratoire Statistique & Génome
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or (at
00008  * your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful, but
00011  * WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
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     //cout<<"pmm_node destroy"<<endl;
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



Download seq++ 4.1.5
Download previous versions
Statistique & Genome Home


Generated on Thu Aug 4 18:34:04 2005 for seqpp by doxygen 1.3.9.1