Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

addlog.c File Reference

Rapid addition of log values. More...

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

Include dependency graph for addlog.c:

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)
LOGPROB addlog_array (LOGPROB *a, int n)

Variables

static LOGPROB tbl [TBLSIZE]
 Table of $\log (1+e^x)$.


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 40 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 66 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 98 of file addlog.c.

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


Generated on Tue Mar 28 16:03:22 2006 for Julius by  doxygen 1.4.2