#ifndef NEWFEATBP_H #define NEWFEATBP_H #define vLINUX_INCLUDE //#define BINARY_SIGMOID_FUNCTION_INCLUDE // sigmoid function //#define nInputNeuron 100 // # of input neuron //#define nOutputNeuron 100 // # of output neuron #define varDefault 4 #define STRING_SIZE 128 // string size typedef struct { int epoch; double alpha; int nLayerHidden; int *nHiddenNeuron; int n_input; int selectModule; int nInputn; int nOutputn; char fnameInput[128]; char fnameTarget[128]; char outdirname[128]; char fnameWeight[128]; int nModel; } PARAMETERS; typedef struct { double *weight; double sum; double output; double delta; } NEURON; typedef struct { NEURON *neuron; } LAYER; /* // 20070816_JHKIM typedef struct { double *value; } DATA; */ typedef struct { double *inputNeuron; LAYER *hiddenLayer; LAYER outputLayer; double error; double Error; } NETWORK; typedef struct { int nMoem; int nJaem; } TJaemTarget; typedef struct{ double **mask; double *diff; } TEMPLATE; class CBackpro{ public: #ifdef USE_DSP CBackpro( unsigned char *nWegithFileName, unsigned char *nTargetFileName ); #else CBackpro( char *nWegithFileName, char *nTargetFileName ); #endif CBackpro(); ~CBackpro(); int nFeat; // 100 int nModel; // 5 PARAMETERS param; NETWORK *network; TEMPLATE rlt; int nFirstMin, nSecondMin; double nFirstMinResult, nSecondMinResult; void memAlloc(); void memFree(); void patternToInputNeuron( double *nInputData ); void networkOperation(); double sigmoid(double out); double diffSigmoid(double); #ifdef USE_DSP void loadWeight( unsigned char *WeightMemoryBuffer ); void loadTarget(unsigned char *TargetMemoryBuffer ); #else void loadWeight(); void loadTarget(); #endif void LoadTargetAndWeight( unsigned char *nWeightFileName, unsigned char *nTargetFileName ); void ReleaseNetwork(); void releaseTarget(); TJaemTarget templateMatching_global_eu_o_jaem(); TJaemTarget templateMatching_normal_jaem(); TJaemTarget templateMatching_rank_jaem(); TJaemTarget templateMatching_global_a_u_jaem(); TJaemTarget templateMatching_global_jaem(); int templateMatching_jiyuk(); int templateMatching_rank_jiyuk(); int templateMatching_sp_jiyuk(); int templateMatching_lnumber(); int templateMatching_rank_lnumber(); int templateMatching_sp_number(); int templateMatching_snumber(); int templateMatching_lnumber(double *first_min, double *second_min); }; #endif