ad a convenience property to IntegrationResult

This commit is contained in:
hiro98 2020-04-08 13:21:28 +02:00
parent 9cf85f844a
commit f69ae2151b

View file

@ -22,6 +22,14 @@ class IntegrationResult:
sigma: float
N: int
@property
def combined_result(self):
"""
Get the result and accuracy combined as tuple.
"""
return self.result, self.sigma
def integrate(f, interval, epsilon=.01,
seed=None, **kwargs) -> IntegrationResult:
"""Monte-Carlo integrates the functin `f` in an interval.