diff options
author | Joel Kronqvist <joel.kronqvist@iki.fi> | 2024-11-27 17:19:46 +0200 |
---|---|---|
committer | Joel Kronqvist <joel.kronqvist@iki.fi> | 2024-11-27 17:19:46 +0200 |
commit | 302455bac062080bf197b44e07ed53a3454be4c5 (patch) | |
tree | 8b189ba41699c9a095d27bf00d1114a65aaa420a /src/scalevalapokalypsi/utils | |
parent | 98407b35ff477f372baa92bf582b90a961d4ad16 (diff) | |
download | scalevalapokalypsi-302455bac062080bf197b44e07ed53a3454be4c5.tar.gz scalevalapokalypsi-302455bac062080bf197b44e07ed53a3454be4c5.zip |
Finishing almost the adventure
Diffstat (limited to 'src/scalevalapokalypsi/utils')
-rw-r--r-- | src/scalevalapokalypsi/utils/utils.scala | 2 |
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. |