mirror of
https://github.com/logos-messaging/nim-sds.git
synced 2026-01-05 15:43:09 +00:00
chore: move to src
This commit is contained in:
parent
ab4c507343
commit
45b553eab6
@ -5,8 +5,6 @@ import results
|
||||
import private/probabilities
|
||||
|
||||
type
|
||||
BloomFilterError* = object of CatchableError
|
||||
|
||||
BloomFilter* = object
|
||||
capacity*: int
|
||||
errorRate*: float
|
||||
@ -33,7 +31,7 @@ proc hashN(item: string, n: int, maxValue: int): int =
|
||||
|
||||
{.pop.}
|
||||
|
||||
proc getMOverNBitsForK(k: int, targetError: float,
|
||||
proc getMOverNBitsForK*(k: int, targetError: float,
|
||||
probabilityTable = kErrors): Result[int, string] =
|
||||
## Returns the optimal number of m/n bits for a given k.
|
||||
if k notin 0..12:
|
||||
@ -1,5 +1,5 @@
|
||||
import unittest, results
|
||||
include ../bloom_filter/bloom
|
||||
import unittest, results, strutils
|
||||
import ../src/bloom
|
||||
from random import rand, randomize
|
||||
|
||||
suite "bloom filter":
|
||||
Loading…
x
Reference in New Issue
Block a user