Browse Source

Gmt module: regenerate more compact hash table for color names.

master
Michael Uleysky 8 years ago
parent
commit
995da9cf3b
  1. 1922
      modules/gmt/modgmt_colornames.cpp
  2. 58
      modules/gmt/modgmt_colornames.h

1922
modules/gmt/modgmt_colornames.cpp

File diff suppressed because it is too large Load Diff

58
modules/gmt/modgmt_colornames.h

@ -13,38 +13,38 @@ public:
};
inline unsigned int
ColorHash::colornamehash ( const char *str, unsigned int len)
ColorHash::colornamehash (const char *str, unsigned int len)
{
static const unsigned short asso_values[] =
{
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084,
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084,
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084,
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084,
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 800, 25,
20, 5, 0, 845, 785, 780, 640, 620, 4084, 4084,
4084, 4084, 4084, 4084, 4084, 80, 0, 686, 5, 0,
260, 0, 85, 770, 20, 950, 210, 95, 160, 195,
995, 335, 0, 0, 135, 425, 55, 863, 4084, 60,
4084, 4084, 4084, 4084, 4084, 4084, 4084, 80, 0, 686,
5, 0, 260, 0, 85, 770, 20, 950, 210, 95,
160, 195, 995, 335, 0, 0, 135, 425, 55, 863,
4084, 60, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084,
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084,
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084,
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084,
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084,
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084,
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084,
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084,
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084,
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084,
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084,
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084,
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084,
4084, 4084, 4084, 4084, 4084, 4084
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728,
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728,
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728,
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728,
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 666, 27,
26, 23, 22, 789, 588, 587, 501, 436, 2728, 2728,
2728, 2728, 2728, 2728, 2728, 61, 96, 222, 98, 22,
117, 22, 561, 559, 22, 708, 179, 301, 42, 101,
242, 46, 23, 22, 116, 171, 821, 809, 2728, 169,
2728, 2728, 2728, 2728, 2728, 2728, 2728, 61, 96, 222,
98, 22, 117, 22, 561, 559, 22, 708, 179, 301,
42, 101, 242, 46, 23, 22, 116, 171, 821, 809,
2728, 169, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728,
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728,
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728,
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728,
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728,
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728,
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728,
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728,
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728,
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728,
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728,
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728,
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728,
2728, 2728, 2728, 2728, 2728, 2728
};
int hval = len;
int hval = len;
switch (hval)
{
@ -81,4 +81,4 @@ ColorHash::colornamehash ( const char *str, unsigned int len)
return hval + asso_values[(unsigned char)str[len - 1]];
}
#endif
#endif

Loading…
Cancel
Save