diff options
author | Edoardo Pasca <edo.paskino@gmail.com> | 2018-10-18 17:05:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-18 17:05:44 +0100 |
commit | 2d09420d881427f96ed951f6a020b1980fc1860f (patch) | |
tree | a0876a9945aaf343fe75e246f1a3fd7ca98ef94a /Wrappers/Python | |
parent | 1e9c45fc518cca8f40139ed6a4de299375a1c7ce (diff) | |
download | framework-2d09420d881427f96ed951f6a020b1980fc1860f.tar.gz framework-2d09420d881427f96ed951f6a020b1980fc1860f.tar.bz2 framework-2d09420d881427f96ed951f6a020b1980fc1860f.tar.xz framework-2d09420d881427f96ed951f6a020b1980fc1860f.zip |
removed default behaviour of Function as Identity (#155)
addresses this loophole https://github.com/CCPPETMR/Hackathon-SIRF/issues/12#issuecomment-430944064
Diffstat (limited to 'Wrappers/Python')
-rwxr-xr-x | Wrappers/Python/ccpi/optimisation/funcs.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Wrappers/Python/ccpi/optimisation/funcs.py b/Wrappers/Python/ccpi/optimisation/funcs.py index 490d742..c105236 100755 --- a/Wrappers/Python/ccpi/optimisation/funcs.py +++ b/Wrappers/Python/ccpi/optimisation/funcs.py @@ -38,12 +38,12 @@ def isSizeCorrect(data1 ,data2): class Function(object): def __init__(self): - self.op = Identity() - def __call__(self,x, out=None): return 0 - def grad(self, x): return 0 - def prox(self, x, tau): return x - def gradient(self, x, out=None): return self.grad(x) - def proximal(self, x, tau, out=None): return self.prox(x, tau) + pass + def __call__(self,x, out=None): raise NotImplementedError + def grad(self, x): raise NotImplementedError + def prox(self, x, tau): raise NotImplementedError + def gradient(self, x, out=None): raise NotImplementedError + def proximal(self, x, tau, out=None): raise NotImplementedError class Norm2(Function): |