Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NIFTy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ift
NIFTy
Commits
b8b7c28e
Commit
b8b7c28e
authored
8 years ago
by
Pumpe, Daniel (dpumpe)
Browse files
Options
Downloads
Patches
Plain Diff
Docstrings for EndomorphicOperator
parent
b596c6e9
No related branches found
No related tags found
2 merge requests
!100
Docstring operators
,
!92
Fix fft side effect
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nifty/operators/endomorphic_operator/endomorphic_operator.py
+133
-0
133 additions, 0 deletions
nifty/operators/endomorphic_operator/endomorphic_operator.py
with
133 additions
and
0 deletions
nifty/operators/endomorphic_operator/endomorphic_operator.py
+
133
−
0
View file @
b8b7c28e
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment