aboutsummaryrefslogtreecommitdiff
path: root/src/scalevalapokalypsi/utils/utils.scala
diff options
context:
space:
mode:
authorAleksi Heikkila <aleksi.e.heikkila@aalto.fi>2024-11-27 17:26:16 +0200
committerAleksi Heikkila <aleksi.e.heikkila@aalto.fi>2024-11-27 17:26:16 +0200
commitb50a8e42b6b69ce4e15773c73cf68d2ac8f2175d (patch)
tree14a95bc1fd5ec6cfbfd25f795e46fc389ee6625a /src/scalevalapokalypsi/utils/utils.scala
parent34dc64a1387f2904b4c23ac3fcfea35c9670088e (diff)
parent302455bac062080bf197b44e07ed53a3454be4c5 (diff)
downloadscalevalapokalypsi-b50a8e42b6b69ce4e15773c73cf68d2ac8f2175d.tar.gz
scalevalapokalypsi-b50a8e42b6b69ce4e15773c73cf68d2ac8f2175d.zip
help-komento
Diffstat (limited to 'src/scalevalapokalypsi/utils/utils.scala')
-rw-r--r--src/scalevalapokalypsi/utils/utils.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scalevalapokalypsi/utils/utils.scala b/src/scalevalapokalypsi/utils/utils.scala
index 4be0687..8179585 100644
--- a/src/scalevalapokalypsi/utils/utils.scala
+++ b/src/scalevalapokalypsi/utils/utils.scala
@@ -28,7 +28,7 @@ def byteArrayToString(bytes: Array[Byte]): Option[String] =
/** Incredibly LÖRS string metric algorithm.
* LÖRSiness explained by there being 6 hours left to the DL
*/
-def hammingDistance(s1: String, s2: String): Float =
+def hammingDistance(s1: String, s2: String): Int =
s1.zip(s2).map(p => p(0) != p(1)).filter((b: Boolean) => b).length
/** Reads n characters from the given InputStream blockingly.