Commit 63eeb81b authored by Philipp Frank's avatar Philipp Frank
Browse files

Merge branch 'NIFTy_4' into yango_minimizer

needed second hotfix
parents 7af09d12 62c29c55
Pipeline #27935 passed with stage
in 1 minute and 45 seconds
......@@ -65,13 +65,13 @@ def generate_krylov_samples(D_inv, S, j, N_samps, controller):
r = j.copy()
p = r.copy()
d = p.vdot(D_inv(p))
Dip = D_inv(p)
d = p.vdot(Dip)
while True:
gamma = r.vdot(r) / d
if gamma == 0.:
break
x = x + gamma*p
Dip = D_inv(p)
for samp in y:
samp += (np.random.randn() * np.sqrt(d) - samp.vdot(Dip)) / d * p
energy = energy.at(x)
......@@ -82,6 +82,7 @@ def generate_krylov_samples(D_inv, S, j, N_samps, controller):
beta = r_new.vdot(r_new) / r.vdot(r)
r = r_new
p = r + beta * p
Dip = D_inv(p)
d = p.vdot(Dip)
if d == 0.:
break
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment