Dialyzer help
Add specs and docs
This commit is contained in:
parent
e86d91dcf6
commit
e66e326c2b
1 changed files with 6 additions and 1 deletions
|
@ -25,7 +25,9 @@
|
||||||
%%% API
|
%%% API
|
||||||
%%%============================================================================
|
%%%============================================================================
|
||||||
|
|
||||||
|
-spec create_bloom(list(integer())) -> binary().
|
||||||
|
%% @doc
|
||||||
|
%% Create a binary bloom filter from alist of hashes
|
||||||
create_bloom(HashList) ->
|
create_bloom(HashList) ->
|
||||||
case length(HashList) of
|
case length(HashList) of
|
||||||
0 ->
|
0 ->
|
||||||
|
@ -41,6 +43,9 @@ create_bloom(HashList) ->
|
||||||
add_hashlist(HashList, 1, 0, 0)
|
add_hashlist(HashList, 1, 0, 0)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
-spec check_hash(integer(), binary()) -> boolean().
|
||||||
|
%% @doc
|
||||||
|
%% Check for the presence of a given hash within a bloom
|
||||||
check_hash(_Hash, <<>>) ->
|
check_hash(_Hash, <<>>) ->
|
||||||
false;
|
false;
|
||||||
check_hash(Hash, BloomBin) ->
|
check_hash(Hash, BloomBin) ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue