20 #ifndef CHAR_ALT_LIST_H
21 #define CHAR_ALT_LIST_H
40 bool Insert(
int class_id,
int cost,
void *tag =
NULL);
43 if (class_id_cost_ ==
NULL ||
48 return class_id_cost_[class_id];
51 inline int Alt(
int alt_idx)
const {
return class_id_alt_[alt_idx]; }
55 class_id_cost_[class_id_alt_[alt_idx]] = cost;
66 static const int kMaxCharAlt = 256;
70 #endif // CHAR_ALT_LIST_H
bool Insert(int class_id, int cost, void *tag=NULL)
void SetAltCost(int alt_idx, int cost)
CharAltList(const CharSet *char_set, int max_alt=kMaxCharAlt)
int ClassCost(int class_id) const
int Alt(int alt_idx) const