Mercurial > dedupe
view EditDistance.hpp @ 65:bc55cbd827bf
Compile fix.
| author | Tom Fredrik Blenning Klaussen <bfg@bfgconsult.no> |
|---|---|
| date | Sun, 23 Dec 2012 22:04:55 +0100 |
| parents | e5fa379d4030 |
| children | 9744ec195be3 |
line wrap: on
line source
#ifndef EDITDISTANCE_HPP #define EDITDISTANCE_HPP #include "DBCache.hpp" template<typename Value> struct InsertRegulator<OrderedPair<UniqueString>, Value > { uint n; void start() { n = 0; HuffmanString::getSet().setAutoRebuild(false); } static void finish() { HuffmanString::getSet().rebuild(); HuffmanString::getSet().setAutoRebuild(true); } void next() { if (++n == 2048) HuffmanString::getSet().rebuild(); } }; class EditDistance { protected: typedef DBCache<OrderedPair<UniqueString>, int, true> cacheType; public: static int Compute(QString a, QString b, bool removeDiacritics = false); static void removeDiacriticsNoCopy(QString& in); static QString removeDiacritics(const QString& in); static cacheType* cache; }; #endif //EDITDISTANCE_HPP
