14 #ifndef NOT_STRICKT_CHAIN_HPP
15 #define NOT_STRICKT_CHAIN_HPP
24 std::map<unsigned long long, std::pair<unsigned int, unsigned int> >
wMap;
27 inline void addWord(
unsigned long long wordId);
30 inline void decrCount(
unsigned long long wordId);
31 inline unsigned int wCount()
const;
37 typename std::map<unsigned long long, std::pair<unsigned int, unsigned int> >::iterator it;
38 if((it =
wMap.find(wordId)) ==
wMap.end())
40 wMap.insert(std::pair<
unsigned long long, std::pair<unsigned int, unsigned int> >(wordId, std::pair<unsigned int, unsigned int>(1, 0)));
51 typename std::map<unsigned long long, std::pair<unsigned int, unsigned int> >::iterator it;
52 for(it =
wMap.begin(); it !=
wMap.end(); ++it)
54 if((*it).second.second != 0)
65 typename std::map<unsigned long long, std::pair<unsigned int, unsigned int> >::iterator it;
66 for(it =
wMap.begin(); it !=
wMap.end(); ++it)
68 (*it).second.second = (*it).second.first;
74 typename std::map<unsigned long long, std::pair<unsigned int, unsigned int> >::iterator it;
75 if((it =
wMap.find(wordId)) !=
wMap.end())
77 (*it).second.second--;