|
a/src/common/syngroups.cpp |
|
b/src/common/syngroups.cpp |
|
... |
|
... |
21 |
|
21 |
|
22 |
#include "log.h"
|
22 |
#include "log.h"
|
23 |
#include "smallut.h"
|
23 |
#include "smallut.h"
|
24 |
|
24 |
|
25 |
#include <errno.h>
|
25 |
#include <errno.h>
|
26 |
#include UNORDERED_MAP_INCLUDE
|
26 |
#include <unordered_map>
|
27 |
#include <fstream>
|
27 |
#include <fstream>
|
28 |
#include <iostream>
|
28 |
#include <iostream>
|
29 |
#include <cstring>
|
29 |
#include <cstring>
|
30 |
|
30 |
|
31 |
using namespace std;
|
31 |
using namespace std;
|
|
... |
|
... |
44 |
public:
|
44 |
public:
|
45 |
Internal() : ok(false) {
|
45 |
Internal() : ok(false) {
|
46 |
}
|
46 |
}
|
47 |
bool ok;
|
47 |
bool ok;
|
48 |
// Term to group num
|
48 |
// Term to group num
|
49 |
STD_UNORDERED_MAP<string, unsigned int> terms;
|
49 |
std::unordered_map<string, unsigned int> terms;
|
50 |
// Group num to group
|
50 |
// Group num to group
|
51 |
vector<vector<string> > groups;
|
51 |
vector<vector<string> > groups;
|
52 |
};
|
52 |
};
|
53 |
|
53 |
|
54 |
bool SynGroups::ok()
|
54 |
bool SynGroups::ok()
|
|
... |
|
... |
168 |
{
|
168 |
{
|
169 |
vector<string> ret;
|
169 |
vector<string> ret;
|
170 |
if (!ok())
|
170 |
if (!ok())
|
171 |
return ret;
|
171 |
return ret;
|
172 |
|
172 |
|
173 |
STD_UNORDERED_MAP<string, unsigned int>::const_iterator it1 =
|
173 |
std::unordered_map<string, unsigned int>::const_iterator it1 =
|
174 |
m->terms.find(term);
|
174 |
m->terms.find(term);
|
175 |
if (it1 == m->terms.end()) {
|
175 |
if (it1 == m->terms.end()) {
|
176 |
LOGDEB1("SynGroups::getgroup: [" << (term) << "] not found in direct map\n" );
|
176 |
LOGDEB1("SynGroups::getgroup: [" << (term) << "] not found in direct map\n" );
|
177 |
return ret;
|
177 |
return ret;
|
178 |
}
|
178 |
}
|