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

pmm_leaf.h

00001 /* seqpp/pmm_leaf.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 
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



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


Generated on Wed Mar 23 09:25:57 2005 for seqpp by doxygen 1.3.9.1