mirror of
https://github.com/vale981/bachelor_thesis
synced 2025-03-05 17:41:41 -05:00
ad a convenience property to IntegrationResult
This commit is contained in:
parent
9cf85f844a
commit
f69ae2151b
1 changed files with 8 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue