summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py17
1 files changed, 4 insertions, 13 deletions
diff --git a/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py b/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py
index 6cb3d8a..df38f15 100644
--- a/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py
@@ -19,6 +19,7 @@
from ccpi.optimisation.functions import Function
from ccpi.optimisation.functions.ScaledFunction import ScaledFunction
+from ccpi.optimisation.functions import FunctionOperatorComposition
class L2NormSquared(Function):
@@ -95,20 +96,10 @@ class L2NormSquared(Function):
else:
tmp = x.subtract(self.b)
-# 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:
@@ -149,9 +140,9 @@ class L2NormSquared(Function):
return ScaledFunction(self, scalar)
- def operator_composition(self, operator):
+ def composition(self, operator):
- return FunctionOperatorComposition
+ return FunctionOperatorComposition(operator)