Version 4.1.5
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, const vector<double>& prior = vector<double>() ) ;
00058 
00062   void setLaw(double* counts, const vector<double>& prior = vector<double>() ) ;
00063 
00066   void setLaw() ;
00067 
00072   inline void setLaw(const vector<double> & proba){ _law = proba ; } ;
00078   inline void setLaw(const short next,const double proba) { _law[next]=proba ;};
00082   inline double tellLaw(const short next) { return _law[next] ; } ;
00086   bool isLeaf() { return true ; } ;
00087 
00088   #ifdef HAVE_LIBXML2
00089   virtual void save_r( const Translator & trans, 
00090                        const vector< vector<short> > & synonymous,
00091                        const vector< vector<short> > & list,  
00092                        xmlNodePtr , 
00093                        map< node_base*, status_node > & catalog, 
00094                        int & current_id, int level );
00095   #endif
00096   
00097   virtual void pmm_to_matrix_r( double* mat, 
00098                                 const vector< vector<short> > & synonymous, 
00099                                 const vector< vector<short> > & list,                           
00100                                 short extended_phase, 
00101                                 vector< long > & vect_code,                             
00102                                 long bound );
00103 
00104 
00105  protected:
00106   vector<double> _law ; 
00107 
00108 } ;
00109 
00110 
00111 
00112 
00113 #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