The OpenD Programming Language

flex

The Transformed Density Rejection with Inflection Points (Flex) algorithm can sample from arbitrary distributions given its density function f, its first two derivatives and a partitioning into intervals with at most one inflection point. The partitioning needs to be mutually exclusive and sorted.

Parameters

f0 F0

logarithmic pdf

f1 F1

first derivative of logarithmic pdf

f2 F2

second derivative of logarithmic pdf

c S
points S[]

non-overlapping partitioning with at most one inflection point per interval

rho S

efficiency of the Flex algorithm

maxApproxPoints int

maximal number of points to use for the hat/squeeze approximation

Return Value

Type: auto

Flex Generator.

Meta