00001 #ifndef _JSTATISTICS_H_
00002 #define _JSTATISTICS_H_
00003
00004
00005 #include "JMorphology.h"
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00018 #define BITWISE_DROPOUT_32 8
00019 #define MINONPIXELS 20
00020
00022 class JStatistics {
00023 friend class JScript;
00024 friend class JMorphology;
00025
00026 public:
00027 static void GetBestFitAllWithDens32(language_profile *first_language,
00028 language_profile **best_language, int *best_cluster_no,int number_of_scripts,
00029 unsigned int* img2,
00030 int bytes_needed, int pixel_count,
00031 float *hamming_penalty,
00032 unsigned int *hamming_lookup,
00033 int on_pixels,int *densities,float *float_result);
00034
00035
00036 private:
00037 static void compute_distribution_filter_new(language_profile *first_lang,
00038 float *avg_hits, float *std_dev, float *first_count,
00039 float *second_count, language_profile **first_language,
00040 language_profile **second_language, int collect_data_flag,
00041 float *symbol_distribution, int language_count,language_profile
00042 **best_fit_language,int *probs,float *scores);
00043
00049 static void generate_random_number_array( float *array,int count);
00050
00055 static int GetNextSymbol(char *used_symbol_array,
00056 int *file_symbol_count,
00057 float *randoms,int iCount,
00058 int *random_index,int max_random_index,
00059 int *current_index);
00060
00063 static void compute_mean_stddev(float *values, int *class_flags,int value_count,
00064 float *mean, float *stddev);
00065
00066 };
00067
00068
00069 #endif //_JSTATISTICS_H_