@@ -52,9 +52,9 @@ function cheb_coefficients(f, N)
5252 dct (fx) * √ (1 / (2 N))
5353end
5454
55- function get_cheb_coefficients (interval:: RealInterval , f)
55+ function get_cheb_coefficients (interval:: RealInterval , f; n_coeffs :: Integer = 1024 )
5656 f_ = squash_function (interval, f)
57- coeff = cheb_coefficients (f_, 1024 )
57+ coeff = cheb_coefficients (f_, n_coeffs )
5858 coeff .* width (interval)
5959end
6060
@@ -90,18 +90,18 @@ collision_probability(hashfn::ChebHash, args...; kws...) =
9090Hash computation
9191===============#
9292
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 ... )
9595 hashfn. discrete_hashfn (coeff)
9696end
9797
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 ... )
100100 index_hash (hashfn. discrete_hashfn, coeff)
101101end
102102
103103function query_hash (hashfn:: ChebHash{:Chebyshev} , f)
104- coeff = get_cheb_coefficients (hashfn. interval, f)
104+ coeff = get_cheb_coefficients (hashfn. interval, f; kws ... )
105105 query_hash (hashfn. discrete_hashfn, coeff)
106106end
107107
0 commit comments