Commit 13006f60 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

move draw_sample() from LinearOperator to EndomorphicOperator

parent 37e802de
Pipeline #26480 passed with stage
in 5 minutes and 19 seconds
......@@ -34,3 +34,16 @@ class EndomorphicOperator(LinearOperator):
Returns `self.domain`, because this is also the target domain
for endomorphic operators."""
return self.domain
def draw_sample(self):
"""Generate a zero-mean sample
Generates a sample from a Gaussian distribution with zero mean and
covariance given by the operator.
Returns
-------
Field
A sample from the Gaussian of given covariance.
"""
raise NotImplementedError
......@@ -264,16 +264,3 @@ class LinearOperator(NiftyMetaBase()):
self._check_mode(mode)
if x.domain != self._dom(mode):
raise ValueError("The operator's and field's domains don't match.")
def draw_sample(self):
"""Generate a zero-mean sample
Generates a sample from a Gaussian distribution with zero mean and
covariance given by the operator.
Returns
-------
Field
A sample from the Gaussian of given covariance.
"""
raise NotImplementedError
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