summaryrefslogtreecommitdiffstats
path: root/lib/hamming.go
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2020-09-06 22:10:12 -0400
committerrsiddharth <s@ricketyspace.net>2020-09-06 22:10:29 -0400
commitcdba778e7986fd4543ea2deaee4d6bdafb858f68 (patch)
treea3a04c64e921d61e71d2c561403ab0686f785228 /lib/hamming.go
parent40f31edb47c1892d903d821418bcba06c716c113 (diff)
lib: remove KeySizeWithMinDistanceIter
Diffstat (limited to 'lib/hamming.go')
-rw-r--r--lib/hamming.go15
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/hamming.go b/lib/hamming.go
index 3ed4611..d9801a4 100644
--- a/lib/hamming.go
+++ b/lib/hamming.go
@@ -32,21 +32,6 @@ func setBits(b byte) int {
return int(c)
}
-// Returns average key size with minimum normalized hamming distance.
-// 'keyMin' is the minimum key size
-// 'keyMax' is the maximum key size
-// 'iterate' is the number of times to iterate.
-func KeySizeWithMinDistanceIter(keyMin, keyMax, iterate int) int {
- sum := 0
- avg := 0.0
- for i := 0; i < iterate; i++ {
- sum += KeySizeWithMinDistance(keyMin, keyMax)
- }
- avg = float64(sum) / float64(iterate)
-
- return int(avg)
-}
-
// Returns key size with minimum normalized hamming distance
// 'keyMin' is the minimum key size
// 'keyMax' is the maximum key size