summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRocky Madden <git@rockymadden.com>2012-10-28 17:55:48 -0600
committerRocky Madden <git@rockymadden.com>2012-10-28 17:55:48 -0600
commit434df013728807dad4967391bec128f78ad25194 (patch)
treea1104adc0a0d1eddce14c6a554d2fcb3a1f15ecf /core
parent6964bc71e3d8a686f5efaef167daffd6773e3e7a (diff)
downloadstringmetric-434df013728807dad4967391bec128f78ad25194.tar.gz
stringmetric-434df013728807dad4967391bec128f78ad25194.tar.bz2
stringmetric-434df013728807dad4967391bec128f78ad25194.zip
Added proper covarience. Whoops.
Diffstat (limited to 'core')
-rwxr-xr-xcore/source/core/scala/org/hashtree/stringmetric/Algorithm.scala4
-rwxr-xr-xcore/source/core/scala/org/hashtree/stringmetric/Metric.scala4
2 files changed, 4 insertions, 4 deletions
diff --git a/core/source/core/scala/org/hashtree/stringmetric/Algorithm.scala b/core/source/core/scala/org/hashtree/stringmetric/Algorithm.scala
index e334d20..cd46150 100755
--- a/core/source/core/scala/org/hashtree/stringmetric/Algorithm.scala
+++ b/core/source/core/scala/org/hashtree/stringmetric/Algorithm.scala
@@ -1,6 +1,6 @@
package org.hashtree.stringmetric
/** Marks those which leverage traits of a stand alone algorithm. */
-trait Algorithm[T, C] {
- def compute(t: T)(implicit c: C): Option[T]
+trait Algorithm[T, F <: Filter[T]] {
+ def compute(t: T)(implicit f: F): Option[T]
} \ No newline at end of file
diff --git a/core/source/core/scala/org/hashtree/stringmetric/Metric.scala b/core/source/core/scala/org/hashtree/stringmetric/Metric.scala
index 218285f..9542dcf 100755
--- a/core/source/core/scala/org/hashtree/stringmetric/Metric.scala
+++ b/core/source/core/scala/org/hashtree/stringmetric/Metric.scala
@@ -1,6 +1,6 @@
package org.hashtree.stringmetric
/** Marks those which leverage traits of a metric. */
-trait Metric[T, C] {
- def compare(t1: T, t2: T)(implicit c: C): Option[AnyVal]
+trait Metric[T, F <: Filter[T]] {
+ def compare(t1: T, t2: T)(implicit f: F): Option[AnyVal]
} \ No newline at end of file