Skip to content

Commit 7bcd3e0

Browse files
committed
Replace use of DataType by the more general Type in hash functions. Bump package and Julia versions.
1 parent 59340c8 commit 7bcd3e0

File tree

7 files changed

+20
-21
lines changed

7 files changed

+20
-21
lines changed

.travis.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ notifications:
99
jobs:
1010

1111
allow_failures:
12-
- julia: 1.4
1312
- julia: nightly
1413

1514
include:
@@ -20,15 +19,15 @@ jobs:
2019

2120
- stage: "Unit testing"
2221
julia: 1.3
22+
23+
- stage:
24+
julia: 1.4
2325
after_success:
2426
# Code coverage
2527
- julia -e 'using Pkg; Pkg.add("Coverage");'
2628
- julia -e 'using Coverage; Coveralls.submit(Coveralls.process_folder());'
2729
- julia -e 'using Coverage; Codecov.submit(Codecov.process_folder());'
2830

29-
- stage:
30-
julia: 1.4
31-
3231
- stage:
3332
julia: nightly
3433

@@ -37,7 +36,7 @@ jobs:
3736
########################################################
3837

3938
- stage: "Documentation"
40-
julia: 1.3
39+
julia: 1.4
4140
install:
4241
- sudo apt-get update
4342
- sudo apt-get install -y python3.7 python3-pip python3-setuptools

Manifest.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
2828
version = "0.3.3+0"
2929

3030
[[DataAPI]]
31-
git-tree-sha1 = "674b67f344687a88310213ddfa8a2b3c76cc4252"
31+
git-tree-sha1 = "00612b2fbe534a539dc7f70106c71e3a943d9b98"
3232
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
33-
version = "1.1.0"
33+
version = "1.2.0"
3434

3535
[[DataStructures]]
3636
deps = ["InteractiveUtils", "OrderedCollections"]
37-
git-tree-sha1 = "73eb18320fe3ba58790c8b8f6f89420f0a622773"
37+
git-tree-sha1 = "9faa13be79557bf4c5713fb912b0e3c5aa33d046"
3838
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
39-
version = "0.17.11"
39+
version = "0.17.13"
4040

4141
[[Dates]]
4242
deps = ["Printf"]
@@ -60,9 +60,9 @@ version = "0.8.1"
6060

6161
[[Documenter]]
6262
deps = ["Base64", "Dates", "DocStringExtensions", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
63-
git-tree-sha1 = "646ebc3db49889ffeb4c36f89e5d82c6a26295ff"
63+
git-tree-sha1 = "bc99c157ff2957c058a1067061d16c2c83d1ec42"
6464
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
65-
version = "0.24.7"
65+
version = "0.24.9"
6666

6767
[[FFTW]]
6868
deps = ["AbstractFFTs", "FFTW_jll", "IntelOpenMP_jll", "Libdl", "LinearAlgebra", "MKL_jll", "Reexport"]
@@ -157,9 +157,9 @@ version = "0.9.12"
157157

158158
[[Parsers]]
159159
deps = ["Dates", "Test"]
160-
git-tree-sha1 = "75d07cb840c300084634b4991761886d0d762724"
160+
git-tree-sha1 = "f8f5d2d4b4b07342e5811d2b6428e45524e241df"
161161
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
162-
version = "1.0.1"
162+
version = "1.0.2"
163163

164164
[[Pkg]]
165165
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]

src/LSHBase.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ N_HASHES_DOCSTR(; default = DEFAULT_N_HASHES) = """
345345
`n_hashes::Integer` (default: `$(default)`): the number of hash functions to generate."""
346346

347347
DTYPE_DOCSTR(hashfn; default = DEFAULT_DTYPE) = """
348-
`dtype::DataType` (default: `$(default)`): the data type to use in the $(hashfn) internals. For performance reasons you should pick `dtype` to match the type of the data you're hashing."""
348+
`dtype::Type` (default: `$(default)`): the data type to use in the $(hashfn) internals. For performance reasons you should pick `dtype` to match the type of the data you're hashing."""
349349

350350
RESIZE_POW2_DOCSTR(hashfn; default = DEFAULT_RESIZE_POW2) = """
351351
`resize_pow2::Bool` (default: `$(default)`): affects the way in which the returned `$(hashfn)` resizes to hash inputs of different sizes. If you think you'll be hashing inputs of many different sizes, it's more efficient to set `resize_pow2 = true`."""

src/hashes/lphash.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ L1Hash(args...; kws...) where {T} = LpHash(args...; power = 1, kws...)
8181

8282
L2Hash(args...; kws...) where {T} = LpHash(args...; power = 2, kws...)
8383

84-
LpHash(args...; dtype::DataType = DEFAULT_DTYPE, kws...) =
84+
LpHash(args...; dtype::Type = DEFAULT_DTYPE, kws...) =
8585
LpHash{dtype}(args...; kws...)
8686

8787
### Documentation for L1Hash and L2Hash
@@ -95,7 +95,7 @@ for (hashfn, power) in zip((:L1Hash, :L2Hash), (1, 2))
9595
@doc """
9696
$($hashfn)(
9797
n_hashes::Integer = $(DEFAULT_N_HASHES);
98-
dtype::DataType = $(DEFAULT_DTYPE),
98+
dtype::Type = $(DEFAULT_DTYPE),
9999
r::Real = 1.0,
100100
resize_pow2::Bool = $(DEFAULT_RESIZE_POW2)
101101
)

src/hashes/minhash.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ end
2525

2626
"""
2727
MinHash(n_hashes::Integer = $(DEFAULT_N_HASHES);
28-
dtype::DataType = Any,
28+
dtype::Type = Any,
2929
symbols::Union{Vector,Set} = Set())
3030
3131
Construct a locality-sensitive hash function for Jaccard similarity.
@@ -34,7 +34,7 @@ Construct a locality-sensitive hash function for Jaccard similarity.
3434
- $(N_HASHES_DOCSTR())
3535
3636
# Keyword parameters
37-
- `dtype::DataType` (default: `Any`): the type of symbols in the sets you're hashing. This is overriden by the data type contained in `symbols` when `symbols` is non-empty.
37+
- `dtype::Type` (default: `Any`): the type of symbols in the sets you're hashing. This is overriden by the data type contained in `symbols` when `symbols` is non-empty.
3838
- `symbols::Union{Vector,Set}`: a `Vector` or `Set` containing all of the possible elements ("symbols") of the sets that you will be hashing. If left empty, `MinHash` will instead expand its dictionary when it sees new symbols (at small additional computational expense).
3939
4040
# Examples
@@ -80,7 +80,7 @@ julia> hashfn(Set(["a", "b", "c"]));
8080
See also: [`jaccard`](@ref)
8181
"""
8282
function MinHash(args...;
83-
dtype::DataType = Any,
83+
dtype::Type = Any,
8484
symbols::C = Set{Any}()) where {T, C <: Union{Vector{T},Set{T}}}
8585

8686
if length(symbols) > 0

src/hashes/sign_alsh.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ end
2929

3030
@doc """
3131
SignALSH(n_hashes::Integer = $(DEFAULT_N_HASHES),
32-
dtype::DataType = $(DEFAULT_DTYPE),
32+
dtype::Type = $(DEFAULT_DTYPE),
3333
maxnorm::Union{Nothing,Real} = nothing,
3434
m::Integer = 3,
3535
resize_pow2::Bool = $(DEFAULT_RESIZE_POW2))

src/hashes/simhash.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ SimHash(args...; dtype = DEFAULT_DTYPE, kws...) =
3737

3838
@doc """
3939
SimHash(n_hashes::Integer = $(DEFAULT_N_HASHES);
40-
dtype::DataType = $(DEFAULT_DTYPE),
40+
dtype::Type = $(DEFAULT_DTYPE),
4141
resize_pow2::Bool = $(DEFAULT_RESIZE_POW2))
4242
4343
Creates a locality-sensitive hash function for cosine similarity.

0 commit comments

Comments
 (0)