📄 train_model.h
字号:
// file: train_model.h//// this is the header for the train_model class//// make sure definitions are only made once//#ifndef __ISIP_TRAIN_MODEL#define __ISIP_TRAIN_MODEL// isip include files//#ifndef __ISIP_INTEGRAL#include <integral.h>#endif// forward class definitions//#ifndef __ISIP_TRAIN_STATE#include <train_state.h>#endif// Train_Model: a class that contains a Hidden Markov model//class Train_Model { //--------------------------------------------------------------------------- // // protected data // //---------------------------------------------------------------------------protected: // parameters related to the model // int_4 num_states_d; // number of states in the mod. float_4** trans_prob_d; // transition matrix Train_State** states_d; // states //--------------------------------------------------------------------------- // // public methods // //---------------------------------------------------------------------------public: // required methods // char_1* name_cc(); volatile void error_handler_cc(char_1* method_name, char_1* message); logical_1 debug_cc(FILE* fp, char_1* message); int_4 size_cc(); // destructors/constructors // ~Train_Model(); Train_Model(); Train_Model(int_4 num_states, float_4** trans_prob, Train_State** state); Train_Model(const Train_Model& model); // set methods // logical_1 set_num_states_cc(int_4 num_states); logical_1 set_transitions_cc(float_4** trans_prob); logical_1 set_states_cc(Train_State** state); // get methods // int_4 get_num_states_cc(); float_4** get_transitions_cc(); Train_State** get_states_cc(); // HMM methods // float_8 get_output_prob_cc(int_4 state, float_8* data, int_4 frame, int_4& max_mix); logical_1 get_next_states_cc(int_4 state_ind, int_4& num_trans, int_4*& trans_states, float_4*& trans_scores, int_4& trans_states_size); //--------------------------------------------------------------------------- // // private methods // //---------------------------------------------------------------------------private:};// end of file// #endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -