From b55208551c32a0e9e1ccf01c88083889d4179a40 Mon Sep 17 00:00:00 2001
From: epapoutsellis <epapoutsellis@gmail.com>
Date: Mon, 15 Apr 2019 18:15:36 +0100
Subject:  proximal is not working properly

---
 .../ccpi/optimisation/functions/L2NormSquared.py    | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

(limited to 'Wrappers')

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:
-- 
cgit v1.2.3