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

Docstrings for EndomorphicOperator

parent b596c6e9
......@@ -23,9 +23,73 @@ from nifty.operators.linear_operator import LinearOperator
class EndomorphicOperator(LinearOperator):
"""NIFTY class for endomorphic operators.
The NIFTY EndomorphicOperator class is a class derived from the
LinearOperator. Domain and target are the same in any EndomorphicOperator.
Prominent other specific operator subclasses, in NIFTy are
(e.g. DiagonalOperator, SmoothingOperator,
PropagatorOperator).
Parameters
----------
Attributes
----------
domain : NIFTy.space
The NIFTy.space in which the operator is defined.
target : NIFTy.space
The NIFTy.space in which the outcome of the operator lives.
As the Operator is endomorphic this is the same as its domain.
self_adjoint : boolean
Indicates whether the operator is self_adjoint or not
Raises
------
NotImplementedError
Raised if
* self_adjoint is not defined
Notes
-----
Examples
--------
See Also
--------
DiagonalOperator, SmoothingOperator,
PropagatorOperator
"""
# ---Overwritten properties and methods---
def inverse_times(self, x, spaces=None):
""" Applies the inverse-Operator to a given Field.
Operator and Field have to live over the same domain.
Parameters
----------
x : NIFTY.Field
applies the Operator to the given Field
spaces : integer (default: None)
defines on which space of the given Field the Operator acts
**kwargs
Additional keyword arguments get passed to the used copy_empty
routine.
Returns
-------
out : NIFTy.Field
the processed Field living on the domain space
See Also
--------
"""
if self.self_adjoint and self.unitary:
return self.times(x, spaces)
else:
......@@ -34,6 +98,29 @@ class EndomorphicOperator(LinearOperator):
spaces=spaces)
def adjoint_times(self, x, spaces=None):
""" Applies the adjoint-Operator to a given Field.
Operator and Field have to live over the same domain.
Parameters
----------
x : NIFTY.Field
applies the Operator to the given Field
spaces : integer (default: None)
defines on which space of the given Field the Operator acts
**kwargs
Additional keyword arguments get passed to the used copy_empty
routine.
Returns
-------
out : NIFTy.Field
the processed Field living on the domain space
See Also
--------
"""
if self.self_adjoint:
return self.times(x, spaces)
else:
......@@ -42,6 +129,29 @@ class EndomorphicOperator(LinearOperator):
spaces=spaces)
def adjoint_inverse_times(self, x, spaces=None):
""" Applies the adjoint-inverse-Operator to a given Field.
Operator and Field have to live over the same domain.
Parameters
----------
x : NIFTY.Field
applies the Operator to the given Field
spaces : integer (default: None)
defines on which space of the given Field the Operator acts
**kwargs
Additional keyword arguments get passed to the used copy_empty
routine.
Returns
-------
out : NIFTy.Field
the processed Field living on the domain space
See Also
--------
"""
if self.self_adjoint:
return self.inverse_times(x, spaces)
else:
......@@ -50,6 +160,29 @@ class EndomorphicOperator(LinearOperator):
spaces=spaces)
def inverse_adjoint_times(self, x, spaces=None):
""" Applies the inverse-adjoint-Operator to a given Field.
Operator and Field have to live over the same domain.
Parameters
----------
x : NIFTY.Field
applies the Operator to the given Field
spaces : integer (default: None)
defines on which space of the given Field the Operator acts
**kwargs
Additional keyword arguments get passed to the used copy_empty
routine.
Returns
-------
out : NIFTy.Field
the processed Field living on the domain space
See Also
--------
"""
if self.self_adjoint:
return self.inverse_times(x, spaces)
else:
......
Markdown is supported
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