#ifndef LCF_DATA_NORMILIZE_H_
#define LCF_DATA_NORMILIZE_H_

class DataNormilize {
    public:
        DataNormilize();
        DataNormilize(int type);
        virtual ~DataNormilize();
        
        void NormMain(float *inData, int bathcNum, int featureNum);
        void SaveNormPara(const char *fileName);
        void LoadNormPara(const char *fileName);
        void InferenceNorm(float *pData);
        void UnNorm(float *iData);

    private:
        void SetPoinsInitStatus();
        void RealeaseMaxMinArray();
        void RealeaseExVarArray();

        void NormBatchMultiFeatureVector(float *inData, int bathcNum, int featureNum);

        float MaxMinNormilize(int fId, float srcNum);
        float UnMaxMinNormilize(int fId, float srcNum);
        void ComputerBatchFeatureMaxMin(float *tmpBatchArr, int row, float *maxNum, float *minNum);

        float StdVarNormilize(int fId, float srcNum);
        float UnStdVarNormilize(int fId, float srcNum);
        void ComputerBatchFeatureExVar(float *tmpBatchArr, int row, float *ex, float *var);

        float *mMaxNum, *mMinNum;
        float *mExNum, *mVarNum;
        int mFeatureNum;
        int mNormType;
        float mVarModifyCoff;
};

#endif