Skip to content

Commit 59340c8

Browse files
committed
Add documentation for HashCompressor to the full_api page.
1 parent e6007e4 commit 59340c8

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

docs/src/full_api.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ ChebHash
4343

4444
## Miscellaneous
4545

46+
```@autodocs
47+
Modules = [LSHFunctions]
48+
Private = false
49+
Pages = [joinpath("utils", "hash_compression.jl")]
50+
```
51+
4652
```@docs
4753
@interval
4854
```

src/utils/hash_compression.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ end
2929
salt :: Union{Vector{UInt8}} = Vector{UInt8}(undef,0)
3030
)
3131
32-
Construct a new HashCompressor that compresses a hash returned by an LSHFunction
33-
into `n_bytes` bytes.
32+
Construct a new `HashCompressor`. The created `HashCompressor` will compress hashes
33+
into `n_bytes` bytes, and use the provided salt during hash compression.
3434
3535
# Keyword arguments
3636
- `n_bytes::Integer` (default: `32`): the number of bytes to compress hashes into.
@@ -40,12 +40,12 @@ into `n_bytes` bytes.
4040
```jldoctest; setup = :(using LSHFunctions)
4141
julia> compressor = HashCompressor(n_bytes=4);
4242
43-
julia> compressor([1, 4, 2, 9])
43+
julia> compressor([1, 4, 2, 9, 5, 5])
4444
4-element Array{UInt8,1}:
45-
0xb8
46-
0xdd
47-
0x5a
48-
0x5e
45+
0xf3
46+
0x91
47+
0x55
48+
0x2e
4949
```
5050
"""
5151
function HashCompressor(

0 commit comments

Comments
 (0)