mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-29 06:52:34 +03:00
3ef02eb7e6
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4146 1f5c12ca-751b-0410-a591-d2e778427230
45 lines
922 B
C++
45 lines
922 B
C++
/*
|
|
* Generic hashmap manipulation functions
|
|
*/
|
|
#ifndef __HASHMAPINFOS_H__
|
|
#define __HASHMAPINFOS_H__
|
|
#include <boost/functional/hash.hpp>
|
|
#include "infosHasher.h"
|
|
#include <vector>
|
|
#include <string>
|
|
#include <sstream>
|
|
#include <fstream>
|
|
|
|
using namespace std;
|
|
|
|
namespace HashMapSpace
|
|
{
|
|
class hashMapInfos
|
|
{
|
|
private:
|
|
vector<infosHasher> m_hasher;
|
|
|
|
public:
|
|
// ~hashMap();
|
|
long hashValue ( string key );
|
|
int trouve ( long searchKey );
|
|
int trouve ( string key );
|
|
void addHasher ( string key, vector<int> value );
|
|
void addValue ( string key, vector<int> value );
|
|
infosHasher getHasher ( string key );
|
|
vector<int> getValue ( string key );
|
|
// string searchValue ( string key );
|
|
void setValue ( string key , vector<int> value );
|
|
void printHash();
|
|
vector<infosHasher> getHashMap();
|
|
string printStringHash();
|
|
string printStringHash2();
|
|
string printStringHashForLexicon();
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif
|