From 400e63f834f48b2e557e9cb1a71723d9253008a3 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 31 Jul 2018 14:52:52 +0100 Subject: added alias to prox and grad (#130) --- Wrappers/Python/ccpi/optimisation/funcs.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Wrappers/Python/ccpi/optimisation/funcs.py b/Wrappers/Python/ccpi/optimisation/funcs.py index f5463a3..90bc9e3 100755 --- a/Wrappers/Python/ccpi/optimisation/funcs.py +++ b/Wrappers/Python/ccpi/optimisation/funcs.py @@ -24,9 +24,11 @@ import numpy class Function(object): def __init__(self): self.op = Identity() - def __call__(self,x): return 0 - def grad(self,x): return 0 - def prox(self,x,tau): return x + def __call__(self,x): return 0 + def grad(self, x): return 0 + def prox(self, x, tau): return x + def gradient(self, x): return self.grad(x) + def proximal(self, x, tau): return self.prox(x, tau) class Norm2(Function): -- cgit v1.2.3