Skip to content

Commit ed70483

Browse files
committed
Add tests to ensure that the similarity function used by SignALSH and MIPSHash is inner_prod.
1 parent e3c757b commit ed70483

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

test/hashes/test_mips_hash.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Tests
1616

1717
@test n_hashes(hashfn) == 1
1818
@test hashtype(hashfn) == Vector{Int32}
19+
@test similarity(hashfn) == inner_prod
1920
@test isa(hashfn, MIPSHash{Float32}) # Default dtype should be Float32
2021
@test isa(hashfn, LSH.AsymmetricLSHFunction)
2122

test/hashes/test_sign_alsh.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Tests
1414
@test isa(hashfn, SignALSH{Float32})
1515
@test isa(hashfn, LSH.AsymmetricLSHFunction)
1616
@test hashtype(hashfn) == BitArray{1}
17+
@test similarity(hashfn) == inner_prod
1718

1819
hashfn = SignALSH(32; maxnorm=1)
1920
@test n_hashes(hashfn) == 32

0 commit comments

Comments
 (0)