Commit 39ad1057 authored by alexander.dornheim's avatar alexander.dornheim
Browse files

Fixed various errors in HAAR, Q_Heau

parent ba5694eb
......@@ -33,6 +33,7 @@ from numpy import zeros, shape
from scipy.linalg import norm
from .algorithms import Algorithm
from proxtoolbox import Algorithms
from proxtoolbox import ProxOperators
class HAAR(Algorithm):
......@@ -91,6 +92,8 @@ class HAAR(Algorithm):
self.diagnostic = False
self.y0 = config['u_0']
self.Q_Heau = getattr(ProxOperators, "Q_Heau")
self.mu = config['beta_0']
def run(self, u, tol, maxiter):
"""
......@@ -160,7 +163,7 @@ class HAAR(Algorithm):
elif dim_number == 4:
print('not ready for 4D arrays')
y_new=feval('Q_Heau',y0,tmp_y,(1-mu)*tmp_y+mu*Ty)
y_new = self.Q_Heau.work(y0,tmp_y,(1-self.mu)*tmp_y+self.mu*Ty)
if dim_number == 2 and (n!=1) and (m!=1):
y_new = y_new.reshape((m,n))
......
......@@ -671,9 +671,11 @@ class P_block_sequential_hyperplane(ProxOperator):
#
# Nonstandard Matlab function calls: none
from numpy import real, imag
class Q_Heau(ProxOperator):
def run(x,y,z):
def work(x,y,z):
xsi = real((y-z).T @ (x-y))+imag((y-z).T @ (x-y))
eta = (x-y).T @ (x-y)
......
Supports Markdown
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