From 81f6aae31853cc431d439e55b7cb345e384d6400 Mon Sep 17 00:00:00 2001 From: epapoutsellis Date: Mon, 29 Apr 2019 16:21:55 +0100 Subject: minor fix --- .../Python/ccpi/optimisation/functions/L2NormSquared.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'Wrappers/Python') 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) -- cgit v1.2.3