TRF Language Model
trf-def.cpp File Reference
#include "trf-def.h"

Go to the source code of this file.

Namespaces

 trf
 

Functions

int trf::omp_rand (int thread_num)
 
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)
 
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...