Developer docs
ARSampling.AllocFreeWeightsARSampling.__sample!ARSampling.add_segment!ARSampling.calc_domain_integral_expARSampling.eval_hullARSampling.exp_integral_lineARSampling.intersectionARSampling.line
ARSampling.AllocFreeWeights — Type
struct AllocFreeWeights{S<:Real, T<:Number, V<:AbstractArray{T<:Number, 1}} <: StatsBase.AbstractWeights{S<:Real, T<:Number, V<:AbstractArray{T<:Number, 1}}Non-mutable weights used in the sample function in this package in order to avoid allocations.
values::AbstractVector{T} where T<:Numbersum::Real
ARSampling.__sample! — Method
__sample!(rng::AbstractRNG, out::AbstractVector{T}, s::ARSampler{T}, add_segments::Bool, max_segments) where {T<:AbstractFloat}All other __sample! methods call this one.
ARSampling.add_segment! — Method
add_segment!(
s::ARSampling.ARSampler{T<:AbstractFloat},
x::AbstractFloat
)
Modifies the hulls of s, adding a segment with at x.
ARSampling.calc_domain_integral_exp — Method
calc_domain_integral_exp(hull::UpperHull)Calculate the domain integral of hull.
ARSampling.eval_hull — Method
Eval hull h at x.
ARSampling.exp_integral_line — Method
exp_integral_line(slope, intercept, x1, x2)Calculate the integral of exp(slope * x + intercept) between x1 and x2. Handles a slope of 0.
ARSampling.intersection — Method
Returns the intersection abscissa between 2 lines as defined by their slopes and intercepts. Returns NaN if the lines are paralell.
ARSampling.line — Method
Get line i from the hull. Returns a tuple consisting of (slope, intercept).