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

gprune_common.c File Reference

Calculate probability of a set of Gaussian densities by Gaussian pruning: common functions. More...

#include <sent/stddefs.h>
#include <sent/htk_hmm.h>
#include <sent/htk_param.h>
#include <sent/hmm.h>
#include <sent/gprune.h>
#include "globalvars.h"

Include dependency graph for gprune_common.c:

Go to the source code of this file.

Functions

static int find_insert_point (LOGPROB score, int len)
int cache_push (int id, LOGPROB score, int len)
 Store a score to the current list of computed Gaussians.


Detailed Description

Calculate probability of a set of Gaussian densities by Gaussian pruning: common functions.

Author:
Akinobu LEE
Date:
Fri Feb 18 18:10:58 2005
This file contains functions concerning codebook level cache manipulation, commonly used for the Gaussian pruning functions.

Revision
1.1.1.1

Definition in file gprune_common.c.


Function Documentation

static int find_insert_point LOGPROB  score,
int  len
[static]
 

Find where the new value should be inserted to the OP_cacled_score, already sorted by score, using binary search.

Parameters:
score [in] the new score to be inserted
len [in] length of data in OP_calced_score
Returns:
the insertion point.

Definition at line 48 of file gprune_common.c.

Referenced by cache_push().

int cache_push int  id,
LOGPROB  score,
int  len
 

Store a score to the current list of computed Gaussians.

Store the calculated score of a Gaussian to OP_calced_score, with its corresponding mixture id to OP_calced_id.

The OP_calced_score and OP_calced_id always holds the (OP_gprune_num)-best scores and ids. If the number of stored Gaussian from start has reached OP_gprune_num and the given score is below the bottom, it will be dropped. Else, the new score will be inserted and the bottom will be dropped from the list.

The OP_calced_score will always kept sorted by the scores.

Parameters:
id [in] mixture id of the Gaussian to store
score [in] score of the Gaussian to store
len [in] current number of stored scores in OP_calced_score
Returns:
the resulting number of stored scores in OP_calced_score.

Definition at line 87 of file gprune_common.c.

Referenced by gprune_beam(), gprune_heu(), and gprune_safe().


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