📄 sga.h
字号:
/*----------------------------------------------------------------------------*/
/* sga.h - global declarations for main(), all variable declared herein must */
/* also be defined as extern variables in external.h !!! */
/*----------------------------------------------------------------------------*/
#define LINELENGTH 80 /* width of printout */
#define BITS_PER_BYTE 8 /* number of bits per byte on this machine */
#define UINTSIZE (BITS_PER_BYTE*sizeof(unsigned)) /* # of bits in unsigned */
#include <stdio.h>
#include "classfile.h"
#include "GMM.h"
/* file pointers */
FILE *outfp, *infp;
/* Global structures and variables */
individual *oldpop; /* last generation of individuals */
individual *newpop; /* next generation of individuals */
//bestever bestfit; /* fittest individual so far */
individual bestfit; /* fittest individual so far */
individual baseline;
double sumfitness; /* summed fitness for entire population */
double max; /* maximum fitness of population */
double avg; /* average fitness of population */
double min; /* minumum fitness of population */
float pcross; /* probability of crossover */
float pmutation; /* probability of mutation */
int numfiles; /* number of open files */
int popsize; /* population size */
int lchrom; /* length of the chromosome per individual */
int chromsize; /* number of bytes needed to store lchrom string */
int gen; /* current generation number */
int maxgen; /* maximum generation number */
int run; /* current run number */
int maxruns; /* maximum number of runs to make */
int printstrings = 1; /* flag to print chromosome strings (default on) */
int nmutation; /* number of mutations */
int ncross; /* number of crossovers */
/* Application-dependent declarations go after here... */
//--------------------------------------------------------------
// Custom variables definition
int iCorpora; // population of the corpora : 250
CGMM *Target = 0 , *World = 0 ; // instance of the GMM
float **Cparam = 0 ; // buffer for claiment's and impostor's parameters
float **Iparam = 0 ; // [file][frame][vector]
int iCFiles = 0 ; // total files of the claimant
int iIFiles = 0 ; // total files of the impostor
int nCSamples = 0 ; // total frames in the data set of target speaker
int nISamples = 0 ; // total frames in the data set of impostor
int nValues = 0 ; // Valid dimension of the vector, should = lchrom
float *CScore = 0 ; // for objfunc() use
float *IScore = 0 ;
float *Ffa = 0 ; // for objfunc() use
float *Ffr = 0 ;
char target[10] = "";
char rootdir[100] = "";;
double **CTProbBuffer = 0; // claiment param, target model
double **CWProbBuffer = 0; // claiment param, world model
double **ITProbBuffer = 0; // impostor param, target model
double **IWProbBuffer = 0; // impostor param, world model
bool bflag = 0; // if 0, use buffer score (1 mixture case)
int nBitPerUnit = 2; // Bits per Unit
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -