Package csb :: Package statistics :: Module ars :: Class Envelope

[frames] | no frames]

# Class Envelope

source code

    object --+
             |
            Envelope

Envelope function for adaptive rejection sampling.

The envelope defines a piecewise linear upper and lower bounding function of the concave log-probability.

Instance Methods

__init__(self, x, h, dh) x.__init__(...) initializes x; see help(type(x)) for signature | source code

insert(self, x, h, dh) Insert new support point for lower bounding function (and indirectly for upper bounding function). | source code

l(self, x) Piecewise linear lower bounding function. | source code

log_masses(self) | source code

masses(self) | source code

sample(self) | source code

u(self, x) Piecewise linear upper bounding function. | source code

u_max(self) | source code

z(self) Support intervals for upper bounding function. | source code

Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, x, h, dh)
(Constructor)

source code

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
  (inherited documentation)