Commit fd90fdc1 authored by Philipp Arras's avatar Philipp Arras
Browse files

Readability

parent 2bc0a415
......@@ -47,9 +47,9 @@ class GaussianEnergy(Energy):
@property
@memo
def value(self):
if self._cov is not None:
return .5 * self.residual.vdot(self._cov.inverse(self.residual)).real
return .5 * self.residual.vdot(self.residual).real
if self._cov is None:
return .5 * self.residual.vdot(self.residual).real
return .5 * self.residual.vdot(self._cov.inverse(self.residual)).real
@property
@memo
......@@ -59,9 +59,9 @@ class GaussianEnergy(Energy):
@property
@memo
def gradient(self):
if self._cov is not None:
return self._gradient_helper.adjoint(self._cov.inverse(self.residual))
return self._gradient_helper.adjoint(self.residual)
if self._cov is None:
return self._gradient_helper.adjoint(self.residual)
return self._gradient_helper.adjoint(self._cov.inverse(self.residual))
@property
@memo
......
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