7 #include "io_lib_header.h"
8 #include "util_lib_header.h"
9 #include "define_header.h"
10 #include "dp_lib_header.h"
14 int evaluate_est_order (Sequence *S, char *concat, Constraint_list *CL, int ktuple)
17 static char *alphabet;
18 int *hasched_seq, *hasched_seq1, *hasched_seq2;
19 int *lu_seq, *lu_seq1, *lu_seq2;
20 int pos_ktup1, pos_ktup2;
25 if ( !alphabet)alphabet=get_alphabet ( concat, alphabet);
26 n_ktup=(int)pow ( (double)alphabet[0]+1, (double)ktuple);
28 hasch_seq (concat,&hasched_seq, &lu_seq,ktuple, alphabet);
29 hasched_seq1=hasched_seq2=hasched_seq;
30 lu_seq1=lu_seq2=lu_seq;
34 for ( a=1; a< n_ktup; a++)
45 score+=abs ((int)(pos_ktup1-pos_ktup2));
46 pos_ktup2=hasched_seq2[pos_ktup2];
49 pos_ktup1=hasched_seq1[pos_ktup1];
53 score=(score/(double)(n_dots*strlen(concat)))*100000;
61 /******************************COPYRIGHT NOTICE*******************************/
62 /*© Centro de Regulacio Genomica */
65 /*Fri Feb 18 08:27:45 CET 2011 - Revision 596. */
66 /*All rights reserved.*/
67 /*This file is part of T-COFFEE.*/
69 /* T-COFFEE is free software; you can redistribute it and/or modify*/
70 /* it under the terms of the GNU General Public License as published by*/
71 /* the Free Software Foundation; either version 2 of the License, or*/
72 /* (at your option) any later version.*/
74 /* T-COFFEE is distributed in the hope that it will be useful,*/
75 /* but WITHOUT ANY WARRANTY; without even the implied warranty of*/
76 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the*/
77 /* GNU General Public License for more details.*/
79 /* You should have received a copy of the GNU General Public License*/
80 /* along with Foobar; if not, write to the Free Software*/
81 /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA*/
82 /*............................................... |*/
83 /* If you need some more information*/
84 /* cedric.notredame@europe.com*/
85 /*............................................... |*/
89 /******************************COPYRIGHT NOTICE*******************************/