summaryrefslogtreecommitdiffstats
path: root/Wrappers
diff options
context:
space:
mode:
authorepapoutsellis <epapoutsellis@gmail.com>2019-04-15 18:15:36 +0100
committerepapoutsellis <epapoutsellis@gmail.com>2019-04-15 18:15:36 +0100
commitb55208551c32a0e9e1ccf01c88083889d4179a40 (patch)
tree98756779550912e122df4708ac6caa101282e0bd /Wrappers
parent2829b616b9cd5a63827741ac4a63845a6b935870 (diff)
downloadframework-b55208551c32a0e9e1ccf01c88083889d4179a40.tar.gz
framework-b55208551c32a0e9e1ccf01c88083889d4179a40.tar.bz2
framework-b55208551c32a0e9e1ccf01c88083889d4179a40.tar.xz
framework-b55208551c32a0e9e1ccf01c88083889d4179a40.zip
proximal is not working properly
Diffstat (limited to 'Wrappers')
-rw-r--r--Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py21
1 files changed, 18 insertions, 3 deletions
diff --git a/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py b/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py
index 2ac11ee..1946d67 100644
--- a/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py
@@ -89,10 +89,25 @@ class L2NormSquared(Function):
'''
if out is None:
- if self.b is not None:
- return (x - self.b)/(1+2*tau) + self.b
- else:
+
+ if self.b is None:
return x/(1+2*tau)
+ else:
+ tmp = x
+ tmp -= self.b
+ tmp /= (1+2*tau)
+ tmp += self.b
+ return tmp
+# return (x-self.b)/(1+2*tau) + self.b
+
+# if self.b is not None:
+# out=x
+# if self.b is not None:
+# out -= self.b
+# out /= (1+2*tau)
+# if self.b is not None:
+# out += self.b
+# return out
else:
out.fill(x)
if self.b is not None: