summaryrefslogtreecommitdiff
path: root/core/src/main/scala/com/rockymadden/stringmetric/package.scala
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/scala/com/rockymadden/stringmetric/package.scala')
-rwxr-xr-xcore/src/main/scala/com/rockymadden/stringmetric/package.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/src/main/scala/com/rockymadden/stringmetric/package.scala b/core/src/main/scala/com/rockymadden/stringmetric/package.scala
new file mode 100755
index 0000000..e5bc19d
--- /dev/null
+++ b/core/src/main/scala/com/rockymadden/stringmetric/package.scala
@@ -0,0 +1,17 @@
+package com.rockymadden
+
+package object stringmetric {
+ import scala.language.implicitConversions
+ import Algorithm._
+ import Metric._
+
+ type CompareTuple[T] = (Array[T], Array[T])
+ type MatchTuple[T] = (Array[T], Array[T])
+
+ implicit def stringToCharArray(s: String): Array[Char] =
+ s.toCharArray
+ implicit def stringAlgorithmToDecoratedStringAlgorithm(sa: StringAlgorithm): StringAlgorithmDecorator =
+ new StringAlgorithmDecorator(sa)
+ implicit def stringMetricToDecoratedStringMetric[A](sa: StringMetric[A]): StringMetricDecorator[A] =
+ new StringMetricDecorator[A](sa)
+}