wordrec/metrics.h

Go to the documentation of this file.
00001 
00020 #ifndef METRICS_H
00021 #define METRICS_H
00022 
00023 /*----------------------------------------------------------------------
00024               I n c l u d e s
00025 ----------------------------------------------------------------------*/
00026 #include "measure.h"
00027 #include "bestfirst.h"
00028 #include "states.h"
00029 
00030 /*----------------------------------------------------------------------
00031               V a r i a b l e s
00032 ----------------------------------------------------------------------*/
00033 extern int words_chopped1;
00034 extern int words_chopped2;
00036 extern int chops_attempted1;
00038 extern int chops_performed1;
00040 extern int chops_attempted2;
00042 extern int chops_performed2;
00043 extern int permutation_count;
00044 
00045 extern int character_count;
00046 extern int word_count;
00047 extern int chars_classified;
00048 
00050 extern MEASUREMENT width_measure;
00051 extern MEASUREMENT width_priority_range;
00052 extern MEASUREMENT match_priority_range;
00053 
00054 /*----------------------------------------------------------------------
00055               F u n c t i o n s
00056 ----------------------------------------------------------------------*/
00057 void init_metrics();
00058 void end_metrics();
00059 
00060 void record_certainty(float certainty, int pass);
00061 
00062 void record_search_status(int num_states, int before_best, float closeness);
00063 
00064 #ifndef SECURE_NAMES
00065 void save_summary(INT32 elapsed_time);
00066 #endif
00067 
00068 void record_priorities(SEARCH_RECORD *the_search,
00069                        STATE *old_state,
00070                        FLOAT32 priority_1,
00071                        FLOAT32 priority_2);
00072 
00073 void record_samples(FLOAT32 match_pri, FLOAT32 width_pri);
00074 
00075 void reset_width_tally();
00076 
00077 void save_best_state(CHUNKS_RECORD *chunks_record);
00078 
00079 void start_recording();
00080 
00081 void stop_recording();
00082 
00083 /*
00084 #if defined(__STDC__) || defined(__cplusplus) || MAC_OR_DOS
00085 # define _ARGS(s) s
00086 #else
00087 # define _ARGS(s) ()
00088 #endif*/
00089 
00090 /* metrics.c
00091 void init_metrics
00092   _ARGS((void));
00093 
00094 void record_certainty
00095   _ARGS((float certainty,
00096   int pass));
00097 
00098 void record_search_status
00099   _ARGS((int num_states,
00100   int before_best,
00101   float closeness));
00102 
00103 void save_summary
00104   _ARGS((INT32 elapsed_time));
00105 
00106 void record_priorities
00107   _ARGS((SEARCH_RECORD *the_search,
00108   STATE *old_state,
00109   FLOAT32 priority_1,
00110   FLOAT32 priority_2));
00111 
00112 void record_samples
00113   _ARGS((FLOAT32 match_pri,
00114   FLOAT32 width_pri));
00115 
00116 void reset_width_tally
00117   _ARGS((void));
00118 
00119 void save_best_state
00120   _ARGS((CHUNKS_RECORD *chunks_record));
00121 
00122 void start_recording
00123   _ARGS((void));
00124 
00125 void stop_recording
00126   _ARGS((void));
00127 
00128 #undef _ARGS
00129 */
00130 #endif

Generated on Wed Feb 28 19:49:13 2007 for Tesseract by  doxygen 1.5.1