Hull¶
-
arspy.hull.
compute_hulls
(S, fS, domain)¶ (Re-)compute upper and lower hull given the segment points S with function values fS and the domain of the logpdf.
Parameters: - S : np.ndarray (N, 1)
Straight-line segment points accumulated thus far.
- fS : tuple
Value of the logpdf under sampling for each of the given segment points in S.
- domain : Tuple[float, float]
Domain of logpdf. May be unbounded on either or both sides, in which case (float(“-inf”), float(“inf”)) would be passed. If this domain is unbounded to the left, the derivative of the logpdf for x<= a must be positive. If this domain is unbounded to the right the derivative of the logpdf for x>=b must be negative.
Returns: - lower_hull: List[arspy.hull.HullNode]
- upper_hull: List[arspy.hull.HullNode]
-
arspy.hull.
sample_upper_hull
(upper_hull, random_stream)¶ Return a single value randomly sampled from the given upper_hull.
Parameters: - upper_hull : List[pyars.hull.HullNode]
Upper hull to evaluate.
- random_stream : numpy.random.RandomState
(Seeded) stream of random values to use during sampling.
Returns: - sample : float
Single value randomly sampled from upper_hull.