Skip to content

Commit

Permalink
perf(simulator): speed-up GSA computation
Browse files Browse the repository at this point in the history
  • Loading branch information
bencrts committed Dec 17, 2024
1 parent e8d3117 commit 7d2da7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion estimator/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ def GSA(d, n, q, beta, xi=1, tau=1, dual=False):
log_vol = RR(log(q, 2) * (d - n - 1) + log(xi, 2) * n + log(tau, 2))

delta = deltaf(beta)
r_log = [(d - 1 - 2 * i) * RR(log(delta, 2)) + log_vol / d for i in range(d)]
log_delta = RR(log(delta, 2))
r_log = [(d - 1 - 2 * i) * log_delta + log_vol / d for i in range(d)]
r = [2 ** (2 * r_) for r_ in r_log]
return r

Expand Down

0 comments on commit 7d2da7c

Please sign in to comment.