TRF Language Model
trf-def.h File Reference
#include "wb-system.h"
#include <omp.h>

Go to the source code of this file.

Namespaces

 trf
 

Typedefs

typedef double trf::PValue
 
typedef double trf::LogP
 
typedef double trf::Prob
 

Functions

Prob trf::LogP2Prob (LogP x)
 
LogP trf::Prob2LogP (Prob x)
 
LogP trf::Log_Sum (LogP x, LogP y)
 
LogP trf::Log_Sub (LogP x, LogP y)
 log[exp(x)-exp(y)] More...
 
LogP trf::Log_Sum (LogP *p, int num)
 log summate all the values in array More...
 
LogP trf::LogLineNormalize (LogP *pdProbs, int nNum)
 
int trf::LogLineSampling (const LogP *pdProbs, int nNum)
 
void trf::LineNormalize (Prob *pdProbs, int nNum)
 
int trf::LineSampling (const Prob *pdProbs, int nNum)
 
bool trf::Acceptable (Prob prob)
 
void trf::RandomPos (int *a, int len, int n)
 
int trf::omp_rand (int thread_num)
 
double trf::dRand (double dmin, double dmax)
 get a random float between dmin and dmax More...
 
int trf::omp_nrand (int nMin, int nMax)
 get a random integer int [nMin, nMax-1] More...
 
void trf::EasySmooth (Prob *p, int num, Prob threshold=1e-5)
 smooth a distribution More...
 
double trf::GetAISFactor (int t, int T)
 Get the AIS intermediate factor beta_t. More...
 
double trf::SigmFunc (double x)
 calculate the sigmoid function f(x) = 1/(1+exp(-x)) More...
 

Variables

const float trf::INF = 1e20
 
const float trf::LogP_zero = -INF