Mercurial > dedupe
diff EditDistance.hpp @ 0:a3834af36579
Working with memory backend.
| author | Tom Fredrik Blenning Klaussen <bfg@blenning.no> |
|---|---|
| date | Mon, 20 Aug 2012 15:49:48 +0200 |
| parents | |
| children | 06166d6c083b |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/EditDistance.hpp Mon Aug 20 15:49:48 2012 +0200 @@ -0,0 +1,24 @@ +#ifndef EDITDISTANCE_HPP +#define EDITDISTANCE_HPP + +#include "OrderedPair.hpp" + +#include <QtCore/QString> +#include <QtCore/QMap> +#include <QtCore/QHash> + +#include "ThreadSafeLookup.hpp" + +class EditDistance { +protected: + typedef ThreadSafeLookup<OrderedPair<QString>, int> cacheType; + //typedef QMap<OrderedPair<QString>, int> cacheType; + //typedef QHash<OrderedPair<QString>, int> cacheType; +public: + static int Compute(QString a, QString b, bool removeDiacritics = false); + static QString removeDiacritics(QString in); + + static cacheType cache; +}; + +#endif //EDITDISTANCE_HPP
