@@ -52,9 +52,9 @@ function cheb_coefficients(f, N)
52
52
dct (fx) * √ (1 / (2 N))
53
53
end
54
54
55
- function get_cheb_coefficients (interval:: RealInterval , f)
55
+ function get_cheb_coefficients (interval:: RealInterval , f; n_coeffs :: Integer = 1024 )
56
56
f_ = squash_function (interval, f)
57
- coeff = cheb_coefficients (f_, 1024 )
57
+ coeff = cheb_coefficients (f_, n_coeffs )
58
58
coeff .* width (interval)
59
59
end
60
60
@@ -90,18 +90,18 @@ collision_probability(hashfn::ChebHash, args...; kws...) =
90
90
Hash computation
91
91
===============#
92
92
93
- function (hashfn:: ChebHash{:Chebyshev} )(f)
94
- coeff = get_cheb_coefficients (hashfn. interval, f)
93
+ function (hashfn:: ChebHash{:Chebyshev} )(f; kws ... )
94
+ coeff = get_cheb_coefficients (hashfn. interval, f, kws ... )
95
95
hashfn. discrete_hashfn (coeff)
96
96
end
97
97
98
- function index_hash (hashfn:: ChebHash{:Chebyshev} , f)
99
- coeff = get_cheb_coefficients (hashfn. interval, f)
98
+ function index_hash (hashfn:: ChebHash{:Chebyshev} , f; kws ... )
99
+ coeff = get_cheb_coefficients (hashfn. interval, f; kws ... )
100
100
index_hash (hashfn. discrete_hashfn, coeff)
101
101
end
102
102
103
103
function query_hash (hashfn:: ChebHash{:Chebyshev} , f)
104
- coeff = get_cheb_coefficients (hashfn. interval, f)
104
+ coeff = get_cheb_coefficients (hashfn. interval, f; kws ... )
105
105
query_hash (hashfn. discrete_hashfn, coeff)
106
106
end
107
107
0 commit comments