use hash_map to improve speed but need more momenry

This commit is contained in:
gwdwyy 2013-08-21 17:17:03 +08:00
parent 62efd1fca4
commit 23d652a3eb

View File

@ -10,17 +10,21 @@
#include <string>
#include <sys/types.h>
#include <stdint.h>
#include <hash_map>
//#include <ext/hash_map>
namespace CppJieba
{
using namespace std;
using __gnu_cxx::hash_map;
//using namespace stdext;
//typedefs
typedef unsigned int uint;
typedef std::vector<std::string>::iterator VSI;
typedef std::vector<uint16_t> VUINT16;
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;
}