From e10e275940abe7894c666e5cb8eefdd8051772b9 Mon Sep 17 00:00:00 2001 From: Martin Reinecke Date: Fri, 28 Apr 2017 12:02:19 +0200 Subject: [PATCH] symmetric->self_adjoint --- .../operators/diagonal_operator/diagonal_operator.py | 12 ++++++------ .../endomorphic_operator/endomorphic_operator.py | 10 +++++----- .../projection_operator/projection_operator.py | 2 +- .../propagator_operator/propagator_operator.py | 2 +- .../smoothing_operator/smoothing_operator.py | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/nifty/operators/diagonal_operator/diagonal_operator.py b/nifty/operators/diagonal_operator/diagonal_operator.py index 57c0414b..a7d678ac 100644 --- a/nifty/operators/diagonal_operator/diagonal_operator.py +++ b/nifty/operators/diagonal_operator/diagonal_operator.py @@ -105,10 +105,10 @@ class DiagonalOperator(EndomorphicOperator): return self._implemented @property - def symmetric(self): - if self._symmetric is None: - self._symmetric = (self._diagonal.val.imag == 0).all() - return self._symmetric + def self_adjoint(self): + if self._self_adjoint is None: + self._self_adjoint = (self._diagonal.val.imag == 0).all() + return self._self_adjoint @property def unitary(self): @@ -155,8 +155,8 @@ class DiagonalOperator(EndomorphicOperator): # Otherwise, inplace weightening would change the external field f.weight(inplace=copy, power=-1) - # Reset the symmetric property: - self._symmetric = None + # Reset the self_adjoint property: + self._self_adjoint = None # Reset the unitarity property self._unitary = None diff --git a/nifty/operators/endomorphic_operator/endomorphic_operator.py b/nifty/operators/endomorphic_operator/endomorphic_operator.py index 897cb51e..0d9cc49c 100644 --- a/nifty/operators/endomorphic_operator/endomorphic_operator.py +++ b/nifty/operators/endomorphic_operator/endomorphic_operator.py @@ -26,7 +26,7 @@ class EndomorphicOperator(LinearOperator): # ---Overwritten properties and methods--- def inverse_times(self, x, spaces=None): - if self.symmetric and self.unitary: + if self.self_adjoint and self.unitary: return self.times(x, spaces) else: return super(EndomorphicOperator, self).inverse_times( @@ -34,7 +34,7 @@ class EndomorphicOperator(LinearOperator): spaces=spaces) def adjoint_times(self, x, spaces=None): - if self.symmetric: + if self.self_adjoint: return self.times(x, spaces) else: return super(EndomorphicOperator, self).adjoint_times( @@ -42,7 +42,7 @@ class EndomorphicOperator(LinearOperator): spaces=spaces) def adjoint_inverse_times(self, x, spaces=None): - if self.symmetric: + if self.self_adjoint: return self.inverse_times(x, spaces) else: return super(EndomorphicOperator, self).adjoint_inverse_times( @@ -50,7 +50,7 @@ class EndomorphicOperator(LinearOperator): spaces=spaces) def inverse_adjoint_times(self, x, spaces=None): - if self.symmetric: + if self.self_adjoint: return self.inverse_times(x, spaces) else: return super(EndomorphicOperator, self).inverse_adjoint_times( @@ -66,5 +66,5 @@ class EndomorphicOperator(LinearOperator): # ---Added properties and methods--- @abc.abstractproperty - def symmetric(self): + def self_adjoint(self): raise NotImplementedError diff --git a/nifty/operators/projection_operator/projection_operator.py b/nifty/operators/projection_operator/projection_operator.py index 450a65e0..26e49154 100644 --- a/nifty/operators/projection_operator/projection_operator.py +++ b/nifty/operators/projection_operator/projection_operator.py @@ -112,5 +112,5 @@ class ProjectionOperator(EndomorphicOperator): return self._unitary @property - def symmetric(self): + def self_adjoint(self): return True diff --git a/nifty/operators/propagator_operator/propagator_operator.py b/nifty/operators/propagator_operator/propagator_operator.py index 2f6faa3b..f0ded80a 100644 --- a/nifty/operators/propagator_operator/propagator_operator.py +++ b/nifty/operators/propagator_operator/propagator_operator.py @@ -79,7 +79,7 @@ class PropagatorOperator(InvertibleOperatorMixin, EndomorphicOperator): return True @property - def symmetric(self): + def self_adjoint(self): return True @property diff --git a/nifty/operators/smoothing_operator/smoothing_operator.py b/nifty/operators/smoothing_operator/smoothing_operator.py index a6ee75a5..76e5ec4b 100644 --- a/nifty/operators/smoothing_operator/smoothing_operator.py +++ b/nifty/operators/smoothing_operator/smoothing_operator.py @@ -58,7 +58,7 @@ class SmoothingOperator(EndomorphicOperator): return True @property - def symmetric(self): + def self_adjoint(self): return True @property -- GitLab