Commit 47b3116a authored by Pumpe, Daniel (dpumpe)'s avatar Pumpe, Daniel (dpumpe)
Browse files

Merge branch 'master' of gitlab.mpcdf.mpg.de:ift/NIFTy into Docstring_Operators

# Conflicts:
#	nifty/operators/linear_operator/linear_operator.py
parents 9580b98a 5c5cbda2
......@@ -17,6 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import abc
from nifty.nifty_meta import NiftyMeta
from keepers import Loggable
from nifty.field import Field
......@@ -24,6 +25,7 @@ import nifty.nifty_utilities as utilities
class LinearOperator(Loggable, object):
__metaclass__ = NiftyMeta
"""NIFTY base class for linear operators.
The base NIFTY operator class is an abstract class from which
......@@ -88,10 +90,6 @@ class LinearOperator(Loggable, object):
def target(self):
raise NotImplementedError
@abc.abstractproperty
def implemented(self):
raise NotImplementedError
@abc.abstractproperty
def unitary(self):
raise NotImplementedError
......@@ -126,9 +124,6 @@ class LinearOperator(Loggable, object):
spaces = self._check_input_compatibility(x, spaces)
if not self.implemented:
x = x.weight(spaces=spaces)
y = self._times(x, spaces, **kwargs)
return y
......@@ -160,8 +155,6 @@ class LinearOperator(Loggable, object):
spaces = self._check_input_compatibility(x, spaces, inverse=True)
y = self._inverse_times(x, spaces, **kwargs)
if not self.implemented:
y = y.weight(power=-1, spaces=spaces)
return y
def adjoint_times(self, x, spaces=None, **kwargs):
......@@ -193,8 +186,6 @@ class LinearOperator(Loggable, object):
spaces = self._check_input_compatibility(x, spaces, inverse=True)
if not self.implemented:
x = x.weight(spaces=spaces)
y = self._adjoint_times(x, spaces, **kwargs)
return y
......@@ -228,8 +219,6 @@ class LinearOperator(Loggable, object):
spaces = self._check_input_compatibility(x, spaces)
y = self._adjoint_inverse_times(x, spaces, **kwargs)
if not self.implemented:
y = y.weight(power=-1, spaces=spaces)
return y
def inverse_adjoint_times(self, x, spaces=None, **kwargs):
......@@ -262,8 +251,6 @@ class LinearOperator(Loggable, object):
spaces = self._check_input_compatibility(x, spaces)
y = self._inverse_adjoint_times(x, spaces)
if not self.implemented:
y = y.weight(power=-1, spaces=spaces)
return y
def _times(self, x, spaces):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment