libsent/src/phmm/addlog.c File Reference

Rapid addition of log values. More...

#include <sent/stddefs.h>
#include <sent/hmm.h>

Go to the source code of this file.

Defines

#define TBLSIZE   500000
 Table size (precision depends on this).
#define VRANGE   15
 Must be larger than -LOG_ADDMIN.
#define TMAG   33333.3333
 TBLSIZE / VRANGE.

Functions

void make_log_tbl ()
 Generate a value tables of $\log (1+e^x)$.
LOGPROB addlog (LOGPROB x, LOGPROB y)
 Rapid computation of $\log (e^x + e^y)$.
LOGPROB addlog_array (LOGPROB *a, int n)
 Rapid computation of $\log (\sum_{i=1}^N e^{x_i})$.

Variables

static LOGPROB tbl [TBLSIZE]
 Table of $\log (1+e^x)$.
static boolean built_tbl = FALSE
 TRUE after tbl has built.


Detailed Description

Rapid addition of log values.

Author:
Akinobu LEE
Date:
Thu Feb 17 13:23:50 2005
Revision
1.1.1.1

Definition in file addlog.c.


Function Documentation

void make_log_tbl (  ) 

Generate a value tables of $\log (1+e^x)$.

$x$ is from 0 to (- VRANGE), and table size is TBLSIZE.

Definition at line 42 of file addlog.c.

Referenced by outprob_init().

LOGPROB addlog ( LOGPROB  x,
LOGPROB  y 
)

Rapid computation of $\log (e^x + e^y)$.

If value differs more than LOG_ADDMIN, the larger value will be returned as is.

Parameters:
x [in] log value
y [in] log value
Returns:
result value.

Definition at line 71 of file addlog.c.

LOGPROB addlog_array ( LOGPROB a,
int  n 
)

Rapid computation of $\log (\sum_{i=1}^N e^{x_i})$.

Parameters:
a [in] array of log values
n [in] length of above
Returns:
the result value.

Definition at line 103 of file addlog.c.

Referenced by calc_mix(), calc_tied_mix(), and gmm_calc_mix().


Generated on Tue Dec 18 16:01:40 2007 for Julius by  doxygen 1.5.4