nifty8.operators.linear_operator module#
- class LinearOperator[source]#
Bases:
Operator
NIFTY base class for linear operators.
The base NIFTY operator class is an abstract class from which other specific operator subclasses are derived.
- Variables:
TIMES (int) – Symbolic constant representing normal operator application
ADJOINT_TIMES (int) – Symbolic constant representing adjoint operator application
INVERSE_TIMES (int) – Symbolic constant representing inverse operator application
ADJOINT_INVERSE_TIMES (int) – Symbolic constant representing adjoint inverse operator application
INVERSE_ADJOINT_TIMES (int) – same as ADJOINT_INVERSE_TIMES
Notes
The symbolic constants for the operation modes can be combined by the “bitwise-or” operator “|”, for expressing the capability of the operator by means of a single integer number.
- ADJOINT_BIT = 1#
- ADJOINT_INVERSE_TIMES = 8#
- ADJOINT_TIMES = 2#
- INVERSE_ADJOINT_TIMES = 8#
- INVERSE_BIT = 2#
- INVERSE_TIMES = 4#
- TIMES = 1#
- property adjoint#
the adjoint of self
Returns a LinearOperator object which behaves as if it were the adjoint of this operator.
- Type:
- adjoint_inverse_times(x)[source]#
Applies the adjoint-inverse Operator to a given Field.
- Parameters:
x (
nifty8.field.Field
) – The input Field, defined on the Operator’s domain.- Returns:
The processed Field defined on the Operator’s target domain.
- Return type:
Notes
If the operator has an inverse then the inverse adjoint is identical to the adjoint inverse. We provide both names for convenience.
- adjoint_times(x)[source]#
Applies the adjoint-Operator to a given Field.
- Parameters:
x (
nifty8.field.Field
) – The input Field, defined on the Operator’s target domain- Returns:
The processed Field defined on the Operator’s domain.
- Return type:
- apply(x, mode)[source]#
Applies the Operator to a given x, in a specified mode.
- Parameters:
x (
nifty8.field.Field
) – The input Field, defined on the Operator’s domain or target, depending on mode.mode (int) –
TIMES
: normal applicationADJOINT_TIMES
: adjoint applicationINVERSE_TIMES
: inverse applicationADJOINT_INVERSE_TIMES
orINVERSE_ADJOINT_TIMES
: adjoint inverse application
- Returns:
The processed Field defined on the Operator’s target or domain, depending on mode.
- Return type:
- property capability#
the supported operation modes
Returns the supported subset of
TIMES
,ADJOINT_TIMES
,INVERSE_TIMES
, andADJOINT_INVERSE_TIMES
, joined together by the “|” operator.- Type:
int
- property inverse#
the inverse of self
Returns a LinearOperator object which behaves as if it were the inverse of this operator.
- Type:
- inverse_adjoint_times(x)[source]#
Same as
adjoint_inverse_times()
- inverse_times(x)[source]#
Applies the inverse Operator to a given Field.
- Parameters:
x (
nifty8.field.Field
) – The input Field, defined on the Operator’s target domain- Returns:
The processed Field defined on the Operator’s domain.
- Return type:
- times(x)[source]#
Applies the Operator to a given Field.
- Parameters:
x (
nifty8.field.Field
) – The input Field, defined on the Operator’s domain.- Returns:
The processed Field defined on the Operator’s target domain.
- Return type: