Classes | Functions
tmat.h File Reference

Transition matrix data structure. More...

#include <stdio.h>
#include <s3types.h>
#include <logmath.h>

Go to the source code of this file.

Classes

struct  tmat_t
 Transition matrix data structure. All phone HMMs are assumed to have the same topology. More...
 

Functions

tmat_ttmat_init (const char *tmatfile, float64 tpfloor, int32 breport, logmath_t *logmath)
 
void tmat_dump (tmat_t *tmat, FILE *fp)
 
int32 tmat_chk_uppertri (tmat_t *tmat)
 
int32 tmat_chk_1skip (tmat_t *tmat)
 
void tmat_free (tmat_t *t)
 
void tmat_report (tmat_t *t)
 

Detailed Description

Transition matrix data structure.

Function Documentation

◆ tmat_chk_1skip()

int32 tmat_chk_1skip ( tmat_t tmat)

Checks that transition matrix arcs in the given object skip over at most 1 state.

Returns
0 if successful, -1 if check failed.
Parameters
tmatIn: transition matrix

◆ tmat_chk_uppertri()

int32 tmat_chk_uppertri ( tmat_t tmat)

Checks that no transition matrix in the given object contains backward arcs.

Returns
0 if successful, -1 if check failed.
Parameters
tmatIn: transition matrix

◆ tmat_dump()

void tmat_dump ( tmat_t tmat,
FILE *  fp 
)

Dumping the transition matrix for debugging

Parameters
tmatIn: transition matrix
fpIn: file pointer

◆ tmat_free()

void tmat_free ( tmat_t t)

RAH, add code to remove memory allocated by tmat_init

Parameters
tIn: transition matrix

◆ tmat_init()

tmat_t* tmat_init ( const char *  tmatfile,
float64  tpfloor,
int32  breport,
logmath_t *  logmath 
)

Initialize transition matrix

Parameters
tmatfileIn: input file
tpfloorIn: floor value for each non-zero transition probability
breportIn: whether reporting the process of tmat_t

◆ tmat_report()

void tmat_report ( tmat_t t)

Report the detail of the transition matrix structure.

Parameters
tIn: transition matrix