view EditDistance.hpp @ 40:f711ddb56ae7

Sort up includes.
author Tom Fredrik Blenning Klaussen <bfg@blenning.no>
date Fri, 07 Sep 2012 13:32:33 +0200
parents fda70a362ed5
children 4c283daa42c7
line wrap: on
line source

#ifndef EDITDISTANCE_HPP
#define EDITDISTANCE_HPP

#include "DBCache.hpp"
#include "OrderedPair.hpp"
#include "ThreadSafeLookup.hpp"
#include "UniqueString.hpp"

#include <QtCore/QHash>
#include <QtCore/QMap>
#include <QtCore/QString>

class EditDistance {
protected:
  //typedef ThreadSafeLookup<OrderedPair<QString>, int> cacheType;
  typedef DBCache<OrderedPair<UniqueString>, int, true> 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;
  static cacheType* cache;
};

#endif //EDITDISTANCE_HPP