[go: up one dir, main page]

Menu

[r2341]: / trunk / ghmm / ghmm / pviterbi.h  Maximize  Restore  History

Download this file

86 lines (70 with data), 2.9 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*******************************************************************************
*
* This file is part of the General Hidden Markov Model Library,
* GHMM version __VERSION__, see http://ghmm.org
*
* Filename: ghmm/ghmm/viterbi.h
* Authors: Bernhard Knab, Benjamin Georgi
*
* Copyright (C) 1998-2004 Alexander Schliep
* Copyright (C) 1998-2001 ZAIK/ZPR, Universitaet zu Koeln
* Copyright (C) 2002-2004 Max-Planck-Institut fuer Molekulare Genetik,
* Berlin
*
* Contact: schliep@ghmm.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
* This file is version $Revision$
* from $Date$
* last change by $Author$.
*
*******************************************************************************/
#ifndef GHMM_PVITERBI_H
#define GHMM_PVITERBI_H
#ifdef __cplusplus
extern "C" {
#endif
#include "pmodel.h"
#include "psequence.h"
/**@name Viterbi-Algorithmus */
/*@{ (Doc++-Group: viterbi) */
/**
Viterbi algorithm. Calculates the Viterbi path (the optimal path trough
the model) and the Viterbi probability to a given model and given
sequences.
*/
int *ghmm_dpmodel_viterbi(ghmm_dpmodel *mo, ghmm_dpseq * X, ghmm_dpseq * Y,
double *log_p, int *path_length);
int *ghmm_dpmodel_viterbi_variable_tb(ghmm_dpmodel *mo, ghmm_dpseq * X,
ghmm_dpseq * Y, double *log_p,
int *path_length,
int start_traceback_with);
int *ghmm_dpmodel_viterbi_test(ghmm_dpmodel *mo, ghmm_dpseq * X, ghmm_dpseq * Y,
double *log_p, int *path_length);
/**
Calculates the logarithmic probability to a given path through the
states (does not have to be the Viterbi path), given sequences and
a model.
*/
double ghmm_dpmodel_viterbi_logp(ghmm_dpmodel *mo, ghmm_dpseq * X,
ghmm_dpseq * Y,
int *state_seq, int state_seq_len);
#ifdef __cplusplus
}
#endif
#endif
/*@} (Doc++-Group: viterbi) */