diff options
author | Rocky Madden <git@rockymadden.com> | 2012-11-15 10:42:22 -0700 |
---|---|---|
committer | Rocky Madden <git@rockymadden.com> | 2012-11-15 10:42:22 -0700 |
commit | 889dea6dadb2219ac168750c6b749899fc631631 (patch) | |
tree | a32dab9a7fc1459b7eeae5ab39a9e4c36fc3e304 /core/source/benchmark | |
parent | d2404627e40169e62664470135f270b185f24185 (diff) | |
download | stringmetric-889dea6dadb2219ac168750c6b749899fc631631.tar.gz stringmetric-889dea6dadb2219ac168750c6b749899fc631631.tar.bz2 stringmetric-889dea6dadb2219ac168750c6b749899fc631631.zip |
Code formatting tweaks.
Diffstat (limited to 'core/source/benchmark')
11 files changed, 11 insertions, 22 deletions
diff --git a/core/source/benchmark/scala/org/hashtree/stringmetric/phonetic/MetaphoneMetricBenchmark.scala b/core/source/benchmark/scala/org/hashtree/stringmetric/phonetic/MetaphoneMetricBenchmark.scala index 48b09fa..bc75135 100755 --- a/core/source/benchmark/scala/org/hashtree/stringmetric/phonetic/MetaphoneMetricBenchmark.scala +++ b/core/source/benchmark/scala/org/hashtree/stringmetric/phonetic/MetaphoneMetricBenchmark.scala @@ -16,7 +16,7 @@ final class MetaphoneMetricBenchmark extends CaliperBenchmark { override protected def setUp() { @tailrec - def random(l: Int, ps: String = null): String = { + def random(l: Int, ps: String = null): String = if (l == 0) "" else { val s = Random.alphanumeric.filter(_ > '9').take(l).mkString @@ -24,7 +24,6 @@ final class MetaphoneMetricBenchmark extends CaliperBenchmark { if (ps == null || s != ps) s else random(l, ps) } - } string1 = random(length) string2 = random(length, string1) diff --git a/core/source/benchmark/scala/org/hashtree/stringmetric/phonetic/NysiisMetricBenchmark.scala b/core/source/benchmark/scala/org/hashtree/stringmetric/phonetic/NysiisMetricBenchmark.scala index f3ab31d..660f397 100755 --- a/core/source/benchmark/scala/org/hashtree/stringmetric/phonetic/NysiisMetricBenchmark.scala +++ b/core/source/benchmark/scala/org/hashtree/stringmetric/phonetic/NysiisMetricBenchmark.scala @@ -16,7 +16,7 @@ final class NysiisMetricBenchmark extends CaliperBenchmark { override protected def setUp() { @tailrec - def random(l: Int, ps: String = null): String = { + def random(l: Int, ps: String = null): String = if (l == 0) "" else { val s = Random.alphanumeric.filter(_ > '9').take(l).mkString @@ -24,7 +24,6 @@ final class NysiisMetricBenchmark extends CaliperBenchmark { if (ps == null || s != ps) s else random(l, ps) } - } string1 = random(length) string2 = random(length, string1) diff --git a/core/source/benchmark/scala/org/hashtree/stringmetric/phonetic/RefinedSoundexMetricBenchmark.scala b/core/source/benchmark/scala/org/hashtree/stringmetric/phonetic/RefinedSoundexMetricBenchmark.scala index 90f8e72..cceb128 100755 --- a/core/source/benchmark/scala/org/hashtree/stringmetric/phonetic/RefinedSoundexMetricBenchmark.scala +++ b/core/source/benchmark/scala/org/hashtree/stringmetric/phonetic/RefinedSoundexMetricBenchmark.scala @@ -16,7 +16,7 @@ final class RefinedSoundexMetricBenchmark extends CaliperBenchmark { override protected def setUp() { @tailrec - def random(l: Int, ps: String = null): String = { + def random(l: Int, ps: String = null): String = if (l == 0) "" else { val s = Random.alphanumeric.filter(_ > '9').take(l).mkString @@ -24,7 +24,6 @@ final class RefinedSoundexMetricBenchmark extends CaliperBenchmark { if (ps == null || s != ps) s else random(l, ps) } - } string1 = random(length) string2 = random(length, string1) diff --git a/core/source/benchmark/scala/org/hashtree/stringmetric/phonetic/SoundexMetricBenchmark.scala b/core/source/benchmark/scala/org/hashtree/stringmetric/phonetic/SoundexMetricBenchmark.scala index 78e1d25..2eeeeda 100755 --- a/core/source/benchmark/scala/org/hashtree/stringmetric/phonetic/SoundexMetricBenchmark.scala +++ b/core/source/benchmark/scala/org/hashtree/stringmetric/phonetic/SoundexMetricBenchmark.scala @@ -16,7 +16,7 @@ final class SoundexMetricBenchmark extends CaliperBenchmark { override protected def setUp() { @tailrec - def random(l: Int, ps: String = null): String = { + def random(l: Int, ps: String = null): String = if (l == 0) "" else { val s = Random.alphanumeric.filter(_ > '9').take(l).mkString @@ -24,7 +24,6 @@ final class SoundexMetricBenchmark extends CaliperBenchmark { if (ps == null || s != ps) s else random(l, ps) } - } string1 = random(length) string2 = random(length, string1) diff --git a/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/DiceSorensenMetricBenchmark.scala b/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/DiceSorensenMetricBenchmark.scala index 28d0688..d55303d 100755 --- a/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/DiceSorensenMetricBenchmark.scala +++ b/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/DiceSorensenMetricBenchmark.scala @@ -16,7 +16,7 @@ final class DiceSorensenMetricBenchmark extends CaliperBenchmark { override protected def setUp() { @tailrec - def random(l: Int, ps: String = null): String = { + def random(l: Int, ps: String = null): String = if (l == 0) "" else { val s = Random.alphanumeric.take(l).mkString @@ -24,7 +24,6 @@ final class DiceSorensenMetricBenchmark extends CaliperBenchmark { if (ps == null || s != ps) s else random(l, ps) } - } string1 = random(length) string2 = random(length, string1) diff --git a/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/HammingMetricBenchmark.scala b/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/HammingMetricBenchmark.scala index f06ae6d..69e9cfd 100755 --- a/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/HammingMetricBenchmark.scala +++ b/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/HammingMetricBenchmark.scala @@ -16,7 +16,7 @@ final class HammingMetricBenchmark extends CaliperBenchmark { override protected def setUp() { @tailrec - def random(l: Int, ps: String = null): String = { + def random(l: Int, ps: String = null): String = if (l == 0) "" else { val s = Random.alphanumeric.take(l).mkString @@ -24,7 +24,6 @@ final class HammingMetricBenchmark extends CaliperBenchmark { if (ps == null || s != ps) s else random(l, ps) } - } string1 = random(length) string2 = random(length, string1) diff --git a/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/JaroMetricBenchmark.scala b/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/JaroMetricBenchmark.scala index ce9d2f6..06139d1 100755 --- a/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/JaroMetricBenchmark.scala +++ b/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/JaroMetricBenchmark.scala @@ -16,7 +16,7 @@ final class JaroMetricBenchmark extends CaliperBenchmark { override protected def setUp() { @tailrec - def random(l: Int, ps: String = null): String = { + def random(l: Int, ps: String = null): String = if (l == 0) "" else { val s = Random.alphanumeric.take(l).mkString @@ -24,7 +24,6 @@ final class JaroMetricBenchmark extends CaliperBenchmark { if (ps == null || s != ps) s else random(l, ps) } - } string1 = random(length) string2 = random(length, string1) diff --git a/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/JaroWinklerMetricBenchmark.scala b/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/JaroWinklerMetricBenchmark.scala index 64f8b89..bf405cd 100755 --- a/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/JaroWinklerMetricBenchmark.scala +++ b/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/JaroWinklerMetricBenchmark.scala @@ -16,7 +16,7 @@ final class JaroWinklerMetricBenchmark extends CaliperBenchmark { override protected def setUp() { @tailrec - def random(l: Int, ps: String = null): String = { + def random(l: Int, ps: String = null): String = if (l == 0) "" else { val s = Random.alphanumeric.take(l).mkString @@ -24,7 +24,6 @@ final class JaroWinklerMetricBenchmark extends CaliperBenchmark { if (ps == null || s != ps) s else random(l, ps) } - } string1 = random(length) string2 = random(length, string1) diff --git a/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/LevenshteinMetricBenchmark.scala b/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/LevenshteinMetricBenchmark.scala index 598a44f..6ff47f1 100755 --- a/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/LevenshteinMetricBenchmark.scala +++ b/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/LevenshteinMetricBenchmark.scala @@ -16,7 +16,7 @@ final class LevenshteinMetricBenchmark extends CaliperBenchmark { override protected def setUp() { @tailrec - def random(l: Int, ps: String = null): String = { + def random(l: Int, ps: String = null): String = if (l == 0) "" else { val s = Random.alphanumeric.take(l).mkString @@ -24,7 +24,6 @@ final class LevenshteinMetricBenchmark extends CaliperBenchmark { if (ps == null || s != ps) s else random(l, ps) } - } string1 = random(length) string2 = random(length, string1) diff --git a/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/NGramMetricBenchmark.scala b/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/NGramMetricBenchmark.scala index c9c0717..2064d3b 100755 --- a/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/NGramMetricBenchmark.scala +++ b/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/NGramMetricBenchmark.scala @@ -19,7 +19,7 @@ final class NGramMetricBenchmark extends CaliperBenchmark { override protected def setUp() { @tailrec - def random(l: Int, ps: String = null): String = { + def random(l: Int, ps: String = null): String = if (l == 0) "" else { val s = Random.alphanumeric.take(l).mkString @@ -27,7 +27,6 @@ final class NGramMetricBenchmark extends CaliperBenchmark { if (ps == null || s != ps) s else random(l, ps) } - } string1 = random(length) string2 = random(length, string1) diff --git a/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/WeightedLevenshteinMetricBenchmark.scala b/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/WeightedLevenshteinMetricBenchmark.scala index 1f79c52..1ded477 100755 --- a/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/WeightedLevenshteinMetricBenchmark.scala +++ b/core/source/benchmark/scala/org/hashtree/stringmetric/similarity/WeightedLevenshteinMetricBenchmark.scala @@ -16,7 +16,7 @@ final class WeightedLevenshteinMetricBenchmark extends CaliperBenchmark { override protected def setUp() { @tailrec - def random(l: Int, ps: String = null): String = { + def random(l: Int, ps: String = null): String = if (l == 0) "" else { val s = Random.alphanumeric.take(l).mkString @@ -24,7 +24,6 @@ final class WeightedLevenshteinMetricBenchmark extends CaliperBenchmark { if (ps == null || s != ps) s else random(l, ps) } - } string1 = random(length) string2 = random(length, string1) |