segModel.h

Go to the documentation of this file.
00001 /**********************************************************************//***********************************************************************/
00012 /*#define BIGNUM 1.0e100*/
00013 #define segGetTVal(t,s,e) ((double)(t)-0.5*(double)((e)-(s)))
00014 
00016 typedef struct segTrajectoryParam {
00017   char     *id;            
00018   double   *mean;          
00019   double   *slope;         
00020   double   *var;           
00021   double   *recVar;        
00022   double   *logVar;        
00023   double    logVarSum;     
00024   double   *rMean;         
00025   double   *rSlope;        
00026   double   *rVar;          
00027   double    slopeOcc;      
00028   long      occ;           
00029   short     vecSize;       
00030   short     targetVecSize; 
00031 } SEG_TRJ;
00032 
00034 typedef struct segDurationParam {
00035   char     *id;            
00036   double   *durP;          
00037   double   *logDurP;       
00038   double   *rDurP;         
00039   long     *rFreq;         
00040   long      rSkip;         
00041   short     numDur;        
00042 } SEG_DUR;
00043 
00045 typedef struct segMappingParam {
00046   char     *id;            
00047   double  **forward;       
00048   double  **inverse;       
00049   short     vecSize;       
00050   short     targetVecSize; 
00051 } SEG_MAP;
00052 
00054 typedef struct segStateInfo {
00055   char     *id;            
00056   char     *trjModelId;    
00057   char     *durModelId;    
00058   char     *mappingId;     
00059   SEG_TRJ  *trjModel;      
00060   SEG_DUR  *durModel;      
00061   SEG_MAP  *mapping;       
00062   long      stateNo;       
00063 } SEG_STATE;
00064 
00066 typedef struct segTransProb {
00067   char     *id;            
00068   double  **trProb;        
00069   double  **logTrProb;     
00070   long    **rTrProb;       
00071   short     numStates;     
00072 } SEG_TRPROB;
00073 
00075 typedef struct segModelParam {
00076   char       **stateId;       
00077   char        *trProbId;      
00078   SEG_STATE   *state;         
00079   SEG_TRPROB  *transProb;     
00080   short        numStates;     
00081   char         flagTiedMap;   
00082 } SEG_MDPARAM;
00083 
00085 typedef struct segModel {
00086   char        *lab;           
00087   SEG_MDPARAM  *modelDef;      
00088 } SEG_MODEL;
00089 
00091 typedef struct segModelSet {
00092   short        vecSize;       
00093   short        targetVecSize; 
00094   long         numPModels;    
00095   SEG_MODEL   *pModel;        
00096   long         numLModels;    
00097   SEG_MODEL   *lModel;        
00098   long         numTrProbs;    
00099   SEG_TRPROB **transProb;     
00100   long         numStates;     
00101   SEG_STATE   *state;         
00102   long         numTrjModels;  
00103   SEG_TRJ    **trjModel;      
00104   long         numDurModels;  
00105   SEG_DUR    **durModel;      
00106   long         numMappings;   
00107   SEG_MAP    **mapping;       
00108 } SEG_MODEL_SET;
00109 
00110 /* prototype declaration */
00111 int            segMakeStrictLRTopology(SEG_MODEL_SET *modelSet);
00112 int            segCheckModelSet(SEG_MODEL_SET *modelSet);
00113 SEG_MODEL_SET *segReadModelSet(char *modelList, char *tiedList, int maxDur);
00114 int            segWriteModelSet(SEG_MODEL_SET *modelSet, FILE *fp);
00115 int            segWriteDump(SEG_MODEL_SET *modelSet, char *fName);
00116 #if 0
00117 double         MLComputeSegProbs(SEG_STATEO*, double**, int, int, double**, int, int, double*);
00118 #endif
00119 

Generated on Sun Aug 5 02:40:39 2007 for SEGRec Version 1.0 by  doxygen 1.5.1