diff options
author | Aleksi Heikkila <aleksi.e.heikkila@aalto.fi> | 2024-11-27 17:26:16 +0200 |
---|---|---|
committer | Aleksi Heikkila <aleksi.e.heikkila@aalto.fi> | 2024-11-27 17:26:16 +0200 |
commit | b50a8e42b6b69ce4e15773c73cf68d2ac8f2175d (patch) | |
tree | 14a95bc1fd5ec6cfbfd25f795e46fc389ee6625a /src/scalevalapokalypsi/utils/utils.scala | |
parent | 34dc64a1387f2904b4c23ac3fcfea35c9670088e (diff) | |
parent | 302455bac062080bf197b44e07ed53a3454be4c5 (diff) | |
download | scalevalapokalypsi-b50a8e42b6b69ce4e15773c73cf68d2ac8f2175d.tar.gz scalevalapokalypsi-b50a8e42b6b69ce4e15773c73cf68d2ac8f2175d.zip |
help-komento
Diffstat (limited to 'src/scalevalapokalypsi/utils/utils.scala')
-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. |