mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
use hash_map to improve speed but need more momenry
This commit is contained in:
parent
62efd1fca4
commit
23d652a3eb
@ -10,17 +10,21 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <hash_map>
|
||||||
|
//#include <ext/hash_map>
|
||||||
|
|
||||||
namespace CppJieba
|
namespace CppJieba
|
||||||
{
|
{
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
using __gnu_cxx::hash_map;
|
||||||
|
//using namespace stdext;
|
||||||
//typedefs
|
//typedefs
|
||||||
typedef unsigned int uint;
|
typedef unsigned int uint;
|
||||||
typedef std::vector<std::string>::iterator VSI;
|
typedef std::vector<std::string>::iterator VSI;
|
||||||
typedef std::vector<uint16_t> VUINT16;
|
typedef std::vector<uint16_t> VUINT16;
|
||||||
typedef std::vector<uint16_t>::const_iterator VUINT16_CONST_ITER;
|
typedef std::vector<uint16_t>::const_iterator VUINT16_CONST_ITER;
|
||||||
typedef map<uint16_t, struct TrieNode*> TrieNodeMap;
|
typedef hash_map<uint16_t, struct TrieNode*> TrieNodeMap;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user