?? profile.h
字號:
/* profile.h : stores info about (previously) trained scans * Author: Maxie D. Schmidt (created 5/30/2006) */#ifndef _PROFILE_H_#define _PROFILE_H_#include <stdlib.h>#include <stdio.h>#include <errno.h>#include <string>#include <vector>using namespace std;#include "types.h"#include "classnotes.h"#include "runutils.h"#include "parselist.h"// profile currently only handles A-Z, a-z:#define NUM_TRAINED_CHARS 52typedef struct { string character; int num_instances; grid_int_t gc_count;} profile_node;class profile { public: profile(int gsx, int gsy, int gcx, int gcy); void update(); int total_instances; int gs_x, gs_y, gc_x, gc_y; // gs = grid size, gc = grid cell size vector<profile_node> character_nodes; grid_int_t gridcell_totals;};// related functions:bool load_profile_from_file(string filename);bool write_profile_to_file(string filename, profile *prf);// merges prof1 _into prof0_; returns false if profiles have diff grid sizes:bool merge_profiles(profile *prof1);void merge_parse_list(parse_list *plist, profile *prf);int find_character_index(string character, profile *prof); // index or -1#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -