MissedEventsG

class DCProgs::MissedEventsG

Implementation of recursion for exact missed-event G function.

Implements the exact-missed event probability calculations, as detailed in Hawkes, Jalali, and Colquhoun (1990). Specifically, this is equation 3.2.

Inherits from DCProgs::ExactSurvivor, DCProgs::ApproxSurvivor

Public Functions

MissedEventsG(DeterminantEq const &_af, std::vector<Root> const &_roots_af, DeterminantEq const &_fa, std::vector<Root> const &_roots_fa, t_uint _nmax = 3)

Initializes missed events G functor.

Parameters
  • _af -

    Determinant equation for af.

  • _fa -

    Determinant equation for af.

  • _roots_af -

    Roots of determinant equation for af

  • _roots_fa -

    Roots of determinant equation for fa

  • _nmax -

    Switches to asymptotic values after \(t\geq n_{\mathrm{max}}\tau\)

MissedEventsG(QMatrix const &_qmatrix, t_real _tau, t_RootFinder const &_findroots, t_uint _nmax = 3)

Initializes missed events functor.

Uses input root finding function to determine roots.

Parameters
  • _qmatrix -

    Transition matrix

  • _tau -

    resolution/max length missed events

  • _findroots -

    A functor with which to find all roots. This function should take a DeterminantEq as its sole argument and return a std::vector<DCProgs::RootInterval>

  • _nmax -

    Switches to asymptotic values after \(t\geq n_{\mathrm{max}}\tau\)

MissedEventsG(QMatrix const &_qmatrix, t_real _tau, t_uint _nmax = 3, t_real _xtol = 1e-12, t_real _rtol = 1e-12, t_uint _itermax = 100, t_real _lowerbound = quiet_nan, t_real _upperbound = quiet_nan)

Initializes missed-events functor.

Parameters
  • _qmatrix -

    Transition matrix

  • _tau -

    resolution/max length missed events

  • _nmax -

    Switches to asymptotic values after \(t\geq n_{\mathrm{max}}\tau\)

  • _xtol -

    Tolerance for interval size

  • _rtol -

    Tolerance for interval size. The convergence criteria is an affine function of the root: \(x_{\mathrm{tol}} + r_{\mathrm{tol}} x_{\mathrm{current}} = \frac{1}{2}|x_a - x_b|\).

  • _itermax -

    maximum number of iterations for any of the three steps.

  • _lowerbound -

    Lower bound of the interval bracketing all roots. If None, the lower bound is obtained from find_lower_bound_for_roots().

  • _upperbound -

    Upper bound of the interval bracketing all roots. If None, the upper bound is obtained from find_upper_bound_for_roots().

MissedEventsG(MissedEventsG &&_c)

Move constructor.

t_rmatrix af(t_real _t) const

Open to close transitions.

t_rmatrix fa(t_real _t) const

Close to open transitions.

t_rmatrix survivor_af(t_real _t) const

Probability of no shut times detected between 0 and t.

t_rmatrix survivor_fa(t_real _t) const

Probability of no open times detected between 0 and t.

void set_nmax(t_uint _n)

Sets \(t\geq n_{\mathrm{max}}\tau\).

t_uint get_nmax() const

When to switch to asymptotic values.

t_real get_tau() const

Gets the value of missed event resolution;.

t_real get_tmax() const

\(t_{\mathrm{max}}\) is the time after which approximate calculations are performed.

t_rmatrix const &get_af_factor() const

\(Q_{AF}e^{-Q_{FF}\tau} \)

t_rmatrix const &get_fa_factor() const

\(Q_{FA}e^{-Q_{AA}\tau} \)

t_rmatrix laplace_af(t_real _s) const

Exact laplace of AF.

t_rmatrix laplace_fa(t_real _s) const

Exact laplace of FA.

QMatrix const &get_qmatrix() const

Returns current QMatrix.