summaryrefslogtreecommitdiffstats
path: root/kbabel/common/stringdistance.h
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel/common/stringdistance.h')
-rw-r--r--kbabel/common/stringdistance.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/kbabel/common/stringdistance.h b/kbabel/common/stringdistance.h
index 6f5aa185..89c60627 100644
--- a/kbabel/common/stringdistance.h
+++ b/kbabel/common/stringdistance.h
@@ -34,7 +34,7 @@
#ifndef STRINGDISTANCE_H
#define STRINGDISTANCE_H
-#include <qstring.h>
+#include <tqstring.h>
//#include <boost/numeric/ublas/matrix.hpp>
@@ -69,20 +69,20 @@ class Distance : public NonCopyable
{
public:
virtual ~Distance(){}
- double operator()(const QString& left, const QString& right);
+ double operator()(const TQString& left, const TQString& right);
int editCostReplace() { return editCost_replace_base; }
static int debug;
protected:
- virtual double calculate(const QString& left_string, const QString& right_string) = 0;
- int nodeDistance(const QString& left_letter, const QString& right_letter);
+ virtual double calculate(const TQString& left_string, const TQString& right_string) = 0;
+ int nodeDistance(const TQString& left_letter, const TQString& right_letter);
static const int editCost_replace_base;
double m_distance;
};
-double relativeDistance(double distance, const QString& left_string, const QString right_string);
+double relativeDistance(double distance, const TQString& left_string, const TQString right_string);
/**
@@ -96,7 +96,7 @@ double relativeDistance(double distance, const QString& left_string, const QStri
class HammingDistance : public Distance
{
protected:
- virtual double calculate(const QString& left_string, const QString& right_string);
+ virtual double calculate(const TQString& left_string, const TQString& right_string);
int editCostReplace() { return editCost; }
static const int editCost;
};
@@ -113,7 +113,7 @@ protected:
class LevenshteinDistance : public Distance
{
protected:
- virtual double calculate(const QString& left_string, const QString& right_string);
+ virtual double calculate(const TQString& left_string, const TQString& right_string);
int editCostReplace() { return editCost_replace; }
static const int editCost_replace;
static const int editCost_insert;
@@ -122,7 +122,7 @@ protected:
/** wrapper function for replacement of fstrcmp from gettext */
-inline double fstrcmp(const QString& left, const QString& right)
+inline double fstrcmp(const TQString& left, const TQString& right)
{
return LevenshteinDistance()(left,right);
}