From 431fa3b33d965cbf86f3b33d819427700af4bedd Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Mon, 30 May 2022 11:16:30 +0200 Subject: [PATCH] Updated Custom and LogCustom classes' docstring --- cara/monte_carlo/sampleable.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cara/monte_carlo/sampleable.py b/cara/monte_carlo/sampleable.py index fab478e0..fe6e72d3 100644 --- a/cara/monte_carlo/sampleable.py +++ b/cara/monte_carlo/sampleable.py @@ -62,7 +62,9 @@ class Custom(SampleableDistribution): """ Defines a distribution which follows a custom curve vs. the random variable. Uses a simple algorithm. This is appropriate for a smooth - distribution function (one should know its maximum). + distribution function. + Note: in max_function, a value slightly above the maximum of the distribution + function should be provided. """ def __init__(self, bounds: typing.Tuple[float, float], function: typing.Callable, max_function: float): @@ -84,9 +86,11 @@ class Custom(SampleableDistribution): class LogCustom(SampleableDistribution): """ - Defines a distribution which follows a custom curve vs. the the log (in base 10) + Defines a distribution which follows a custom curve vs. the log (in base 10) of the random variable. Uses a simple algorithm. This is appropriate for a smooth - distribution function (one should know its maximum). + distribution function. + Note: in max_function, a value slightly above the maximum of the distribution + function should be provided. """ def __init__(self, bounds: typing.Tuple[float, float], function: typing.Callable, max_function: float):