summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python
diff options
context:
space:
mode:
authorepapoutsellis <epapoutsellis@gmail.com>2019-04-29 16:21:55 +0100
committerepapoutsellis <epapoutsellis@gmail.com>2019-04-29 16:21:55 +0100
commit81f6aae31853cc431d439e55b7cb345e384d6400 (patch)
treec7dcc1ebc1309588fb0b1e5ead3ae334800444bd /Wrappers/Python
parenta1a3483b5ab328a54815d6bc8066c0c49af91655 (diff)
downloadframework-81f6aae31853cc431d439e55b7cb345e384d6400.tar.gz
framework-81f6aae31853cc431d439e55b7cb345e384d6400.tar.bz2
framework-81f6aae31853cc431d439e55b7cb345e384d6400.tar.xz
framework-81f6aae31853cc431d439e55b7cb345e384d6400.zip
minor fix
Diffstat (limited to 'Wrappers/Python')
-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)